-
Notifications
You must be signed in to change notification settings - Fork 88
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
fix: hive #1381
base: main
Are you sure you want to change the base?
fix: hive #1381
Conversation
src/bin/hive_chain.rs
Outdated
|
||
// Set the chain id | ||
let chain_id = starknet_provider.chain_id().await?; | ||
let chain_id: u64 = (Felt::from(u64::MAX).to_bigint() & chain_id.to_bigint()).try_into()?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, shouldn't it be:
let chain_id: u64 = (Felt::from(u32::MAX).to_bigint() & chain_id.to_bigint()).try_into()?;
to be consistent with what's here
Lines 51 to 54 in 9ea6096
let chain = (starknet_provider.chain_id().await.map_err(KakarotError::from)?.to_bigint() | |
& Felt::from(u32::MAX).to_bigint()) | |
.to_u64() | |
.unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, as discussed this is an error in the code and needs to be fixed. We should split into one ETH_CHAIN_ID
which is taken modulo u32::MAX and one STARKNET_CHAIN_ID
which is just the "real" starknet chain id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2**53
and not 2**32
though
45a1535
to
d12b596
Compare
e6d271b
to
e98e60c
Compare
Time spent on this PR: 1 day
On track for: #1310
Pull Request type
Please check the type of change your PR introduces:
What is the new behavior?
Fixes the hive testing using execute from outside.
Does this introduce a breaking change?