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

fix(rollapp): restore the ability to import rollapp state #883

Merged
merged 5 commits into from
Jun 5, 2024

Conversation

anhductn2001
Copy link
Contributor

Description


Closes #880

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.

@anhductn2001 anhductn2001 marked this pull request as ready for review May 16, 2024 06:12
@anhductn2001 anhductn2001 requested a review from a team as a code owner May 16, 2024 06:12
@omritoptix omritoptix changed the title fix: restore the ability to import rollapp state fix(rollapp): restore the ability to import rollapp state May 20, 2024
Copy link
Contributor

@srene srene left a comment

Choose a reason for hiding this comment

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

i thi

if len(genState.RollappPackets) != 0 {
panic("Only params can be initialized at genesis")
for _, packet := range genState.RollappPackets {
k.SetRollappPacket(ctx, packet)
Copy link
Contributor

Choose a reason for hiding this comment

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

i think we need to re-add the tests for init and export genesis for the delayedack module

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see that we don't have genesis_test for delayedack module before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cc: @srene

Copy link
Contributor

Choose a reason for hiding this comment

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

@srene ping

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry i probably got confused. i see the tests are already there

Copy link

github-actions bot commented Jun 1, 2024

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you!

@github-actions github-actions bot added the Stale label Jun 1, 2024
@github-actions github-actions bot removed the Stale label Jun 2, 2024
@anhductn2001
Copy link
Contributor Author

Ok, need 1 more review to merge it @omritoptix


index := string(SequencerKey(elem.SequencerAddress))
if _, ok := sequencerIndexMap[index]; ok {
return fmt.Errorf("duplicated index for sequencer")
Copy link
Contributor

Choose a reason for hiding this comment

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

predefine an error: ErrDuplicateSequencerIndex = errorsmod.Register(ModuleName, 1019, "duplicate index for sequencer") in errors.go

@mtsitrin mtsitrin merged commit 73a8a1d into main Jun 5, 2024
129 of 132 checks passed
@mtsitrin mtsitrin deleted the ducnt/init_genesis branch June 5, 2024 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restore the ability to import rollapp state
5 participants