-
Notifications
You must be signed in to change notification settings - Fork 341
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
feat(sequencers): validate sequencer unbonding_time
greater than dispute_period
#1115
feat(sequencers): validate sequencer unbonding_time
greater than dispute_period
#1115
Conversation
…nbondingtime-greater-then-disputeperiod
unbonding_time
greater then dispute_period
…nbondingtime-greater-then-disputeperiod
@@ -153,7 +163,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw | |||
} | |||
|
|||
// ConsensusVersion implements ConsensusVersion. | |||
func (AppModule) ConsensusVersion() uint64 { return 2 } | |||
func (AppModule) ConsensusVersion() uint64 { return 3 } |
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.
maybe use a const?
unbonding_time
greater then dispute_period
unbonding_time
greater than dispute_period
// Get the time duration of the dispute period | ||
disputeDuration := time.Duration(rollappParams.DisputePeriodInBlocks) * HubExpectedTimePerBlock // dispute period duration | ||
if params.UnbondingTime < disputeDuration { | ||
return errorsmod.Wrapf(gerrc.ErrInvalidArgument, "unbonding time must be greater than dispute period") |
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 doesn't check if they are equal
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.
I see segregation in migration where some are done in upgrade.go and some in dedicated migration.go file within the sequencer module.
wondering why is that.
opened an issue for that here: #1160
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1115 +/- ##
==========================================
- Coverage 28.22% 27.39% -0.83%
==========================================
Files 332 456 +124
Lines 52494 82936 +30442
==========================================
+ Hits 14818 22724 +7906
- Misses 35346 57305 +21959
- Partials 2330 2907 +577 ☔ View full report in Codecov by Sentry. |
Closes #613
This PR:
x/sequencer
to have params in own store instead of deprecatedx/params