-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Light-client sync for contract-based PoA #6370
Conversation
just a note: the only proof that the light client actually needs to go to the network for is when the transition to the contract first begins. Transitions within the contract just require receipts to be fetched. |
@@ -53,6 +59,9 @@ const HISTORY: u64 = 2048; | |||
/// The best block key. Maps to an RLP list: [best_era, last_era] | |||
const CURRENT_KEY: &'static [u8] = &*b"best_and_latest"; | |||
|
|||
/// Key storing the last canonical epoch transition. | |||
const LAST_CANONICAL_TRANSITION: &'static [u8] = &*b"canonical_transition"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this require a database upgrade?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the most recent version of the code instantiates this key if it doesn't exist already. Only chains which don't use epochs can be synced by the light client right now anyway. When running the new version, their genesis epoch data will be populated correctly.
Closes #5427
Summary of changes:
EngineClient
fromBlockChainClient
and implementEngineClient
for light client.