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

[Consensus] add BlockVerifier #16147

Merged
merged 2 commits into from
Feb 13, 2024
Merged

Conversation

mwtian
Copy link
Member

@mwtian mwtian commented Feb 8, 2024

Description

  • Add BlockVerifier trait and SignedBlockVerifier impl for verifying block metadata, transactions and ancestors.
  • Add TransactionVerifier trait, to be implemented by SuiTxValidator.
  • Use ProtocolKeyPair instead of NetworkKeyPair or generic type for block signing. ProtocolKeyPair is currently BLS and can switch to EdDSA later.
  • Include block signature when computing BlockDigest.

Test Plan

Unit tests.


If your changes are not user-facing and do not break anything, you can skip the following section. Otherwise, please briefly describe what has changed under the Release Notes section.

Type of Change (Check all that apply)

  • protocol change
  • user-visible impact
  • breaking change for a client SDKs
  • breaking change for FNs (FN binary must upgrade)
  • breaking change for validators or node operators (must upgrade binaries)
  • breaking change for on-chain data layout
  • necessitate either a data wipe or data migration

Release notes

Copy link

vercel bot commented Feb 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mysten-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2024 7:53pm
sui-core ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2024 7:53pm
sui-typescript-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2024 7:53pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
explorer ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2024 7:53pm
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2024 7:53pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2024 7:53pm

consensus/config/src/crypto.rs Show resolved Hide resolved
consensus/core/src/authority_node.rs Outdated Show resolved Hide resolved
consensus/core/src/block.rs Outdated Show resolved Hide resolved
consensus/core/src/block_verifier.rs Outdated Show resolved Hide resolved
consensus/core/src/block_verifier.rs Outdated Show resolved Hide resolved
consensus/core/src/block_verifier.rs Outdated Show resolved Hide resolved
consensus/core/src/authority_node.rs Outdated Show resolved Hide resolved
consensus/core/src/authority_node.rs Show resolved Hide resolved
consensus/core/src/block.rs Show resolved Hide resolved
consensus/core/src/block.rs Show resolved Hide resolved
consensus/core/src/block_verifier.rs Show resolved Hide resolved
consensus/core/src/block_verifier.rs Show resolved Hide resolved
consensus/core/src/block_verifier.rs Show resolved Hide resolved
consensus/core/src/metrics.rs Show resolved Hide resolved
narwhal/worker/src/tx_validator.rs Show resolved Hide resolved
consensus/core/src/authority_node.rs Outdated Show resolved Hide resolved
consensus/core/src/block.rs Outdated Show resolved Hide resolved
consensus/core/src/block.rs Show resolved Hide resolved
Copy link
Contributor

@akichidis akichidis left a comment

Choose a reason for hiding this comment

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

💯

@mwtian mwtian enabled auto-merge (squash) February 13, 2024 17:09
@mwtian mwtian merged commit 287359e into MystenLabs:main Feb 13, 2024
41 checks passed
@mwtian mwtian deleted the consensus-verifier branch February 13, 2024 17:48
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.

3 participants