Adapt validator to post-Merge chains #7
Labels
No Label
Copied from Github
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/ipld-eth-db-validator#7
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
https://github.com/cerc-io/ipld-eth-db-validator/issues/31
New concerns arise when running the validator on post-Merge chains. We should adapt the validator to handle them:
Consensus algorithm transition
In a post-Merge chain, the CL defines the canonical chain, but this validator is currently ignorant of the CL, and therefore has no way to handle a transition of the consensus engine to PoS at the Merge block. The engine it uses is configured in advance, so if using Ethash, it will fail once it reaches a PoS block (due to reward distribution being off), and conversely, if run with no intrinsic consensus engine set, it fails to validate PoW blocks.
We can work around this for now by not running the same validator on block ranges spanning the Merge, but a better solution would be to have the service be aware of the CL and use the appropriate algorithm based on the state of the CL chain.
Non-canonical blocks
However, another aspect of post-Merge chains is EL blocks can be added (and statediff-indexed) but not proposed/attested for whatever reason, and so not included in a slot in the beacon state (this can reliably seen in the first few blocks on a
stack-orchestrator
test chain). For the validator's purposes this means (at the least) we waste some time checking non-canonical blocks, but it could potentially cause issues in code that determines canonicity based only on the heaviest branch in the current EL chain (as doesipld-eth-db
).We should look into this and try to grasp the full implications of it, but for this code the correct solution is to use the CL state to drive the validator (i.e. treat CL appropriately as the source of canonical truth).
From @AFDudley:
@dboreham I suspect we will need to optimize the CL indexer before we can integrate it into the validator, am I correct about this? is there an issue that can be linked?