-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: missing parameters in get_block() method #1549
Comments
@franciszekjob any clue here ? |
Hi @shawakash 👋 , Which node are you using? |
hey @franciszekjob , |
only the get_date_from_block() func ? |
async def get_date_from_block(self, block: int) -> Optional[datetime]:
"""Get date from block number"""
try:
block_info = await self.node_client.get_block(block_number=block)
self._logger.info(f"Block info: {block_info}")
return datetime.fromtimestamp(block_info.timestamp)
except Exception as e:
self._logger.error(f"Error getting date from block: {str(e)}")
return None here you go @franciszekjob |
Ok, I managed to reproduce your error. It's because you're using endpoint for RPC 0.8.0. Fore some reason, block header response lacks |
thanks a lot bud, it worked |
@shawakash happy I could help you 🙌 |
What happened
While fetching the block details from a block number using
node_client.get_block()
function, an error was raised saying some parameters likel1_data_gas_price
andl1_da_mode
is missed.My node client is working fine as i am able to use another methods and i tried changing the sdk version from
0.24.3
to0.24.2
, still issue persistedStack trace
ERROR - Error getting date from block: {'l1_data_gas_price': ['Missing data for required field.'], 'l1_da_mode': ['Missing data for required field.']}
Steps to reproduce
get_block()
function inFullNodeClient
https://starknetpy.readthedocs.io/en/latest/api/full_node_client.html#starknet_py.net.full_node_client.FullNodeClient.get_blockSDK Version
0.24.3
Python version
Python 3.11.0
What operating system are you using?
Mac
Is there an existing issue for this?
The text was updated successfully, but these errors were encountered: