-
Notifications
You must be signed in to change notification settings - Fork 46
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
Enforce SBliFF finality #1587
Comments
Alright, so far I agree with the status quo, and the general implementation, I have some low-level questions:
|
if it's like that, ok. Looking at the
we can't roll back. If rebalancing changes what we consider to be the longest chain, we need to reset on a snapshot and reapply blocks
We should only snapshot finalized state Persistance I'm not yet sure about. For simplicity, I suggest to snapshot every directly finalized block. Everything else (ForkTree and state after non-finalized blocks) might be kept in-mem
that we may be able to sync from a peer.
My design choice is pragmatism. I saw how it can fit there and I see no reason why it wouldn't be a good idea. It's even fit for the (potential) future case of more than one shard per validateer service |
So the biggest chunks in terms of implementation efforts that can be estimated should be:
|
Goal:
simplifying assumptions:
requires
status quo
EnclaveSidechainBlockImportQueue = ImportQueue<SignedSidechainBlock>
FCFSyield_next_slot
-> propose a new blockRPC
sidechain_fetchBlocksFromPeer
(cannot request blocks on branches we don't know they exist)Proposed Implementation
ImportQueue<SignedSidechainBlock>
withForkTree<Hash, SidechainBlockNumber, SignedSidechainBlock>
ForkTree::import()
(async)enclave_runtime::execute_trusted_calls_internal()
:ForkTree::finalize_with_ancestors(latest_sidechain_block_confirmation)
ForkTree::prune()
(possibly pruning with delay of a few block finalizations to service peers if needed)ForkTree::rebalance()
Initial behavior
RPC changes
sidechain_fetchAvailableBlockHashes
: returns all block hashes in the fork tree (which is regularly pruned upon finalization)sidechain_fetchBlocksFromPeer
: request set of blocks from peer specified by hash without assuming canonical rangeArgumentation
ForkTree
happens async and doesn't cost block production time (in contrast to building theForkTree
fromImportQueue
synchronously uponexecute_trusted_calls()
)The text was updated successfully, but these errors were encountered: