Skip to content
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(sequencer): Implement new create sequencer design #985

Conversation

zale144
Copy link
Contributor

@zale144 zale144 commented Jul 11, 2024

Description


Closes #979

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow-up issues.

PR review checkboxes:

I have...

  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Targeted PR against the correct branch
  • included the correct type prefix in the PR title
  • Linked to the GitHub issue with discussion and accepted design
  • Targets only one GitHub issue
  • Wrote unit and integration tests
  • Wrote relevant migration scripts if necessary
  • All CI checks have passed
  • Added relevant godoc comments
  • Updated the scripts for local run, e.g genesis_config_commands.sh if the PR changes parameters
  • Add an issue in the e2e-tests repo if necessary

SDK Checklist

  • Import/Export Genesis
  • Registered Invariants
  • Registered Events
  • Updated openapi.yaml
  • No usage of go map
  • No usage of time.Now()
  • Used fixed point arithmetic and not float arithmetic
  • Avoid panicking in Begin/End block as much as possible
  • No unexpected math Overflow
  • Used sendCoin and not SendCoins
  • Out-of-block compute is bounded
  • No serialized ID at the end of store keys
  • UInt to byte conversion should use BigEndian

Full security checklist here

----;

For Reviewer:

  • Confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • Confirmed all author checklist items have been addressed

---;

After reviewer approval:

  • In case the PR targets the main branch, PR should not be squash merge in order to keep meaningful git history.
  • In case the PR targets a release branch, PR must be rebased.

@zale144 zale144 self-assigned this Jul 11, 2024
@zale144 zale144 requested a review from a team as a code owner July 11, 2024 13:45
@zale144 zale144 changed the base branch from main to zale144/978-new-create-rollapp-design July 12, 2024 13:51
@omritoptix omritoptix linked an issue Jul 18, 2024 that may be closed by this pull request
4 tasks
x/rollapp/keeper/msg_server_update_rollapp.go Outdated Show resolved Hide resolved
x/rollapp/keeper/rollapp.go Outdated Show resolved Hide resolved
x/rollapp/keeper/rollapp.go Outdated Show resolved Hide resolved
x/rollapp/keeper/rollapp.go Outdated Show resolved Hide resolved
x/rollapp/keeper/rollapp.go Outdated Show resolved Hide resolved
x/rollapp/keeper/rollapp.go Outdated Show resolved Hide resolved
@zale144 zale144 requested a review from mtsitrin July 22, 2024 10:08
Copy link
Contributor

@danwt danwt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto some of what I said here #980 (review)
Especially wrt. proto

app/upgrades/v4/upgrade.go Outdated Show resolved Hide resolved
app/upgrades/v4/upgrade.go Outdated Show resolved Hide resolved
utils/utils.go Outdated Show resolved Hide resolved
Comment on lines 34 to 37
if !registrationFee.IsZero() {
if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, creator, types.ModuleName, registrationFee); err != nil {
return errorsmod.Wrap(types.ErrFeePayment, err.Error())
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like a bug fix for other pr?

x/rollapp/types/errors.go Outdated Show resolved Hide resolved
Comment on lines +35 to +37
if rollapp.Frozen {
return nil, types.ErrRollappJailed
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should remove ErrRollappJailed jailed imo because it's not well defined

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if everyone agrees

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x/sequencer/keeper/msg_server_update_sequencer.go Outdated Show resolved Hide resolved
x/sequencer/types/errors.go Outdated Show resolved Hide resolved
Comment on lines +19 to +32
metadata := SequencerMetadata{
Moniker: d2.Moniker,
Details: d2.Details,
P2PSeeds: d2.P2PSeeds,
Rpcs: d2.Rpcs,
EvmRpcs: d2.EvmRpcs,
RestApiUrl: d2.RestApiUrl,
ExplorerUrl: d2.ExplorerUrl,
GenesisUrls: d2.GenesisUrls,
ContactDetails: d2.ContactDetails,
ExtraData: d2.ExtraData,
Snapshots: d2.Snapshots,
GasPrice: d2.GasPrice,
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so you cant update p2p or rpc or evm or rest api or explorer or genesis or snapshots or gas price?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x/sequencer/types/msg_create_sequencer.go Outdated Show resolved Hide resolved
// snapshots of the sequencer
repeated SnapshotInfo snapshots = 11;
// gas_price defines the value for each gas unit
string gas_price = 12 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@omritoptix I think this unneeded.
Better way is to have known gas price is to put it on-chain

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is for UX only I believe

@zale144 zale144 requested review from mtsitrin and danwt July 24, 2024 17:29
Comment on lines +179 to +191
P2PSeeds: nil, // TODO
Rpcs: nil, // TODO
EvmRpcs: nil, // TODO
RestApiUrl: "", // TODO
ExplorerUrl: "", // TODO
GenesisUrls: []string{}, // TODO
ContactDetails: &sequencertypes.ContactDetails{ // TODO
Website: "", // TODO
Telegram: "", // TODO
X: "", // TODO
}, // TODO
ExtraData: nil, // TODO
Snapshots: []*sequencertypes.SnapshotInfo{}, // TODO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in another PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danwt migrating old rollapps to the new model will require some additional info from the existing rollapps (on mainnet), for which there is an open issue

Comment on lines +26 to +28
if sequencer.Jailed {
return nil, types.ErrSequencerJailed
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? needs a comment

Comment on lines +12 to +13
// details define other optional details.
string details = 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zale144 @srene what is this field?

@danwt danwt self-requested a review July 25, 2024 09:08
Copy link
Contributor

@danwt danwt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved to go into the other 980

@zale144 zale144 requested a review from danwt July 25, 2024 14:22
@zale144 zale144 merged commit 0d734ac into zale144/978-new-create-rollapp-design Jul 26, 2024
10 of 116 checks passed
@zale144 zale144 deleted the zale144/979-new-create-sequencer-design branch July 26, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add extra information to sequencer metadata Update sequencer registration process with new design
3 participants