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

Solidity method to execute checkpoint full-fat #278

Closed
Tracked by #211 ...
aakoshh opened this issue Oct 2, 2023 · 2 comments
Closed
Tracked by #211 ...

Solidity method to execute checkpoint full-fat #278

aakoshh opened this issue Oct 2, 2023 · 2 comments
Assignees

Comments

@aakoshh
Copy link
Contributor

aakoshh commented Oct 2, 2023

This is the method the message sent in #300 should invoke if the parent is running Lotus, where we cannot use CIDs.

The idea is that we need a method like this on the SubnetActor:

fn submit_checkpoint(
  checkpoint: BottomUpCheckpoint, 
  signatures: Vec<Signature>, 
  messages: Vec<CrossMsg>
)

The method should:

  1. Hash the messages and compare them to checkpoint.cross_messages_hash
  2. Hash the checkpoint and validate all signatures against it, recovering the public keys from them
  3. Check that all public keys (or FVM addresses derived from them) are part of the currently expected validator set
  4. Check that the total power of all signatories is sufficient for a quorum.
  5. Check that the checkpointed height is the expected one
  6. Reward the relayer for their service - this should be its own story, I recommend the relayer is added to the list of all relayers for this checkpoint and rewarded at the time the next checkpoint arrives, so that we can distribute a fixed reward pot among them, rather than reward them at the time of submission.
  7. If this is the first time the checkpoint is submitted, execute the messages, or put them in the execution queue.
  8. Update the next expected configuration number
  9. Mark the checkpoint as executed, so further relayers can be rewarded but don't cause double execution.

The method should use the mechanism developed in #212 to executed messages.

@aakoshh
Copy link
Contributor Author

aakoshh commented Oct 3, 2023

Validation is also defined in #312 but that ticket did not spell out the execution.

@dnkolegov
Copy link
Contributor

Solidity-part is implemented in consensus-shipyard/ipc-solidity-actors#229

@dnkolegov dnkolegov self-assigned this Oct 9, 2023
@jsoares jsoares transferred this issue from consensus-shipyard/fendermint Dec 19, 2023
@jsoares jsoares closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants