Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Sassafras Consensus Protocol #11879

Draft
wants to merge 79 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
387c6ed
Sassafras consensus - Prototype 1 (#11678)
davxy Jul 21, 2022
b8cea2f
Sassafras consensus - Prototype 2.1 (#11889)
davxy Aug 23, 2022
098af4c
Merge branch 'master' into davxy-sassafras-protocol
davxy Aug 23, 2022
a7fa940
Fix obsolete dependencies
davxy Aug 23, 2022
38035f6
Merge branch 'master' into davxy-sassafras-protocol
davxy Sep 2, 2022
b0a218c
Fix slot to epoch index conversion
davxy Sep 2, 2022
2d55cc0
Further refactory
davxy Sep 2, 2022
fcf1ffe
Merge branch 'master' into davxy-sassafras-protocol
davxy Sep 24, 2022
ac2fc9c
Fix after merge
davxy Sep 24, 2022
8f43727
Pick some runtime cleanup from Prototype 2.2
davxy Sep 24, 2022
2b51690
Sassafras Prototype 2.2 (#12314)
davxy Oct 29, 2022
e690654
Merge branch 'master' into davxy-sassafras-protocol
davxy Oct 29, 2022
fa72e51
Fixes after master merge
davxy Oct 29, 2022
7d8f5c3
Fixes in the sassafras demo after master merge
davxy Oct 29, 2022
1be8a84
TEMPORARY
davxy Nov 3, 2022
0fc4a98
Refactory of block-import method
davxy Nov 15, 2022
6389416
Merge branch 'master' into davxy-sassafras-protocol
davxy Nov 15, 2022
a02143c
Fixes after master merge
davxy Nov 15, 2022
924c51a
Bump Sassafras crates versions to 0.3.0
davxy Nov 15, 2022
5b21f45
Sassafras Iteration 3.1 (#12713)
davxy Jan 24, 2023
086630c
Introduce TicketEnvelope
davxy Jan 24, 2023
baf8736
Merge branch 'master' into davxy-sassafras-protocol
davxy Jan 24, 2023
a358c9f
Fix after master merge
davxy Jan 24, 2023
60410fb
Pick warp sync fix from babe
davxy Jan 24, 2023
95ba593
Fix sassafras node binary after master merge
davxy Jan 24, 2023
dc29ddf
Merge branch 'master' into davxy-sassafras-protocol
davxy Feb 22, 2023
7f224ff
Fix after master merge
davxy Feb 22, 2023
7c80f85
Merge branch 'master' into davxy-sassafras-protocol
davxy Mar 27, 2023
be6974b
Fix after master merge
davxy Mar 27, 2023
356f3d0
Small refactory
davxy Mar 27, 2023
8d9b228
Define log target
davxy Mar 28, 2023
913e652
Merge branch 'master' into davxy-sassafras-protocol
davxy May 1, 2023
fff4224
Introduce better ticket related structures
davxy May 3, 2023
80bb0a4
Frame tests overhaul
davxy May 8, 2023
20fe451
Fix client tests
davxy May 10, 2023
cb4c30e
Merge branch 'master' into davxy-sassafras-protocol
davxy May 11, 2023
bc05e9f
Fix after master merge
davxy May 11, 2023
1906ce9
Seal should be removed
davxy May 12, 2023
9354204
Isolate ticketing structs and functions in separate module
davxy May 12, 2023
8aa8eaf
Use 'make_bytes' to generate randomness and ticket-id
davxy May 12, 2023
9bb209e
Merge branch 'master' into davxy-sassafras-protocol
davxy May 15, 2023
5e7d6c5
Sassafras Protocol v0.3.2 (#14139)
davxy May 18, 2023
f7bb072
rustfmt
davxy May 19, 2023
fb4a841
Fix bench releated stuff
davxy May 19, 2023
f8003bd
Bump ring-vrf related crates versions
davxy Jun 12, 2023
8c51487
Merge branch 'master' into davxy-sassafras-protocol
davxy Jun 12, 2023
afe252e
Fix after master merge
davxy Jun 12, 2023
dec7fd4
Sassafras key is SW format can't be used as AccountId32
davxy Jun 13, 2023
5e360f9
Set ring-vrf related refs to a working repo and branch
davxy Jun 13, 2023
23e150e
Clippy fix
davxy Jun 13, 2023
1ae6d37
Removed try-runtime option from node-sassafras bin
davxy Jun 13, 2023
fdb746e
Fix one more clippy error
davxy Jun 13, 2023
1074d37
Fix cargo doc
davxy Jun 13, 2023
0f148d7
Sassafras protocol v0.3.3 (#14362)
davxy Jun 16, 2023
695fa7e
Dummy implementations for RuntimePublic
davxy Jun 18, 2023
b92c080
Merge branch 'master' into davxy-sassafras-protocol
davxy Jun 22, 2023
1bc33af
Use upstream ring-vrf
davxy Jun 22, 2023
6f48ec1
Merge branch 'master' into davxy-sassafras-protocol
davxy Aug 9, 2023
68222f7
Fixed sassafras primitives after master merge
davxy Aug 9, 2023
060e401
Improve sassafras pallet logic and cleanup stale data
davxy Aug 11, 2023
677a095
Begin fix of client
davxy Aug 11, 2023
049ac84
Substrate fix test utils
davxy Aug 11, 2023
50ab0d0
Fix sassafras node
davxy Aug 12, 2023
2aec295
Improve pallet test wrt body equality assertions
davxy Aug 12, 2023
15002c1
Build ring context in pallet genesis build
davxy Aug 12, 2023
3245310
Added transaction pool factory to submit tickets
davxy Aug 12, 2023
064dff0
Fix. Native vs wasm usize lengths
davxy Aug 12, 2023
998db32
Bump sassafras version to 0.3.4
davxy Aug 12, 2023
6e23f68
Sassafras structures overhaul
davxy Aug 14, 2023
9329314
Tickets were not saved
davxy Aug 14, 2023
f9cdfc1
Small note
davxy Aug 14, 2023
85a89da
Move sassafras inherents to client. Not reason to have it as a primitive
davxy Aug 14, 2023
3eb0d42
Improve ticket claiming mechanism
davxy Aug 16, 2023
6c8b3d2
Merge branch 'master' into davxy-sassafras-protocol
davxy Aug 18, 2023
4ff7164
Fix after master merge
davxy Aug 18, 2023
fb501eb
Nitpicks
davxy Aug 18, 2023
ab5a31a
Improvements to the digest log management
davxy Aug 24, 2023
cd8b681
Merge branch 'davxy-sassafras-protocol' of github.com:paritytech/subs…
davxy Aug 24, 2023
b700fa4
Merge branch 'master' into davxy-sassafras-protocol
davxy Aug 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 155 additions & 0 deletions Cargo.lock

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

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ members = [
"bin/node/rpc",
"bin/node/runtime",
"bin/node/testing",
"bin/node-sassafras/node",
"bin/node-sassafras/runtime",
"bin/utils/chain-spec-builder",
"bin/utils/subkey",
"client/api",
Expand All @@ -75,6 +77,7 @@ members = [
"client/consensus/grandpa/rpc",
"client/consensus/manual-seal",
"client/consensus/pow",
"client/consensus/sassafras",
"client/consensus/slots",
"client/db",
"client/executor",
Expand Down Expand Up @@ -188,6 +191,7 @@ members = [
"frame/referenda",
"frame/remark",
"frame/salary",
"frame/sassafras",
"frame/scheduler",
"frame/scored-pool",
"frame/session",
Expand Down Expand Up @@ -243,6 +247,7 @@ members = [
"primitives/consensus/common",
"primitives/consensus/grandpa",
"primitives/consensus/pow",
"primitives/consensus/sassafras",
"primitives/consensus/slots",
"primitives/core",
"primitives/core/hashing",
Expand Down
16 changes: 16 additions & 0 deletions bin/node-sassafras/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
indent_style=space
indent_size=2
tab_width=2
end_of_line=lf
charset=utf-8
trim_trailing_whitespace=true
insert_final_newline = true

[*.{rs,toml}]
indent_style=tab
indent_size=tab
tab_width=4
max_line_length=100
74 changes: 74 additions & 0 deletions bin/node-sassafras/node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
[package]
name = "node-sassafras"
version = "0.3.4-dev"
authors = ["Parity Technologies <[email protected]>", "Davide Galassi <[email protected]>"]
description = "Node testbed for Sassafras consensus."
homepage = "https://substrate.io/"
edition = "2021"
license = "Unlicense"
publish = false
build = "build.rs"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[[bin]]
name = "node-sassafras"

[dependencies]
clap = { version = "4.0.9", features = ["derive"] }
futures = { version = "0.3.21", features = ["thread-pool"]}

sc-cli = { version = "0.10.0-dev", path = "../../../client/cli" }
sp-core = { version = "21.0.0", path = "../../../primitives/core" }
sc-executor = { version = "0.10.0-dev", path = "../../../client/executor" }
sc-network = { version = "0.10.0-dev", path = "../../../client/network" }
sc-service = { version = "0.10.0-dev", path = "../../../client/service" }
sc-telemetry = { version = "4.0.0-dev", path = "../../../client/telemetry" }
sc-keystore = { version = "4.0.0-dev", path = "../../../client/keystore" }
sc-transaction-pool = { version = "4.0.0-dev", path = "../../../client/transaction-pool" }
sc-transaction-pool-api = { version = "4.0.0-dev", path = "../../../client/transaction-pool/api" }
sc-offchain = { version = "4.0.0-dev", path = "../../../client/offchain" }
sc-consensus-sassafras = { version = "0.3.4-dev", path = "../../../client/consensus/sassafras" }
sp-consensus-sassafras = { version = "0.3.4-dev", path = "../../../primitives/consensus/sassafras" }
sp-consensus = { version = "0.10.0-dev", path = "../../../primitives/consensus/common" }
sc-consensus = { version = "0.10.0-dev", path = "../../../client/consensus/common" }
sc-consensus-grandpa = { version = "0.10.0-dev", path = "../../../client/consensus/grandpa" }
sp-consensus-grandpa = { version = "4.0.0-dev", path = "../../../primitives/consensus/grandpa" }
sc-client-api = { version = "4.0.0-dev", path = "../../../client/api" }
sp-runtime = { version = "24.0.0", path = "../../../primitives/runtime" }
sp-timestamp = { version = "4.0.0-dev", path = "../../../primitives/timestamp" }
sp-inherents = { version = "4.0.0-dev", path = "../../../primitives/inherents" }
sp-keyring = { version = "24.0.0", path = "../../../primitives/keyring" }
frame-system = { version = "4.0.0-dev", path = "../../../frame/system" }
pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, path = "../../../frame/transaction-payment" }

# These dependencies are used for the node template's RPCs
jsonrpsee = { version = "0.16.2", features = ["server"] }
sc-rpc = { version = "4.0.0-dev", path = "../../../client/rpc" }
sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
sc-rpc-api = { version = "0.10.0-dev", path = "../../../client/rpc-api" }
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
sp-block-builder = { version = "4.0.0-dev", path = "../../../primitives/block-builder" }
sc-basic-authorship = { version = "0.10.0-dev", path = "../../../client/basic-authorship" }
substrate-frame-rpc-system = { version = "4.0.0-dev", path = "../../../utils/frame/rpc/system" }
pallet-transaction-payment-rpc = { version = "4.0.0-dev", path = "../../../frame/transaction-payment/rpc/" }

# These dependencies are used for runtime benchmarking
frame-benchmarking = { version = "4.0.0-dev", path = "../../../frame/benchmarking" }
frame-benchmarking-cli = { version = "4.0.0-dev", path = "../../../utils/frame/benchmarking-cli" }

# Local Dependencies
node-sassafras-runtime = { version = "0.3.4-dev", path = "../runtime" }

[build-dependencies]
substrate-build-script-utils = { version = "3.0.0", path = "../../../utils/build-script-utils" }

[features]
default = []
runtime-benchmarks = [
"node-sassafras-runtime/runtime-benchmarks"
]
use-session-pallet = [
"node-sassafras-runtime/use-session-pallet"
]
7 changes: 7 additions & 0 deletions bin/node-sassafras/node/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};

fn main() {
generate_cargo_keys();

rerun_if_git_head_changed();
}
Loading
Loading