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

Adds a restrictions ID check into handshake protocols #14

Closed
wants to merge 3 commits into from

Conversation

howardwu
Copy link
Member

@howardwu howardwu commented Jun 8, 2024

Motivation

This PR introduces a restrictions ID check into the handshake protocols.

When two nodes are handshaking on the Router or Gateway level, it is expected that they transmit in their ChallengeResponse messages a copy of their current restrictions ID to their peer, who subsequently checks and enforces that the restrictions ID matches what they expect from their node.

As such, going forward, the following node types are responsible to adhere to the same restrictions list:

  • NodeType::Validator
  • NodeType::Client

Of note, as provers do not validate transitions or transactions, they do not carry ledger state and thus are not subject to the restrictions list. Note that it is critical for clients to also perform the same validation as the validators because the validator rely upon core clients to assist with validation and propagation of transactions to the validators' memory pools.

This design is defined by the foundation to require all handshake connections to enforce the current restrictions ID to be correct and matching at the time of connection; however, it doesn't require consensus to enforce a matching restrictions ID at the time of use.

This PR builds on top of ProvableHQ/snarkVM#15 in snarkVM, which introduces the concept of the restrictions list for programs, functions, and arguments.

node/router/src/handshake.rs Outdated Show resolved Hide resolved
Co-authored-by: vicsn <victor.s.nicolaas@protonmail.com>
Signed-off-by: Howard Wu <9260812+howardwu@users.noreply.github.com>
@vicsn
Copy link

vicsn commented Jun 8, 2024

Closing as its now opened against AleoNet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants