-
Notifications
You must be signed in to change notification settings - Fork 23
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
chore: add commitment validity tests #130
chore: add commitment validity tests #130
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
afe583b
to
cb71464
Compare
3386bf3
to
2b4ce27
Compare
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.
Great job, just a q
bolt-sidecar/src/state/execution.rs
Outdated
/// Constant values used for validation | ||
constants: Constants, | ||
} | ||
|
||
/// Constants used for validation. | ||
#[derive(Debug)] | ||
pub struct Constants { | ||
block_gas_limit: u64, | ||
max_tx_input_bytes: usize, | ||
#[allow(unused)] | ||
max_init_code_byte_size: usize, | ||
} | ||
|
||
impl Default for Constants { | ||
fn default() -> Self { | ||
Self { | ||
block_gas_limit: 30_000_000, | ||
max_tx_input_bytes: 4 * 32 * 1024, // 128kb | ||
max_init_code_byte_size: 2 * 24576, | ||
} | ||
} | ||
} |
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.
Why are you putting these constants in a struct field compared to being just constants in the code?
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.
Because these should be configurable in theory, but I'm not fully convinced if this is useful now.
What makes more sense in your opinion?
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.
Why should they be configurable in theory? Just curious, I thought this values could change only with an hard-fork
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.
these values are chosen by the EL, and can be configured via CLI, without hardforks
754e949
to
c77b8c2
Compare
47fcec9
to
6ca40c5
Compare
has_code
property to the AccountState fetched during commitment request validation.Having the account code check prevents accepting preconfirmation requests from smart contracts addresses.
Not entirely sure how this would be possible in the real world, but EL clients are also performing this check.