This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Verify Grandpa proofs from within runtime #4167
Closed
HCastano
wants to merge
34
commits into
paritytech:hc-jp-bridge-module
from
HCastano:hc-verify-grandpa-proofs-from-runtime
Closed
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 e3d3644
Add more skeleton code
HCastano ce3385c
Clean up some warnings
HCastano b4daa86
Get the mock runtime for tests set up
HCastano 9f27106
Add BridgeId => Bridge mapping
HCastano e623cb8
Allow tracking of multiple bridges
HCastano 74c63d0
Logic for checking Substrate proofs from within runtime module. (#3783)
jimpo 73fa3cb
Make tests work after the changes introduced in #3793 (#3874)
HCastano 4836977
Check given Grandpa validator set against set found in storage (#3915)
HCastano 49ae74b
Verify Ancestry between Headers (#3963)
HCastano 50c6a2f
Use new StorageProof type from #3834
HCastano 19295c5
Store block headers instead of individual parts of header
HCastano ca20bb3
Steal `justification.rs` from `grandpa-finality` crate
HCastano 97e36f4
WIP: Make `justification.rs` no_std compatable
HCastano 8e3e8ed
Swap HashMap for BTreeMap
HCastano efdaed8
Verify Grandpa signatures in `no_std`
HCastano 635c898
Create a wrapper type for Block::Hash
HCastano f310f66
Clean up comments and imports a bit
HCastano fc3712f
Bump `finality-grandpa` from v0.9.0 to v0.9.1
HCastano 16fcd41
Address some review comments
HCastano 5ac5065
WIP: Verify justifications from module interface
HCastano bb01336
Fix compilation issues.
jimpo 0b11a29
Make old tests compile again
HCastano 0ddbc40
WIP: Add test for creating justifications
HCastano 3a6bc0d
Add a test for verifying and updating new headers
HCastano be98ec8
Add test for checking that commits were signed by correct authorities
HCastano 6b3ec92
Use a non-hardcoded authority set id
HCastano cc49207
Handle ClientErrors in a nicer way
HCastano ee7ef25
Turn off `std` feature for some imports
HCastano 91935c4
Get rid of `state-machine` dependency
HCastano 0012fc3
Fix some review comments
HCastano 6e4fd3e
Remove dependency on `client`
HCastano 7cbed95
Unbreak the tests that depended on `client`
HCastano 975e2a6
Add TODO for removing usage of `core/finality-grandpa`
HCastano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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,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/" } | ||
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", | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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