This repository has been archived by the owner on Jan 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
slashing: add duplicate block proof verification (#7418)
* slashing: add duplicate block proof verification * pr feedback: use local record dep * pr feedback: update to v2.1 crates * pr feedback: rename errors for consistency * pr feedback: do not log pubkey * pass along workspace lints * pr feedback: use zerocopy for instruction data * add one epoch statue of limitations * pr feedback: zerocopy from proof account to proof data struct * Fix `proof_account_length` for the new size of a proof account * pr feedback: revert Cargo.lock * pr feedback: remove unecessary allow(dead_code) * pr feedback: use SLOT - 1 and constants in test code * pr feedback: return error if proof buffer is too small for shred1_length * pr feedback: remove lifetime on shred reference in get_payload * pr feedback: use rwlock in test rather than unsafe const modification * pr feedback: use epoch schedule sysvar instead of hardcoding length * Add Cargo.lock just for slashing crate
- Loading branch information
1 parent
dcfc02b
commit 633f061
Showing
14 changed files
with
2,409 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
[package] | ||
name = "spl-slashing" | ||
version = "0.1.0" | ||
description = "Solana Program Library Slashing" | ||
authors = ["Solana Labs Maintainers <[email protected]>"] | ||
repository = "https://github.com/solana-labs/solana-program-library" | ||
license = "Apache-2.0" | ||
edition = "2021" | ||
|
||
[features] | ||
no-entrypoint = [] | ||
test-sbf = [] | ||
|
||
[dependencies] | ||
bitflags = { version = "2.6.0", features = ["serde"] } | ||
bytemuck = { version = "1.19.0", features = ["derive"] } | ||
num_enum = "0.7.3" | ||
generic-array = { version = "0.14.7", features = ["serde"], default-features = false } | ||
bincode = "1.3.3" | ||
num-derive = "0.4" | ||
num-traits = "0.2" | ||
solana-program = "2.1.0" | ||
serde = "1.0.210" # must match the serde_derive version, see https://github.com/serde-rs/serde/issues/2584#issuecomment-1685252251 | ||
serde_bytes = "0.11.15" | ||
serde_derive = "1.0.210" # must match the serde version, see https://github.com/serde-rs/serde/issues/2584#issuecomment-1685252251 | ||
serde_with = { version = "3.11.0", default-features = false } | ||
|
||
thiserror = "1.0" | ||
spl-pod = { version = "0.5.0", path = "../../libraries/pod" } | ||
|
||
[dev-dependencies] | ||
lazy_static = "1.5.0" | ||
solana-program-test = "2.1.0" | ||
solana-sdk = "2.1.0" | ||
solana-ledger = "2.1.0" | ||
solana-entry = "2.1.0" | ||
solana-client = "2.1.0" | ||
spl-record = { version = "0.3.0", path = "../../record/program" } | ||
rand = "0.8.5" | ||
|
||
[lib] | ||
crate-type = ["cdylib", "lib"] | ||
|
||
[package.metadata.docs.rs] | ||
targets = ["x86_64-unknown-linux-gnu"] | ||
|
||
[lints] | ||
workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
S1ashing11111111111111111111111111111111111 |
Oops, something went wrong.