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

Run Stateless Validation code as part of mainnet #10440

Closed
pugachAG opened this issue Jan 16, 2024 · 0 comments
Closed

Run Stateless Validation code as part of mainnet #10440

pugachAG opened this issue Jan 16, 2024 · 0 comments
Assignees
Labels
A-stateless-validation Area: stateless validation

Comments

@pugachAG
Copy link
Contributor

In the initial implementation of Stateless Validation we do not change the way we create blocks/chunks. It means that if we were to run Stateless Validation code as part of the current mainnet, it would produce exactly the same blocks. This can be used to check some of the Stateless Validation functionality on mainnet traffic.

We can do the following with running RPC node with Stateless Validation code as part of mainnet:

  • Produce state witness for each chunk and monitor its size.
  • Self-validate the chunk using state witness. This way we ensure correctness of state witness production and chunk validation.
  • Simulate stateless validation with single validator:
    • Use RPC node that tracks all shards to produce state witness.
    • Use separate RPC node that doesn't track any shard as stateless validator.
    • The first node sends validation requests to second one and awaits the endorsements. This way we can check end-to-end validation latency including the network. Also we ensure that we don't accidentally use State in chunk validation code.
@pugachAG pugachAG self-assigned this Jan 16, 2024
@walnut-the-cat walnut-the-cat added the A-stateless-validation Area: stateless validation label Jan 18, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 23, 2024
This is the first PR for #10440.

New feature `shadow_chunk_validation` is introduced. When enabled it
makes the node produce state witness for every chunk in every processed
block and then self-validate it. New metrics are introduced for
validation failures and state witness size.

Detailed state witness size breakdown metrics from
[robin/witness-size](https://github.com/near/nearcore/compare/robin/witness-size)
will be added in a separate PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-stateless-validation Area: stateless validation
Projects
None yet
Development

No branches or pull requests

2 participants