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

App to add berkeley account tables #14339

Merged
merged 7 commits into from
Oct 31, 2023

Conversation

psteckler
Copy link
Member

@psteckler psteckler commented Oct 12, 2023

This app populates the accounts_accessed and accounts_created tables in the berkeley database schema.
It's meant to run after the initial migration app described in the data migration RFC (#14288).

The app is essentially the replayer, except that for each block, it determines which accounts have been modified, and which accounts have been created, and populates the tables accordingly. It's doing the same checks as the replayer, so no need to run a subsequent replayer to check the db integrity.

This code contains the few replayer changes from rampup that are not yet in berkeley. That rampup replayer is used for the cron job against the berkeley test net.

Part of #12676.

Part of #14313.

Closes #12908.

@psteckler
Copy link
Member Author

!ci-build-me

{ staking = target_staking_epoch_data; next = Some target_next_epoch_data }
in
{ target_fork_state_hash
; target_epoch_ledgers_state_hash
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this target epoch ledgers state hash?

Copy link
Member Author

Choose a reason for hiding this comment

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

This code here is a modified replayer. The replayer can use that hash to know when to finish replaying. If there's an output file specified, the epoch ledger with that hash is included, and the hash itself is included.

It's irrelevant for this app, really, but I didn't want to do too much refactoring.

end

module Balances = struct
let query_insert_nonce =
Copy link
Contributor

Choose a reason for hiding this comment

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

How is this getting used?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a leftover from the compatible replayer. I'll delete it.

@psteckler
Copy link
Member Author

!ci-build-me

@deepthiskumar
Copy link
Member

!approved-for-mainnet

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.

3 participants