- Renamed all crate names from subxt-* to pezkuwi-subxt-*
- Updated codegen to use pezsp_runtime, pezsp_core, pezframe_support instead of sp_runtime, sp_core, frame_support
- Replaced all internal references from subxt_* to pezkuwi_subxt_*
- Added local path dependencies to Pezkuwi SDK crates
- Updated workspace configuration for edition 2024
* v0.50.0: Integrate frame-decode, redo storage APIs and break up Error. (#2100)
* WIP integrating new frame-decode and working out new storage APIS
* WIP: first pass adding new storage things to subxt-core
* Second pass over Address type and start impl in Subxt
* WIP new storage APIs
* WIP New storage APIs roughly completed, lots of errors still
* Remove PlainorMap enum; plain and map values now use same struct to simplify usage
* Begin 'fixing' errors
* WIP splitting errors and tidying payload/address traits
* Get subxt-core compiling
* Small fixes in subxt-core and remove metadata mod
* subxt-core: cargo check --all-targets passes
* Fix test
* WIP starting to update subxt from subxt-core changes
* WIP splitting up subxt errors into smaller variants
* WIP errors: add DispatchError errors
* Port new Storage APIs to subxt-core
* cargo check -p subxt passes
* Quick-fix errors in subxt-cli (explore subcommand)
* fmt
* Finish fixing codegen up and start fixing examples
* get Subxt examples compiling and bytes_at for constants
* Add some arcs to limit lifetimes in subxt/subxt-core storage APIs
* A little Arcing to allow more method chaining in Storage APIs, aligning with Subxt
* Update codegen test
* cargo check --all-targets passing
* cargo check --features 'unstable-light-client' passing
* clippy
* Remove unused dep in subxt
* use published frame-decode
* fix wasm-example
* Add new tx extension to fix daily tests
* Remove unused subxt_core::dynamic::DecodedValue type
* Update book to match changes
* Update docs to fix more broken bits
* Add missing docs
* fmt
* allow larger result errs for now
* Add missing alloc imports in subxt-core
* Fix doc tests and fix bug getting constant info
* Fix V14 -> Metadata transform for storage & constants
* Fix parachain example
* Fix FFI example
* BlockLength decodes t ostruct, not u128
* use fetch/iter shorthands rather than entry in most storage tests
* Fix some integration tests
* Fix Runtime codegen tests
* Expose the dynamic custom_value selecter and use in a UI test
* Update codegen metadata
* Tidy CLI storage query and support (str,str) as a storage address
* Add (str,str) as valid constant address too
* Show string tuple in constants example
* Via the magic of traits, avoid needing any clones of queries/addresses and accept references to them
* clippy
* [v0.50] update scale-info-legacy and frame-decode to latest (#2119)
* bump scale-info-legacy and frame-decode to latest
* Remove something we don't need in this PR
* Fully remove unused for now dep
* [v0.50] Convert historic metadata to subxt::Metadata (#2120)
* First pass converting historic metadatas to our subxt::Metadata type
* use published frame-decode
* fmt and rename legacy metadata macro
* Enable legacy feature where needed in subxt_metadata so it compiles on its own
* Use cargo hack more in CI and fix subxt-metadata features
* Add tests for metadata conversion (need to optimise; some too expensive right now
* Address performance and equality issues in metadata conversion testing
* fmt
* fmt all
* clippy
* Fix a doc link
* Test codegen and fixes to make it work
* Remove local frame-decode patch
* bump frame-decode to latest
* [v0.50.0] Allow visiting extrinsic fields in subxt_historic (#2124)
* Allow visiting extrinsic fields
* fmt
* Don't use local scale-decode dep
* Clippy and tidy
* Extend 'subxt codegen' CLI to work with legacy metadatas
* Simplify historic extrinsics example now that AccountId32s have paths/names
* clippy
* clippy
* clippy..
* Allow visiting storage values, too, and clean up extrinsic visiting a little by narrowing lifetime
* Try to fix flaky test
* Add custom value decode to extrinsics example
* Remove useless else branch ra thought I needed
* Simplify examples
* Prep to release v0.0.5 (#2126)
* Remove codec::Encode and codec::Decode from generated APIs by default
* clippy fixes
* clippy
* More fixes, and CompactAs only if Encode/Decode
* revert println in example
* fix lightclient test
* fix docs
* Fix another rust doc comment
* Fix failing storage test
* Remove now-unnecessary test
* clippy
* clippy
* Remove pointless clone
* TransactionExtensions basic support for V5 VerifySignature and renames
* WIP: subxt-core v5 transaction support
* Subxt to support V5 extrinsics
* WIP tests failing with wsm trap error
* Actually encode mortality to fix tx encode issue
* fmt
* rename to sign_with_account_and_signature
* Add explicit methods for v4 and v5 ext construction
* clippy
* fix wasm example and no mut self where not needed
* fix doc example
* another doc fix
* Add tests for tx encoding and fix v5 encode issue
* add copyright and todo
* refactor APIs to have clear v4/v5 split in core and slightly nicer split in subxt proper
* rename Partial/SubmittableExtrinsic to *Transaction
* Remove SignerT::address since it's not needed
* doc fixes
* fmt
* doc fixes
* Fix comment number
* Clarify panic behaviour of inject_signature
* fmt
* remove substrate compat
* add hacky example
* simplify substrate-compat example
* simplify substrate-compat example
* cargo fmt
* fix build
* add more examples
* fix nit
* fix test build
* Update subxt/examples/substrate_compat_signer.rs
Co-authored-by: James Wilson <james@jsdw.me>
* keep only polkadot signer example
* remove more substrate compat related stuff
* fix example
* link to substrate signer example in book
* Update subxt/src/book/usage/transactions.rs
* Update subxt/src/book/usage/transactions.rs
* address grumbles
* fix nits
---------
Co-authored-by: James Wilson <james@jsdw.me>
* WIP using frame-decode for core extrinsic decode logic
* fmt
* Fix dependabot config
* clippy
* tidy some imports
* Fix a couple of tests
* Update to frame-decode 0.0.7
* fix docs
* Decode exts earlier to avoid doing it every iter/find step
* frame-decode to 0.1.0
* fmt
* clippy
* fix wasm example
* doc test fixes
* Fix test
* Fix a couple of subxt_core tests
* Add a basic version of the CheckMetadataHash signed extension
* update example too
* encode None to signer payload when no hash provided
* Enable decoding txs using CheckMetadataHash, too
* Tidy up decoding CheckMetadataHash
* add ethereum example
The ethereum config doesn't work with the default PolkadotConfig which
this shows how to do.
Tested with a frontier node
* address grumbles
* Update subxt/examples/tx_basic_frontier.rs
* Update subxt/examples/tx_basic_frontier.rs
* Move Extrinsic decoding things to subxt_core and various tidy-ups
* A couple more fixes and fmt
* first pass moving tx logic to subxt_core
* cargo fmt
* fix wasm example
* clippy
* more clippy
* WIP Adding examples and such
* Move storage functionality more fully to subxt_core and nice examples for storage and txs
* Add example for events
* consistify how addresses/payloads are exposed in subxt-core and add runtime API fns
* Add runtime API core example
* fmt
* remove scale-info patch
* Add a little to the top level docs
* swap args around
* clippy
* cargo fmt and fix wasm-example
* doc fixes
* no-std-ise new subxt-core additions
* alloc, not core
* more no-std fixes
* A couple more fixes
* Add back extrinsic decode test
* start migrating, broken
* first iteration of updating
* fmt and clippy
* add Composite<u32> decoding via scale value patch
* bump scale type gen versions
* fix decoding with new scale decode
* compiling with changed deps
* core utils, condig, client, metadata
* core crate compiling
* signer crate no once lock
* add core to no-std-tests, change imports
* broken commit, start pulling everything together in subxt
* port more things to subxt
* events in core crate, extrinsics sadly much more difficult
* almost all examples pass again
* dynamic values fix in examples
* fix no std issue and fmt
* remove unused dependencies
* fix lightclient impl
* runtime version refactor
* formatting and addressing nits
* more comments addressed
* update wasm example and no-std-signer tests
* other nits and error impl on signer errors
* fix feature flag
* fix runtime version refactor
* fix doc links
* fix integration tests
* fix feature flag gated client state
* fix native feature in CI
* fix lightclient utils
* make imports more lean in subxt-core
* integrate changes from subxt-core imports into subxt
* other changes in subxt simplify imports more
* fix and docs
* doc false for cli
* fix clippy
* remove events block hash in tests
* codegen no-std support in generated code
* export alloc crate for no-std codegen
* fix doc test
* implement James comments
* remove std traits, use core traits instead
* address nits
* remove unusued dep in no-std tests
* fix Box import in no_std
* sp-crypto-hashing instead of sp-core-hashing
* bump scale-typegen, add no std codegen tests
* fix some things
* replace unmaintained derivative with derive_where to remove non-canonical warnings
* fmt
* remove unused dep
* fix deps
* update artifacts to fix type ID mismatches
* bump to latest scale-typegen
---------
Co-authored-by: James Wilson <james@jsdw.me>
* WIP second pass over light client code for simpler API
* First pass new light client
* pub(crate) LightClientRpc::new_raw(), and fmt
* Update examples and add back a way to configure boot nodes and fetch chainspec from a URL
* Fix light client examples
* remove unused deps and tidy lightclient feature flags
* fix wasm error
* LightClientRpc can be cloned
* update light client tests
* Other small fixes
* exclude mod unless jsonrpsee
* Fix wasm-lightclient-tests
* add back docsrs bit and web+native feature flag compile error
* update book and light client example names
* fix docs
* asset hub example and book adjustment
* formatting
* recursive derives
* polkadot monitor example and book adjustments
* formatting
* adjust docs and examples, add dynamic example
* james suggestions
* fmt
* chore(subxt/src): typo fix (#1370)
* rpcmethods
* followstr
* mod and else
* Weekly Cronjob fetching artifacts and generating polkadot.rs file. (#1352)
* github CI action cronjob
* add commit message
* fix the CI yml files
* binary crate for CI script with substrate-runner
* update the CI script
* correct the artifacts script
* remove bash script
---------
Co-authored-by: James Wilson <james@jsdw.me>
Co-authored-by: Pan chao <152830401+Pan-chao@users.noreply.github.com>
* integrate scale-typegen, remove types mod
* reintroduce default substitutes and derives
* support runtime_types only again
* generating polkadot.rs ok
* update scale-typegen to discrete error types
* scale-typegen-api-changes
* add note about UncheckedExtrinsic in default substitutes
* add resursive attributes and derives
* adjust example where Clone bound recursive
* move scale-typegen dependency to workspace
* expose default typegen settings
* lightclient: Fix wasm socket closure called after being dropped (#1289)
* lightclient: Close wasm socket while dropping from connecting state
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Construct one time only closures
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* testing: Enable console logs for lightclient WASM testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Separate wakes and check connectivity on poll_read
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Close the socket depending on internal state
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert "lightclient: Separate wakes and check connectivity on poll_read"
This reverts commit 866094001d4c0b119a80ed681a74b323f74eae1b.
* lightclient: Return pending if socket is opening from poll_read
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Close the socket on `poll_close`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Reset closures on Drop to avoid recursive invokation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Close the socket if not already closing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* workflows: Install rustup component for building substrate (#1295)
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Command to fetch chainSpec and optimise its size (#1278)
* cli: Add chainSpec command
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli/chainSpec: Move to dedicated module
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Compute the state root hash
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Remove code substitutes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* artifacts: Update polkadot.json
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* scripts: Generate the chain spec
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Remove testing artifacts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Apply rustfmt
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Introduce feature flag for smoldot dependency
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Rename chain-spec to chain-spec-pruning
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* scripts: Update chain-spec command
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* remove comments and unused args
* Update substrate- and signer-related dependencies (#1297)
* update crypto dependencies, adjust keypair
* add scale_info::TypeInfo derive in some places
* add multi signature derive
* fix lock file
* fix lock file again :|
* adjust to new interface in scale-typegen
* use released scale typegen
* reintroduce type aliases
* introduce type aliases again using scale-typegen
* cargo fmt and clippy
* reconcile changes with master branch
* update polkadot.rs
* bump scale-typgen to fix substitution
* implemented Alex suggestions, regenerated polkadot.rs (did not change)
* resolve conflicts in Cargo.lock
* make expect messages more clear
* correct typos
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
* codegen: Generate type alias for storage return types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Generate type alias for call function arguments
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* testing: Update polkadot.rs code from commit 2e2a75ff81
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Type aliases for runtime API parameters
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Type alias for runtime apis output
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* storage: Change path of the aliased module
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Adjust module indentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Do not alias for api::runtime_types with unresolved generics
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Fix and document runtime API alias generation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update artifacts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update cargo.lock file
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Generate composite structs with alias unnamed fields
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* testing: Update polkadot.rs file
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Alias storage unnamed parameters
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update polkadot.rs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* examples: Change polkadot to rococo runtime
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Fix compiling tests in the codegen crate
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Extend storage test with alias module
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli/tests: Adjust exepcted commands to the latest metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Remove missleading comment and docs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Ensure unique names for generated runtime API types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen/tests: Test expected runtime type generation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen/tests: Check duplicate params in runtime APIs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen/tests: Test colliding names of type aliases and parameters
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Separate alias module from struct definition
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update polkadot.rs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Remove outdated docs from composite def
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Remove unstable lints that cause compile warnings
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cargo: Switch to workspace lints
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cargo: Fix codec package at root level
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cargo: Move profiles to the root level
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Fix lightclient and metadata crates
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert "cargo: Fix codec package at root level"
This reverts commit cdf9e1628d708a972673eb3a9e967b6896edbd73.
* Fix complexity clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cargo: Remove lints to be replaced by `cargo machete`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cargo: Remove unused dependencies (detected by machete)
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* ci: Add machete step
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cargo: Bump rust version
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* ci: Rename machete step
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* ci: Rename cargo machete step
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Add example using legacy rpc
* Illustrate how account_nonce and system_acc_next eventaully cathces up
* Adapt and add rpc_legacy example to book. Add missing light_client example too
* cargo fmt
---------
Co-authored-by: Fredrik Simonsson <fredrik@nodle.com>
* First pass making matching on signed exts more general and handlng SkipCheckifFeeless
* remove unneeded derives (only exts we can decode into are handled by the user)
* No SkipCheckIfFeeless in integration tests either
* Cargo fmt
* Remove SkipCheckIfFeeless specific logic
* clippy
* matches to just return bool, not result
* remove now-invalid comment
* return error from find if .iter() errors
* lightclient: Make `smoldot::chainID` part of the RPC requests
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Make `BackgroundTask` generic over `PlatformRef` and chain
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Construct from raw smoldot and target different chains
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* testing: Update cargo lock for wasm tests
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Reuse `new_from_client` method and removed unused imports
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Reexport smoldot client and RPC objects used in pub
interface
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Adjust `new_from_client` interface
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Extend background to poll over multiple RPC objects
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Build light client from raw and target different chains
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* artifacts: Add demo chain specs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* artifacts: Move artifacts to dedicated folder
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Use SelectAll to drive all streams
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Fetch initial data from the target chain
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Reexport other smoldot objects
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Target chain with potentially different config
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt/rpc: Log chainID for debugging
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt/examples: Add smoldot client with parachain example
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Propagate chain ID together with rpc responses object
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Multiplex responses by request ID and chain ID
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Add raw light client builder
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Add cargo feature flag for parachains example
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Derive default for internal structure
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Guard reexports by std feature flag
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update subxt/src/client/light_client/mod.rs
Co-authored-by: James Wilson <james@jsdw.me>
* lightclient: Update the builder pattern and chain targetting
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Fix documentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Provide more insightful docs wrt native/wasm panics
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* examples: Adjust comment location
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Refactor UniqueChainId into the background task
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update lightclient/src/background.rs
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* Update subxt/src/client/light_client/builder.rs
Co-authored-by: James Wilson <james@jsdw.me>
* lightclient: Update docs wrt panics
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Update docs wrt to smoldot instance -> client
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Use IntoIter instead of Iterator
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Adjsut docs wrt [`Self::new_from_client`]
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Remove RawRpc from LightClient in favor of chainID
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Reexport everything under smoldot module
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* artifacts: Use stateRootHash instead of genesis.raw
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: James Wilson <james@jsdw.me>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* config: Add `SkipCheckIfFeeless` signed extension
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* config: Add extra extension to the default params
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* examples: Adjust signed extension example
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* config: Extend SkipCheckIfFeeless with inner signed extension
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* config: Configure SkipCheck with inner signed extension params
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* config: Implement Deafult for SkipCheckIfFeelessParams with Option
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* examples: Fix example with proper extension
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* config: Extend <T as Config>::AssetId with EncodeAsType and Clone
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* config: Add SkipCheck with AssetTx
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* config: Encode as type from metadata the inner signed extensions
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Adjust examples
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* blocks: Use `SkipCheckIfFeeless` for decoding the tip of extensions
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* config: Decode `SkipCheckIfFeeless` with `Self`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tests: Adjust testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* config: Descriptive errors for building `SkipCheckIfFeeless`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* config: Add docs for extra error types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Add extra derives to signed extensions
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* config: Use `Default::default` to simplify type init
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* skeleton commit
* signed extension decoding
* fix some minor things
* make api more similar to Extrinsics
* defer decoding of signed extensions
* fix byte slices
* add test for nonce signed extension
* adjust test and extend for tip
* clippy
* support both ChargeTransactionPayment and ChargeAssetTxPayment
* address PR comments
* Extend lifetimes, expose pub structs, remove as_type
* add signed extensions to block subscribing example
* add Decoded type
* fix merging bug and tests
* add decoded type in CustomSignedExtension
* fix minor issues, extend test
* cargo fmt differences
* remove the `decoded` function
* new as_signed_extra fn, do not expose as_type anymore
* fix Result-Option order, simplify obtaining Nonce
* tx: Remove `wait_for_in_block` helper method (#1237)
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update smoldot to 0.12 (#1212)
* Update lightclient
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* testing: Fix typo
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* testing: Update cargo.toml
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Add tracing logs to improve debugging
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Add socket buffers module for `PlatformRef`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Update `SubxtPlatform`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cargo: Add lightclient dependencies
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update cargo.lock of wasm tests
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Add constant for with-buffer module
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Replace rand crate with getrandom
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* example: Update cargo lock file
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* examples: Update deps
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Tadeo Hepperle <62739623+tadeohepperle@users.noreply.github.com>
* ChargeAssetTxPayment: support providing u32 or MultiLocation in default impl (#1227)
* Asset Id in Config trait
* add example configuring the config
* fmt
* fix Default trait bound
* merge examples, fix default again
* adjust config in examples
* Update subxt/src/config/mod.rs
Co-authored-by: James Wilson <james@jsdw.me>
---------
Co-authored-by: James Wilson <james@jsdw.me>
* generic AssetId
* fix generics
* fmt
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: James Wilson <james@jsdw.me>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
* Asset Id in Config trait
* add example configuring the config
* fmt
* fix Default trait bound
* merge examples, fix default again
* adjust config in examples
* Update subxt/src/config/mod.rs
Co-authored-by: James Wilson <james@jsdw.me>
---------
Co-authored-by: James Wilson <james@jsdw.me>
* skeleton commit
* signed extension decoding
* fix some minor things
* make api more similar to Extrinsics
* defer decoding of signed extensions
* fix byte slices
* add test for nonce signed extension
* adjust test and extend for tip
* clippy
* support both ChargeTransactionPayment and ChargeAssetTxPayment
* address PR comments
* Extend lifetimes, expose pub structs, remove as_type
* add signed extensions to block subscribing example
* make example less ugly
---------
Co-authored-by: James Wilson <james@jsdw.me>
* add follow_stream impl
* follow_stream_unpin first draft
* add tests for follow_stream_unpin
* more tests and fixes for follow_stream_unpin
* first pass follow_stream_driver
* follow_stream_driver: add tests, fix things, buffer events from last finalized
* First pass finishing Backend impl
* Fix test compile issues
* clippy fixes
* clippy fix and consistify light_client
* revert lightclient tweak
* revert other lightclient thing
* cargo fmt
* start testing unstable backend behind feature flag
* more test fixes and move test-runtime metadata path just incase
* fix compile error
* ensure transaction progress stream actually used and fix another test
* cargo fmt
* CI tweak
* improve some comments and address some feedback bits
* update CI to use our own nightly binary
* wait for finalized block perhaps
* WIP backend trait
* WIP converting higher level stuff to using Backend impl
* more implementing new backend trait, mainly storage focused
* Get core code compiling with new backend bits
* subxt crate checks passing
* fix tests
* cargo fmt
* clippy/fixes
* merging and other fixes
* fix test
* fix lightclient code
* Fix some broken doc links
* another book link fix
* fix broken test when moving default_rpc_client
* fix dry_run test
* fix more tests; lightclient and wasm
* fix wasm tests
* fix some doc examples
* use next() instead of next_item()
* missing next_item() -> next()s
* move legacy RPc methods to LegacyRpcMethods type to host generic param instead of RpcClient
* standardise on all RpcClient types prefixed with Rpc, and 'raw' trait types prefixed with RawRpc so it's less ocnfusing which is which
* rename fixes
* doc fixes
* Add back system_dryRun RPC method and rename tx.dry_run() to tx.validate(), to signal that the calls are different
* Add a test that we return the correct extrinsic hash from submit()
* add TransactionValid details back, and protect against out of range bytes
* add test for decoding transaction validation from empty bytes
* fix clippy warning
* parachain rpc lists
* guide almost done
* add the 3rd config
* subscribe to block with configs
* delete table file
* spaces instead of tabs
* remove original ajuna example
* zombienet setup
* nft minting example
* include port, use different names
* link the example from the book
* format book
* add config creation to book, simplify example structure
* fix the nft creation script
* fix doc ref
* fixing links to foreign crates
* fix table formatting
* include nits
* move more docs to book, and simplify parachain-example
* another pass over docs and link to exampels from guide
* nit: adjust comment to numbers
* teeny README fix for parachain-example
* fix command in readme
* add CI for examples and fix parachain-example bug I left in
* add target arch
* cargo fmt
* make CI not fail
* remove index from docs
---------
Co-authored-by: James Wilson <james@jsdw.me>
* remove config, doc tests are expected to fail (book not adjusted yet)
* make doc tests pass
* Prevent bug when reusing type ids in hashing (#1075)
* practice TDD
* implement a hashmap 2-phases approach
* use nicer types
* add test for cache filling
* adjust test
---------
Co-authored-by: James Wilson <james@jsdw.me>
* remove the unnecessary intos
---------
Co-authored-by: James Wilson <james@jsdw.me>