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(manager): stop using state info numblock to calculate batch end height #1100

Closed
wants to merge 2 commits into from

Conversation

srene
Copy link
Contributor

@srene srene commented Sep 27, 2024

PR Standards

Opening a pull request should be able to meet the following requirements

--

PR naming convention: https://hackmd.io/@nZpxHZ0CT7O5ngTp0TP9mg/HJP_jrm7A


Close #1099 , #1092

<-- Briefly describe the content of this pull request -->

For Author:

  • Targeted PR against correct branch
  • included the correct type prefix in the PR title
  • Linked to Github issue with discussion and accepted design
  • Targets only one github issue
  • Wrote unit and integration tests
  • All CI checks have passed
  • Added relevant godoc comments

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 targets main branch, PR should be squashed and merged.
  • In case PR targets a release branch, PR should be rebased.

@srene srene self-assigned this Sep 27, 2024
@srene srene requested a review from a team as a code owner September 27, 2024 14:45
@srene srene linked an issue Oct 1, 2024 that may be closed by this pull request
Copy link
Contributor

@omritoptix omritoptix left a comment

Choose a reason for hiding this comment

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

I believe we missed handling for num blocks coming from events:

numBlocks, err := strconv.ParseInt(rawEventData.Events["state_update.num_blocks"][0], 10, 64)

also there are more places in the code which seem to refer to num blocks which aren't used (like ValidateBasic of msgUpdateState)

@@ -38,10 +38,16 @@ func convertStateInfoToResultRetrieveBatch(stateInfo *rollapptypes.StateInfo) (*
if err != nil {
return nil, err
}

Copy link
Contributor

@omritoptix omritoptix Oct 1, 2024

Choose a reason for hiding this comment

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

Suggested change
// We're populating the endHeight here with the assumption that state info must contain at least one block and that BDs are in ascending order

@srene
Copy link
Contributor Author

srene commented Oct 1, 2024

closing pr, since numblocks removal from state_info (what this pr is fixing) will be reverted.

@srene srene closed this Oct 1, 2024
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.

batch endheight needs to be updated Rollapp panic when sends old blocks
2 participants