-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support embedded full/light node clients. #91
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c9b942d
Add support for light clients.
dvc94ch e8b115c
Add wasm toolchain to ci.
dvc94ch a265ee2
Fix ci tests.
dvc94ch 116097c
Address review comments.
dvc94ch ff96861
Use expect instead of unwrap.
dvc94ch 58f00de
Purge light client chain too.
dvc94ch fdb17a5
Add README section.
dvc94ch 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
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
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 @@ | ||
dev-chain.json |
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,30 @@ | ||
[package] | ||
name = "substrate-subxt-client" | ||
version = "0.1.0" | ||
authors = ["David Craven <david@craven.ch>", "Parity Technologies <admin@parity.io>"] | ||
edition = "2018" | ||
dvc94ch marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
license = "GPL-3.0" | ||
repository = "https://github.com/paritytech/substrate-subxt" | ||
documentation = "https://docs.rs/substrate-subxt-client" | ||
homepage = "https://www.parity.io/" | ||
description = "Embed a substrate node into your subxt application." | ||
keywords = ["parity", "substrate", "blockchain"] | ||
|
||
[dependencies] | ||
async-std = "=1.5.0" | ||
futures = { version = "0.3.5", features = ["compat"] } | ||
futures01 = { package = "futures", version = "0.1.29" } | ||
jsonrpsee = "0.1.0" | ||
log = "0.4.8" | ||
sc-network = { version = "0.8.0-rc3", default-features = false } | ||
sc-service = { version = "0.8.0-rc3", default-features = false } | ||
serde_json = "1.0.53" | ||
sp-keyring = "2.0.0-rc3" | ||
thiserror = "1.0.19" | ||
|
||
[dev-dependencies] | ||
async-std = { version = "=1.5.0", features = ["attributes"] } | ||
env_logger = "0.7.1" | ||
node-template = { git = "https://github.com/paritytech/substrate" } | ||
substrate-subxt = { path = ".." } |
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,5 @@ | ||
#!/bin/sh | ||
NODE_TEMPLATE=../../substrate/target/release/node-template | ||
$NODE_TEMPLATE purge-chain --dev | ||
$NODE_TEMPLATE build-spec --dev > dev-chain.json | ||
rm -rf /tmp/subxt-light-client |
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,4 @@ | ||
#!/bin/sh | ||
NODE_TEMPLATE=../../substrate/target/release/node-template | ||
$NODE_TEMPLATE purge-chain --chain=dev-chain.json | ||
rm -rf /tmp/subxt-light-client |
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,3 @@ | ||
#!/bin/sh | ||
NODE_TEMPLATE=../../substrate/target/release/node-template | ||
$NODE_TEMPLATE --chain=dev-chain.json --alice |
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.
What are these patches for? Something not yet included in
rc3
? It might prevent publishing the main crateThere 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.
The problem is that node template isn't published, but it's required for the tests. So this makes sure that when it's checked out locally it uses the same versions as the template. I was hoping this trick would allow publish to crates.io