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

Spec: topdown spec #920

Merged
merged 12 commits into from
May 14, 2024
Merged

Spec: topdown spec #920

merged 12 commits into from
May 14, 2024

Conversation

cryptoAtwill
Copy link
Contributor

Adding topdown finality spec

@aakoshh aakoshh added the specs label May 10, 2024
specs/topdown.md Outdated Show resolved Hide resolved
specs/topdown.md Outdated Show resolved Hide resolved
specs/topdown.md Outdated
@@ -0,0 +1,84 @@
#Topdown Finality

The topdown finality propagates the states in the parent subnet to the child blockchain. The following data are passed:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest to first describe what is the purpose of topdown finality in IPC, then when exactly it happens, and only then the exact data which is being passed from parent to the child. Wdyt?

specs/topdown.md Outdated Show resolved Hide resolved
specs/topdown.md Outdated

From a high level point of view, the topdown finality works as follows:

- Parent finality process will first fetch the last committed `ParentFinality`. If there is no previous committed parent finality, the genesis block is [used](https://github.com/consensus-shipyard/ipc/blob/7af25c4c860f5ab828e8177927a0f8b6b7a7cc74/fendermint/vm/topdown/src/sync/mod.rs#L36).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you describe what and when triggers "Parent finality process"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is actually no one triggering the process, it's always running in the background once enabled. I have added this into the spec.

specs/topdown.md Outdated Show resolved Hide resolved
specs/topdown.md Outdated Show resolved Hide resolved
specs/topdown.md Outdated Show resolved Hide resolved
specs/topdown.md Outdated Show resolved Hide resolved
specs/topdown.md Outdated

As topdown finality relies heavily on RPC node for querying, make sure the RPC node is reliable and returns enough historical data.

See also [IPS Spec - Executions](https://www.notion.so/IPS-Spec-Executions-ebf13d833d6845ec9c11b59bd514fcda?pvs=21) for a description of how proposals and and executions are implemented.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't link to Notion anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the issue is currently there are no links to those specs yet, I will remove the hyper link first and add them back later.

specs/topdown.md Outdated

A quorum detected by the `VoteTally` is used a pre-condition for finality proposals being added to the CometBFT block proposals, to avoid any liveness issues which could arise if the other validators were to reject the proposal. If a premature finality causes the block propsal to fail, it means in that round CometBFT cannot make progress, it cannot finalize a block, potentially causing the subnet blockchain to stall. By requiring a quorum, we avoid this issue by only proposing when we have high confidence that the proposal will be accepted.

See [IPC Spec - IPLD Resolver](https://www.notion.so/IPC-Spec-IPLD-Resolver-7b4290a0d60c40cdba98cd6d3e66648b?pvs=21) for a more detailed discussion of the `VoteTally`.
Copy link
Contributor

@maciejwitowski maciejwitowski May 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't link to Notion anymore, since external teams won't have access to it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the link for now, will add them back once they are merged

cryptoAtwill and others added 9 commits May 13, 2024 14:15
Co-authored-by: Maciej Witowski <maciej.witowski@protocol.ai>
Co-authored-by: Maciej Witowski <maciej.witowski@protocol.ai>
Co-authored-by: Maciej Witowski <maciej.witowski@protocol.ai>
Co-authored-by: Maciej Witowski <maciej.witowski@protocol.ai>
Co-authored-by: Maciej Witowski <maciej.witowski@protocol.ai>
Co-authored-by: Maciej Witowski <maciej.witowski@protocol.ai>
Co-authored-by: Maciej Witowski <maciej.witowski@protocol.ai>
specs/topdown.md Outdated Show resolved Hide resolved
@maciejwitowski maciejwitowski self-requested a review May 13, 2024 10:54
cryptoAtwill and others added 2 commits May 13, 2024 20:05
Co-authored-by: Maciej Witowski <maciej.witowski@protocol.ai>
@cryptoAtwill cryptoAtwill merged commit 052153f into main May 14, 2024
15 checks passed
@cryptoAtwill cryptoAtwill deleted the spec-topdown branch May 14, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants