-
Notifications
You must be signed in to change notification settings - Fork 282
introduce jsonrpsee client abstraction + kill HTTP support. #341
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
c8b0907
PoC async rpc client
niklasad1 a45bf14
add client example should be removed from this repo
niklasad1 c2a9c75
fmt
niklasad1 1fb8c8d
cargo fmt
niklasad1 212d79f
subxt client tests
niklasad1 1a3b5a9
cargo fmt
niklasad1 f9860e7
fix some nits
niklasad1 f21ee1a
Merge remote-tracking branch 'origin/master' into na-jsonrpsee-core-c…
niklasad1 a59db8d
try nightly for all CI jobs
jsdw c5b3104
need wasm also for CI
jsdw de869e8
wasm for nightly run too
jsdw fedf6bf
Merge remote-tracking branch 'origin/master' into na-jsonrpsee-core-c…
niklasad1 8e6b277
client: add missing features
niklasad1 752c19e
update jsonrpsee
niklasad1 2bfc389
hacky
niklasad1 bca1473
hacky update jsonrpsee
niklasad1 e2a93e3
use jsonrpsee crates.io release
niklasad1 32555aa
ci: pin nightly 2021-12-15
niklasad1 8d449c3
pin nightly to 2021-12-15
niklasad1 bb10358
Merge remote-tracking branch 'origin/master' into na-jsonrpsee-core-c…
niklasad1 937e9a6
fix build
niklasad1 1551e70
fmt
niklasad1 65fb71a
compile please
niklasad1 c988c4a
rewrite me
niklasad1 8dc7dda
Merge remote-tracking branch 'origin/master' into na-jsonrpsee-core-c…
niklasad1 ae24d3b
fixes
niklasad1 fa3b905
fixes
niklasad1 f603d68
pre-generate metadata
niklasad1 d433828
Merge remote-tracking branch 'origin/na-jsonrpsee-core-client' into n…
niklasad1 a5df40a
fix nit
niklasad1 a09e8a8
get rid of needless deps
niklasad1 b53ae9f
remove embedded client
niklasad1 b9bc61f
Update Cargo.toml
niklasad1 b21fde8
Update subxt/Cargo.toml
niklasad1 4053e30
Update subxt/Cargo.toml
niklasad1 eed8238
Update subxt/src/client.rs
niklasad1 5182b95
Update subxt/src/rpc.rs
niklasad1 9887b39
Update test-runtime/build.rs
niklasad1 73623c1
cargo fmt
niklasad1 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
Merge remote-tracking branch 'origin/master' into na-jsonrpsee-core-c…
…lient
- Loading branch information
commit 8dc7dda99ca7eb0b84ad5880e78aa7f0b44d4cb1
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,52 +1,12 @@ | ||
| [workspace] | ||
| members = [".", "cli", "codegen", "macro", "test-runtime", "client"] | ||
|
|
||
| [package] | ||
| name = "subxt" | ||
| version = "0.15.0" | ||
| authors = ["Parity Technologies <[email protected]>"] | ||
| edition = "2021" | ||
|
|
||
| license = "GPL-3.0" | ||
| readme = "README.md" | ||
| repository = "https://github.com/paritytech/subxt" | ||
| documentation = "https://docs.rs/subxt" | ||
| homepage = "https://www.parity.io/" | ||
| description = "Submit extrinsics (transactions) to a substrate node via RPC" | ||
| keywords = ["parity", "substrate", "blockchain"] | ||
| include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"] | ||
|
|
||
| [dependencies] | ||
| async-trait = "0.1.49" | ||
| bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] } | ||
| codec = { package = "parity-scale-codec", version = "2", default-features = false, features = ["derive", "full", "bit-vec"] } | ||
| chameleon = "0.1.0" | ||
| scale-info = { version = "1.0.0", features = ["bit-vec"] } | ||
| futures = "0.3.13" | ||
| hex = "0.4.3" | ||
| jsonrpsee = { version = "0.7.0", features = ["macros", "async-client", "client-ws-transport"] } | ||
| log = "0.4.14" | ||
| num-traits = { version = "0.2.14", default-features = false } | ||
| serde = { version = "1.0.124", features = ["derive"] } | ||
| serde_json = "1.0.64" | ||
| thiserror = "1.0.24" | ||
|
|
||
| subxt-macro = { version = "0.1.0", path = "macro" } | ||
|
|
||
| sp-core = { git = "https://github.com/paritytech/substrate/", branch = "master", default-features = false } | ||
| sp-runtime = { git = "https://github.com/paritytech/substrate/", branch = "master", default-features = false } | ||
| sp-version = { package = "sp-version", git = "https://github.com/paritytech/substrate/", branch = "master" } | ||
|
|
||
| frame-metadata = "14.0.0" | ||
|
|
||
| [dev-dependencies] | ||
| sp-arithmetic = { git = "https://github.com/paritytech/substrate/", branch = "master", default-features = false } | ||
| assert_matches = "1.5.0" | ||
| async-std = { version = "1.9.0", features = ["attributes", "tokio1"] } | ||
| env_logger = "0.8.3" | ||
| tempdir = "0.3.7" | ||
| wabt = "0.10.0" | ||
| which = "4.0.2" | ||
| test-runtime = { path = "test-runtime" } | ||
|
|
||
| sp-keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate/", branch = "master" } | ||
| members = [ | ||
| "cli", | ||
| "codegen", | ||
| "examples", | ||
| "macro", | ||
| "subxt", | ||
| "test-runtime", | ||
| # TODO(niklasad1): remove to separate repo | ||
| "client" | ||
| ] | ||
This file contains hidden or 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 hidden or 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 hidden or 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,76 @@ | ||
| # Release Checklist | ||
|
|
||
| These steps assume that you've checked out the Subxt repository and are in the root directory of it. | ||
|
|
||
| We also assume that ongoing work done is being merged directly to the `master` branch. | ||
|
|
||
| 1. Ensure that everything you'd like to see released is on the `master` branch. | ||
|
|
||
| 2. Create a release branch off `master`, for example `release-v0.17.0`. Decide how far the version needs to be bumped based | ||
| on the changes to date. If unsure what to bump the version to (e.g. is it a major, minor or patch release), check with the | ||
| Parity Tools team. | ||
|
|
||
| 3. Check that you're happy with the current documentation. | ||
|
|
||
| ``` | ||
| cargo doc --open --all-features | ||
| ``` | ||
|
|
||
| CI checks for broken internal links at the moment. Optionally you can also confirm that any external links | ||
| are still valid like so: | ||
|
|
||
| ``` | ||
| cargo install cargo-deadlinks | ||
| cargo deadlinks --check-http -- --all-features | ||
| ``` | ||
|
|
||
| If there are minor issues with the documentation, they can be fixed in the release branch. | ||
|
|
||
| 4. Bump the crate version in `Cargo.toml` to whatever was decided in step 2 for `subxt-codegen`, `subxt-macro`, `subxt` and `subxt-cli`. | ||
|
|
||
| 5. Update `CHANGELOG.md` to reflect the difference between this release and the last. If you're unsure of | ||
| what to add, check with the Tools team. See the `CHANGELOG.md` file for details of the format it follows. | ||
|
|
||
| Any [closed PRs](https://github.com/paritytech/subxt/pulls?q=is%3Apr+is%3Aclosed) between the last release and | ||
| this release branch should be noted. | ||
|
|
||
| 6. Commit any of the above changes to the release branch and open a PR in GitHub with a base of `master`. | ||
|
|
||
| 7. Once the branch has been reviewed and passes CI, merge it. | ||
|
|
||
| 8. Now, we're ready to publish the release to crates.io. | ||
|
|
||
| Checkout `master`, ensuring we're looking at that latest merge (`git pull`). | ||
|
|
||
| The crates in this repository need publishing in a specific order, since they depend on each other. | ||
| Additionally, `subxt-macro` has a circular dev dependency on `subxt`, so we use `cargo hack` to remove | ||
| dev dependencies (and `--allow-dirty` to ignore the git changes as a result) to publish it. | ||
|
|
||
| So, first install `cargo hack` with `cargo install cargo hack`. Next, you can run something like the following | ||
| command to publish each crate in the required order (allowing a little time inbetween each to let `crates.io` catch up) | ||
| with what we've published). | ||
|
|
||
| ``` | ||
| (cd codegen && cargo publish) && \ | ||
| sleep 10 && \ | ||
| (cd macro && cargo hack publish --no-dev-deps --allow-dirty) && \ | ||
| sleep 10 && \ | ||
| (cd subxt && cargo publish) && \ | ||
| sleep 10 && \ | ||
| (cd cli && cargo publish); | ||
| ``` | ||
|
|
||
| If you run into any issues regarding crates not being able to find suitable versions of other `subxt-*` crates, | ||
| you may just need to wait a little longer and then run the remaining portion of that command. | ||
|
|
||
| 9. If the release was successful, tag the commit that we released in the `master` branch with the | ||
| version that we just released, for example: | ||
|
|
||
| ``` | ||
| git tag -s v0.17.0 # use the version number you've just published to crates.io, not this one | ||
| git push --tags | ||
| ``` | ||
|
|
||
| Once this is pushed, go along to [the releases page on GitHub](https://github.com/paritytech/subxt/releases) | ||
| and draft a new release which points to the tag you just pushed to `master` above. Copy the changelog comments | ||
| for the current release into the release description. |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| [package] | ||
| name = "subxt-cli" | ||
| version = "0.2.0" | ||
| version = "0.16.0" | ||
| authors = ["Parity Technologies <[email protected]>"] | ||
| edition = "2021" | ||
|
|
||
|
|
@@ -16,7 +16,7 @@ path = "src/main.rs" | |
|
|
||
| [dependencies] | ||
| # perform subxt codegen | ||
| subxt-codegen = { version = "0.2.0", path = "../codegen" } | ||
| subxt-codegen = { version = "0.16.0", path = "../codegen" } | ||
| # parse command line args | ||
| structopt = "0.3.25" | ||
| # make the request to a substrate node to get the metadata | ||
|
|
@@ -36,4 +36,4 @@ scale = { package = "parity-scale-codec", version = "2.3.0", default-features = | |
| # handle urls to communicate with substrate nodes | ||
| url = { version = "2.2.2", features = ["serde"] } | ||
| # generate the item mod for codegen | ||
| syn = "1.0.80" | ||
| syn = "1.0.80" | ||
This file contains hidden or 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
Oops, something went wrong.
You are viewing a condensed version of this merge commit. You can view the full changes here.
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.
Uh oh!
There was an error while loading. Please reload this page.