Skip to content

checkpoint: list api fix numerical key ordering#1

Draft
taratorio wants to merge 8 commits intomasterfrom
checkpoint-list-numerical-ordering
Draft

checkpoint: list api fix numerical key ordering#1
taratorio wants to merge 8 commits intomasterfrom
checkpoint-list-numerical-ordering

Conversation

@taratorio
Copy link
Owner

Description

Please provide a detailed description of what was done in this PR

Changes

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Changes only for a subset of nodes

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Nodes audience

In case this PR includes changes that must be applied only to a subset of nodes, please specify how you handled it (e.g. by adding a flag with a default value...)

Checklist

  • I have added at least 2 reviewer or the whole pos-v1 team
  • I have added sufficient documentation in code
  • I will be resolving comments - if any - by pushing each fix in a separate commit and linking the commit hash in the comment reply

Cross repository changes

  • This PR requires changes to bor
    • In case link the PR here:
  • This PR requires changes to matic-cli
    • In case link the PR here:

Testing

  • I have added unit tests
  • I have added tests to CI
  • I have tested this code manually on local environment
  • I have tested this code manually on remote devnet using express-cli
  • I have tested this code manually on mumbai or amoy
  • I have created new e2e tests into express-cli

Manual tests

Please complete this section with the steps you performed if you ran manual tests for this functionality, otherwise delete it

Additional comments

Please post additional comments in this section if you have them, otherwise delete it

leovct and others added 6 commits February 29, 2024 10:07
…xPolygon#1141)

* chg: POS-2399: ganache bug workaround to reduce smoke_test time

* chg: POS-2399: add echo log

* chg: POS-2399: fix signer dump path

* chg: POS-2399: log info

* chg: POS-2399: fix script with proper signersDump length

* chg: POS-2399: better comment
* chg: update deps / fix root folder for docker integration tests

* chg: bump bor version

* chg: bump deps

* chg: bump deps

* chg: update go version in GH CIs

* chg: update go version in linter and makefile

* chg: update go version in makefile

* chg: change golangci-lint version

* chg: fix linter / remove wsl
@taratorio taratorio marked this pull request as draft March 27, 2024 14:49
@taratorio taratorio changed the title checkpoint: fix numerical key ordering checkpoint: list api fix numerical key ordering Mar 27, 2024
}
}

if err := keeper.MigrateCheckpointKeyV2(ctx); err != nil {
Copy link
Owner Author

@taratorio taratorio Mar 27, 2024

Choose a reason for hiding this comment

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

TODOs:

  • is this a good place to run the migration?
  • is InitGenesis guaranteed to be run on process restart?
  • test and see how long it takes - first impression is that this should be quick to complete given the level db table has only 60k entries in bor-mainnet

// GetCheckpointKey appends prefix to checkpointNumber
func GetCheckpointKey(checkpointNumber uint64) []byte {
checkpointNumberBytes := []byte(strconv.FormatUint(checkpointNumber, 10))
checkpointNumberBytes := sdk.Uint64ToBigEndian(checkpointNumber)
Copy link
Owner Author

Choose a reason for hiding this comment

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

this is the actual fix for having correct numerical ordering

@taratorio taratorio force-pushed the checkpoint-list-numerical-ordering branch from a1044fe to f13021b Compare April 4, 2024 12:47
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.

4 participants