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

[Access] Add util command to backfill tx error messages db #6413

Open
peterargue opened this issue Aug 28, 2024 · 0 comments · May be fixed by #6525
Open

[Access] Add util command to backfill tx error messages db #6413

peterargue opened this issue Aug 28, 2024 · 0 comments · May be fixed by #6525
Assignees

Comments

@peterargue
Copy link
Contributor

peterargue commented Aug 28, 2024

Problem Description

In #6302, we updated ANs to support storing transaction error messages to their local db. This ensures they have the data going forward, but nodes will still be missing previous data. This is needed by historic ANs to ensure they have all data necessary to serve requests.

Proposed Solution

Create a util command to backfill transaction error messages from a set of execution nodes to the nodes local database.

The command should take a comma separated list of execution node IDs. It will query these nodes (in order) to get error messages. There is a special value "any" which must be the only value if provided. When used, the command will use any valid execution node.

The command also optionally takes a start and end height. If not provided it will use the root block and latest sealed block as start/end.

It should only work when the node has indexing enabled, otherwise it returns an error. it can check by seeing if there are tx results for the start block.

When run, the command looks up local transaction results for all transactions in each block between start and end inclusive. For each transaction with Failed == true, request the transaction error messages from the ENs and store it into the local db.

When querying ENs, stop after the first successful response. Query the ENs in the order they were provided to the command.

As an optimization, use GetTransactionErrorMessagesByBlockID to query all tx error messages for the block at once.

Definition of Done

The util command works as expected
There are unit tests covering core functionality

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 a pull request may close this issue.

2 participants