Skip to content

Commit

Permalink
[mysticeti] add SuiBlockValidator (MystenLabs#14572)
Browse files Browse the repository at this point in the history
## Description 

This PR imports mysticeti and implements `BlockValidator` for
`SuiBlockValidator`. The former is the counterpart of
`TransactionValidator` in narwhal, used to verify the block contents.
The major verification logic is extracted into a shared function
`validate_transactions`.

Also updated `futures` and `zeroize`'s config to align with mysticeti's.

## Test Plan 

How did you test the new or updated feature?

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### 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
  • Loading branch information
longbowlu authored Nov 1, 2023
1 parent c29fc1f commit 9e57b2b
Show file tree
Hide file tree
Showing 8 changed files with 178 additions and 73 deletions.
126 changes: 97 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ expect-test = "1.4.0"
eyre = "0.6.8"
fdlimit = "0.2.1"
fs_extra = "1.3.0"
futures = "0.3.25"
futures = "0.3.28"
futures-core = "0.3.21"
git-version = "0.3.5"
glob = "0.3.1"
Expand Down Expand Up @@ -488,6 +488,7 @@ uuid = { version = "1.1.2", features = ["v4", "fast-rng"] }
webpki = { version = "0.101.0", package = "rustls-webpki", features = ["alloc", "std"] }
x509-parser = "0.14.0"
zstd = "0.12.3"
zeroize = "1.6.0"
versions = "4.1.0"

# Move dependencies
Expand Down
2 changes: 2 additions & 0 deletions crates/sui-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ sui-simulator.workspace = true
sui-storage.workspace = true
sui-types.workspace = true
workspace-hack.workspace = true
zeroize.workspace = true
mysticeti-core = { git = "https://github.com/MystenLabs/mysticeti", rev = "0bc1ae8f6cc5b1eb22752fa37ba64bdaf358f7cf" }

[dev-dependencies]
clap.workspace = true
Expand Down
Loading

0 comments on commit 9e57b2b

Please sign in to comment.