-
Notifications
You must be signed in to change notification settings - Fork 99
Description
Context
Following from #613, we are moving forward with the design and implementation of transaction and block validation (guardrails) and deferred proving of blocks.
See this comment for context on deferred block proving. The TLDR is that signed (validated), unproven blocks will be sent to the store. The store will then be responsible for proving blocks.
Scope
The following changes will be required to complete this piece of work:
Validator
- Transaction submission, re-execution, and storage.
- Block submission, validation, and signing.
Block Producer
- Updated flow for deferred proving.
- Integration with Validator.
Store
- Updated flow for deferred proving.
- Integration with remote prover.
Network Transaction Builder
- Integration with Validator.
Out of Scope
Miden Client changes will need to be covered in a separate issue.
Miden base changes will be handled in separate issues such as 0xMiden/protocol#2009.
Error Scenarios
The new flows pertaining to the Validator and deferred block proving create the following new error scenarios that we must handle:
Transaction validation failure
- Proven transactions are not able to be re-executed upon submission to the Validator.
- Prevents subsequent Block validation because invalid transactions will be present in them. ❌
Block validation failure
- Blocks are not able to be validated and signed upon submission to the Validator.
- Prevents Block proving. ❌
Block proving failure
- Creates a desync scenario between clients that rely on validated / signed blocks. ❌
Plan
The work will be sliced into the following iterations:
- Define full flow of transactions and blocks involving the Validator and deferred block proving.
- Update miden-base types for block signing and deferred proving.
- Create Validator component and integrate with RPC for transaction submission.
- Integrate NTB with Validator.
- Add transaction validation logic to Validator.
- Add block validation endpoints and logic to Validator.
- feat: Validate and prove blocks #1381
- feat: Validator block signatures #1426
- Validated transactions check in block validation: feat: Add block validation logic against validated transactions (in-memory) #1460
- Add key generation / handling for node bootstrap / genesis.
- Move block proving from block producer to the store
- Add persistence layer to Validator.
- Verify that Validator is sufficiently decoupled from Node
- Validator as separate process works
- Validator going down does not stop Node, can serve read requests
- Node resumes normal functioning when Validator is brought back up
- Implement secure key backend.
- Deploy Validator as separate instance to node.
- chore: Add validator service file #1638
- With secure key backend
- Devnet
- Testnet