-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Re-enable dedup and shuffling as defaults (for test networks) #9397
Conversation
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.
LGTM
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -106,7 +106,7 @@ pub struct ExecutionConfigV3 { | |||
impl Default for ExecutionConfigV3 { | |||
fn default() -> Self { | |||
Self { | |||
transaction_shuffler_type: TransactionShufflerType::NoShuffling, | |||
transaction_shuffler_type: TransactionShufflerType::SenderAwareV2(32), | |||
block_gas_limit: None, |
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.
@danielxiangzl - Should we enable block gas limit by default for Forge and other testings?
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.
Yes, but only after the execution on-chain config registry is fixed. I still find it hacky to set the config values via default for test networks. Maybe do what Igor suggested and set the block gas limit to be 35000 for genesis?
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.
This will be used only for Forge and existing integration tests, so I say we enable gas limit so that our tests exercise the block gas limit before rolling this out. For testnet/mainnet, this is no-op as they are still using the V1.
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.
Actually I checked and we are on V3 in mainnet and testnet. But it still shouldn't matter, right?
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.
If the execution on-chain config registry is not fixed, and main/testnet reads config via default (V3), then it will be a problem. So just to double check, is it fixed already?
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.
How are we on V3 in mainnet? If so, I think this is a dangerous change to make..
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.
The governance proposal for v1.5 was V3
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.
Since the registry fix is not rolled out yet, I think we should not enable shuffling by default in V3 - if we are already in V3 in mainnet. The reason for that being if by any chance we roll out this change without the registry fix, then we break the network.
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.
Let's add V4 below Missing, and return no shuffling in v3? Then we don't need new shuffling enum either
@@ -106,7 +106,7 @@ pub struct ExecutionConfigV3 { | |||
impl Default for ExecutionConfigV3 { |
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.
if we want to permanently have different things, I would have :
default_for_genesis
default_if_missing
basically default_for_genesis
is used for any new network. default_if_missing
is the backward compatible thing (needed for reply for example), to have old behavior if flag is missing
and I would remove Default macro completely, so people don't explicitly pick the one they want.
currently it is not critical, but if at any point in the future we add anything in the execution config that affects transaction output (not the order/which ones get on chain), we would need to have a separation, as replay will start with missing config
@@ -106,7 +106,7 @@ pub struct ExecutionConfigV3 { | |||
impl Default for ExecutionConfigV3 { | |||
fn default() -> Self { | |||
Self { | |||
transaction_shuffler_type: TransactionShufflerType::NoShuffling, | |||
transaction_shuffler_type: TransactionShufflerType::SenderAwareV2(32), | |||
block_gas_limit: None, |
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.
Since the registry fix is not rolled out yet, I think we should not enable shuffling by default in V3 - if we are already in V3 in mainnet. The reason for that being if by any chance we roll out this change without the registry fix, then we break the network.
This reverts commit 48a39a1.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -11,13 +11,17 @@ pub enum OnChainExecutionConfig { | |||
V1(ExecutionConfigV1), | |||
V2(ExecutionConfigV2), | |||
V3(ExecutionConfigV3), | |||
/// To maintain backwards compatibility on replay, we must ensure that any new features resolve | |||
/// to previous behavior (before OnChainExecutionConfig was registered) in case of Missing. | |||
Missing, |
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.
It is pretty easy to make a mistake and add the next version V4
after V3
and before Missing
and thus breaking backward compatibility. Can you add a comment here to add V4 after Missing
?
@@ -106,8 +118,8 @@ pub struct ExecutionConfigV3 { | |||
impl Default for ExecutionConfigV3 { | |||
fn default() -> Self { |
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.
Is this being used anywhere? If so, better to change them to default_for_genesis
or default_if_missing
and get rid of this?
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.
Nevermind, just realized, this is called from default_for_genesis
function, but still may be it will be less confusing to remove Default
trait for ExecutionConfigV3
and return the desired value from default_for_genesis
function..
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.
Agreed with this, maybe even just inline there
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.
Thanks!
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.
Thanks for fixing the config mess @bchocho 🙌
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
### Description Introduce a new `Missing` version for `OnChainExecutionConfig` that will maintain backwards compatibility for before the config was registered. Use this when the config is missing from epoch manager. Otherwise, use `default_for_genesis` for all new networks e.g., forge, devnet. ### Test Plan Observe that e2e tests use both shuffle and dedup.
Description
Introduce a new
Missing
version forOnChainExecutionConfig
that will maintain backwards compatibility for before the config was registered. Use this when the config is missing from epoch manager.Otherwise, use
default_for_genesis
for all new networks e.g., forge, devnet.Test Plan
Observe that e2e tests use both shuffle and dedup.