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

Verify Grandpa proofs from within runtime #4167

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
598d8c9
Create `bridge` module skeleton
HCastano Sep 25, 2019
e3d3644
Add more skeleton code
HCastano Sep 26, 2019
ce3385c
Clean up some warnings
HCastano Sep 27, 2019
b4daa86
Get the mock runtime for tests set up
HCastano Oct 1, 2019
9f27106
Add BridgeId => Bridge mapping
HCastano Oct 1, 2019
e623cb8
Allow tracking of multiple bridges
HCastano Oct 4, 2019
74c63d0
Logic for checking Substrate proofs from within runtime module. (#3783)
jimpo Oct 10, 2019
73fa3cb
Make tests work after the changes introduced in #3793 (#3874)
HCastano Oct 23, 2019
4836977
Check given Grandpa validator set against set found in storage (#3915)
HCastano Nov 1, 2019
49ae74b
Verify Ancestry between Headers (#3963)
HCastano Nov 4, 2019
50c6a2f
Use new StorageProof type from #3834
HCastano Nov 11, 2019
19295c5
Store block headers instead of individual parts of header
HCastano Nov 14, 2019
ca20bb3
Steal `justification.rs` from `grandpa-finality` crate
HCastano Nov 15, 2019
97e36f4
WIP: Make `justification.rs` no_std compatable
HCastano Nov 17, 2019
8e3e8ed
Swap HashMap for BTreeMap
HCastano Nov 19, 2019
efdaed8
Verify Grandpa signatures in `no_std`
HCastano Nov 19, 2019
635c898
Create a wrapper type for Block::Hash
HCastano Nov 20, 2019
f310f66
Clean up comments and imports a bit
HCastano Nov 21, 2019
fc3712f
Bump `finality-grandpa` from v0.9.0 to v0.9.1
HCastano Nov 22, 2019
16fcd41
Address some review comments
HCastano Nov 26, 2019
5ac5065
WIP: Verify justifications from module interface
HCastano Nov 26, 2019
bb01336
Fix compilation issues.
jimpo Nov 26, 2019
0b11a29
Make old tests compile again
HCastano Nov 28, 2019
0ddbc40
WIP: Add test for creating justifications
HCastano Dec 2, 2019
3a6bc0d
Add a test for verifying and updating new headers
HCastano Dec 3, 2019
be98ec8
Add test for checking that commits were signed by correct authorities
HCastano Dec 4, 2019
6b3ec92
Use a non-hardcoded authority set id
HCastano Dec 4, 2019
cc49207
Handle ClientErrors in a nicer way
HCastano Dec 4, 2019
ee7ef25
Turn off `std` feature for some imports
HCastano Dec 9, 2019
91935c4
Get rid of `state-machine` dependency
HCastano Dec 9, 2019
0012fc3
Fix some review comments
HCastano Dec 9, 2019
6e4fd3e
Remove dependency on `client`
HCastano Dec 9, 2019
7cbed95
Unbreak the tests that depended on `client`
HCastano Dec 10, 2019
975e2a6
Add TODO for removing usage of `core/finality-grandpa`
HCastano Dec 10, 2019
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
39 changes: 29 additions & 10 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ members = [
"srml/assets",
"srml/aura",
"srml/balances",
"srml/bridge",
"srml/contracts",
"srml/contracts/rpc",
"srml/collective",
Expand Down
4 changes: 2 additions & 2 deletions core/finality-grandpa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ inherents = { package = "substrate-inherents", path = "../../core/inherents" }
network = { package = "substrate-network", path = "../network" }
srml-finality-tracker = { path = "../../srml/finality-tracker" }
fg_primitives = { package = "substrate-finality-grandpa-primitives", path = "primitives" }
grandpa = { package = "finality-grandpa", version = "0.9.0", features = ["derive-codec"] }
grandpa = { package = "finality-grandpa", version = "0.9.1", features = ["derive-codec"] }

[dev-dependencies]
grandpa = { package = "finality-grandpa", version = "0.9.0", features = ["derive-codec", "test-helpers"] }
grandpa = { package = "finality-grandpa", version = "0.9.1", features = ["derive-codec", "test-helpers"] }
network = { package = "substrate-network", path = "../network", features = ["test-helpers"] }
keyring = { package = "substrate-keyring", path = "../keyring" }
test-client = { package = "substrate-test-runtime-client", path = "../test-runtime/client"}
Expand Down
43 changes: 43 additions & 0 deletions srml/bridge/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[package]
name = "srml-bridge"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false }
fg = { package = "substrate-finality-grandpa", path = "../../core/finality-grandpa/" }
Copy link
Contributor

Choose a reason for hiding this comment

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

You can't import this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm gonna wait on #3868 before getting rid of it

fg_primitives = { package = "substrate-finality-grandpa-primitives", path ="../../core/finality-grandpa/primitives", default-features = false }
grandpa = { package = "finality-grandpa", version = "0.9.1", default-features = false, features = ["derive-codec"] }
hash-db = { version = "0.15.2", default-features = false }
primitives = { package = "substrate-primitives", path = "../../core/primitives", default-features = false }
num = { package = "num-traits", version = "0.2", default-features = false }
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
runtime-io = { package = "sr-io", path = "../../core/sr-io", default-features = false }
session = { package = "srml-session", path = "../session", default-features = false, features = ["historical"] }
serde = { version = "1.0", optional = true }
sr-primitives = { path = "../../core/sr-primitives", default-features = false }
support = { package = "srml-support", path = "../support", default-features = false }
system = { package = "srml-system", path = "../system", default-features = false }
trie = { package = "substrate-trie", path = "../../core/trie", default-features = false }

[dev-dependencies]
client = { package = "substrate-client", path = "../../core/client" }
keyring = { package = "substrate-keyring", path = "../../core/keyring" }
state-machine = { package = "substrate-state-machine", path = "../../core/state-machine" }
test-client = { package = "substrate-test-runtime-client", path = "../../core/test-runtime/client" }

[features]
default = ["std"]
std = [
"serde",
"codec/std",
"session/std",
"sr-primitives/std",
"support/std",
"system/std",
"trie/std",
"runtime-io/std",
]
Loading