Commit Graph

227 Commits

Author SHA1 Message Date
Benjamin Kampmann c78c2892a4 Attempting to fix publishing (#9140)
* mark template and utils as non-publish

* switch to development version for testing

* activate unleash check

* maybe if I disable all rules...

* Fix isolated compilation of `max-encoded-len-derive` with `syn`

error[E0369]: binary operation `==` cannot be applied to type `syn::Path`
  --> src/lib.rs:88:29
   |
88 |             .filter(|attr| attr.path == parse_quote!(max_encoded_len_crate))
   |                            --------- ^^ ----------------------------------- _
   |                            |
   |                            syn::Path

error: aborting due to previous error

For more information about this error, try `rustc --explain E0369`.
Error: could not compile `max-encoded-len-derive`

* WIP: bump changes crates since v3 tag to next breaking

cargo unleash version bump-breaking --changed-since v3.0.0
cargo unleash version set-pre dev --changed-since v3.0.0

FIXME: Don't modify crates that are not yet released, e.g.
`max-encoded-len-derive`

* Update lockfile

* WIP: Bump sp-transaction-pool as well

* WIP: Bump sp-offchain as well

* WIP: Bump frame-system-rpc-runtime-api as well

* WIP: Bump sp-authority-discovery as well

* Manually deactivate dev-deps before `cargo unleash check`

Otherwise we run into `Cycle detected` error.

* Bump sp-consensus-slots

* Add missing Cargo.lock change

* Bump sp-consensus-vrf as well

* Bump sp-keyring as well

* Bump sp-consensus-pow as well

* Try to speed up the `unleash-check` job

Previously, the job took 106 minutes - let's see if explicitly
specifying a `CARGO_TARGET_DIR` will help

* fixup: Ensure the temp target dir exists for unleash check

* Bump pallet-transaction-payment-rpc-runtime-api as well

Needed for Polkadot

* Bump pallet-transaction-payment-rpc as well

Needed for Polkadot

* Try updating crates after patching in the Polkadot CI job

* Use another approach to update patched Substrate crates

* Try to update all sp-core versions in Polkadot CI job

* Simplify sp-core version checking

* Apply another shellcheck lint

* Just do the simplest thing I guess

* Welp don't do --offline then

* Clean up `unleash-check` job triggers

Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>

* Fix a note in unleash-check cache step

* Add a note about temporary optimization in cargo-unleash

* Pin a newer version of cargo-unleash

Co-authored-by: Igor Matuszewski <xanewok@gmail.com>
Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>
2021-07-11 12:17:53 +00:00
Yang Zhou bdfb038dc6 add heiko, parallel to ss58 registry (#9254) 2021-07-06 20:21:45 +02:00
Igor Matuszewski eb6d651f9c Remove in-tree max-encoded-len and use the new SCALE codec crate instead (#9163)
* Update impl-codec to use new upstream MaxEncodedLen trait

* Adapt crates to use the updated codec crate for `MaxEncodedLen`

* Remove max-encoded-len crate altogether

* Fix test compilation in `pallet-proxy`

* reorganize import (#9186)

* Fix remaining `MaxEncodedLen` imports

* Fix remaining old usages of max-encoded-len crate

* Fix UI test

* Manually depend on new impl-codec to fix Polkadot companion build

* Use newly released primitive-types v0.9.1 that has new codec impls

* Make sure codec deps are up-to-date in crates that use them

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
2021-07-05 20:37:24 +00:00
Andronik Ordian b61dd3e8c5 bump a bunch of deps in parity-common (#9263)
* bump a bunch of deps in parity-common

* primitive-types 0.10.0

* update Cargo.lock

* downgrade a few more

* this is unlikely to help

* try something

* Checkmate, Atheists!
2021-07-05 18:37:19 +00:00
kotlarmilos 0763716c92 Add OriginTrail Parachain to SS58 Registry (#9067)
* Add OriginTrail Parachain to SS58 Registry

* Update ss58-registry.json

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-06-24 13:18:15 +02:00
Squirrel ea1f21a904 Use MAX associated const (#9196)
* Use MAX associated const
2021-06-24 11:53:49 +01:00
akashi6824 1bd834b6a4 Add PolkaFoundry, PolkaSmith SS58 address (#8623)
* Add PolkaFoundry, PolkaSmith SS58 address

* chang decimals to 18

* fix format

* fix format
2021-06-23 10:04:40 +02:00
Alan Sapede 945bf4f2c1 Adds moonbeam, moonriver to ss58 registry (#9028)
* Adds moonream, moonriver to ss58 registry

* Fixes names
2021-06-13 02:31:53 +02:00
Andronik Ordian ad5b8afa6e disable unused schnorrkel feature (#9084) 2021-06-12 00:47:22 +00:00
Andreas Doerr ccb4e6a551 Add ecdsa::Pair::verify_prehashed() (#8996)
* Add ecdsa::Pair::verify_prehashed()

* turn verify_prehashed() into an associated function

* add Signature::recover_prehashed()
2021-06-03 09:46:43 +00:00
Shawn Tabrizi 444d4e204c Simple MaxBoundedLen Implementations (#8793)
* implement max_values + storages info

* some formatting + doc

* sudo sanity check

* timestamp

* assets (not working)

* fix assets

* impl for proxy

* update balances

* rename StoragesInfo -> PalletStorageInfo

* merge both StorageInfoTrait and PalletStorageInfo

I think it is more future proof. In the future some storage could make
use of multiple prefix. Like one to store how much value has been
inserted, etc...

* Update frame/support/procedural/src/storage/parse.rs

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>

* Update frame/support/procedural/src/storage/storage_struct.rs

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>

* Fix max_size using hasher information

hasher now expose `max_len` which allows to computes their maximum len.
For hasher without concatenation, it is the size of the hash part,
for hasher with concatenation, it is the size of the hash part + max
encoded len of the key.

* fix tests

* fix ui tests

* Move `MaxBoundedLen` into its own crate (#8814)

* move MaxEncodedLen into its own crate

* remove MaxEncodedLen impl from frame-support

* add to assets and balances

* try more fixes

* fix compile

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* nits

* fix compile

* line width

* fix max-values-macro merge

* Add some derive, needed for test and other purpose

* use weak bounded vec in some cases

* Update lib.rs

* move max-encoded-len crate

* fix

* remove app crypto for now

* width

* Revert "remove app crypto for now"

This reverts commit 73623e9933d50648e0e7fe90b6171a8e45d7f5a2.

* unused variable

* more unused variables

* more fixes

* Add #[max_encoded_len_crate(...)] helper attribute

The purpose of this attribute is to reduce the surface area of
max_encoded_len changes. Crates deriving `MaxEncodedLen` do not
need to add it to `Cargo.toml`; they can instead just do

```rust
\#[derive(Encode, MaxEncodedLen)]
\#[max_encoded_len_crate(frame_support::max_encoded_len)]
struct Example;
```

* fix a ui test

* use #[max_encoded_len_crate(...)] helper in app_crypto

* remove max_encoded_len import where not necessary

* update lockfile

* fix ui test

* ui

* newline

* fix merge

* try fix ui again

* Update max-encoded-len/derive/src/lib.rs

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>

* extract generate_crate_access_2018

* Update lib.rs

* compiler isnt smart enough

Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
Co-authored-by: Peter Goodspeed-Niklaus <peter.r.goodspeedniklaus@gmail.com>
2021-05-28 18:35:15 +00:00
Alexander Theißen 61859bbdb1 Bump parity-wasm and pwasm-utils to the newest versions everywhere (#8928) 2021-05-28 11:06:16 +00:00
Shawn Tabrizi fa89414bba Fix Compiler Warnings (new rustc) (#8907)
* unused mmr

* more unused

* dyn in executor

* remove `doc(inline)`

* fix dyn for sp-api-test

* update benchmarks

* Update primitives/core/benches/bench.rs

* Update primitives/core/benches/bench.rs

* update another bench

* fix benchmark?

Co-authored-by: adoerr <0xad@gmx.net>
2021-05-27 07:52:05 +02:00
Shumo Chu c110425251 Manta Network ss58 address registration (#8706)
* manta network ss58 address registration

* minor
2021-05-26 22:58:41 +02:00
Jakub Pánik 60345c9ffc Add Basilisk ss58 (#8882) 2021-05-26 20:47:56 +02:00
Andreas Doerr a183031eef Fix doc for CryptoStore::ecdsa_sign_prehashed() (#8876)
* fix ecdsa_sign_prehashed() doc

* document both instances
2021-05-21 09:52:20 +02:00
Andreas Doerr ed39290f91 Add CryptoStore::ecdsa_sign_prehashed() (#8838)
* Pair::sign_prehashed()

* add CryptoStore::ecdsa_sign_prehashed()

* add test for testing keystore

* address review comments
2021-05-18 16:07:45 +02:00
Andreas Doerr a68ed7c3d8 [clippy] Fix clippy issues for crate sp-core (#8809)
* Fix clippy issues for crate sp-core

* Update primitives/core/benches/bench.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update primitives/core/src/ed25519.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Remove clippy attributes

* Missed a clippy attribute

* remove clippy attributes for bechmarks as well

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-05-18 09:38:56 +02:00
Ayush Mishra c28ab1fcac Improve match statement (#8817) 2021-05-15 21:43:58 +02:00
Sergei Shulepov 0849bcce0e Embed runtime version as a custom section (#8688)
* emit a custom section from impl_runtime_apis!

This change emits a custom section from the impl_runtime_apis! proc macro.

Each implemented API will result to emitting a link section `runtime_apis`.
During linking all sections with this name will be concatenated and
placed into the final wasm binary under the same name.

* Introduce `runtime_version` proc macro

This macro takes an existing `RuntimeVersion` const declaration, parses
it and emits the version information in form of a linking section.
Ultimately such a linking section will result into a custom wasm
section.

* Parse custom wasm section for runtime version

* Apply suggestions from code review

Co-authored-by: David <dvdplm@gmail.com>

* Fix sc-executor integration tests

* Nits

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Refactor apis section deserialization

* Fix version decoding

* Reuse uncompressed value for CallInWasm

* Log on decompression error

* Simplify if

* Reexport proc-macro from sp_version

* Merge ReadRuntimeVersionExt

* Export `read_embedded_version`

* Fix test

* Simplify searching for custom section

Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-05-12 13:39:08 +00:00
Veniamin 221aa2b865 equilibrium added ss58 prefix (#8342)
Co-authored-by: Veniamin <benjamin@eosdt.com>
2021-05-06 14:16:30 +02:00
Aten 3d259fdee5 remove patract ss58version for it's useless now (#8738) 2021-05-05 14:41:30 +00:00
Bastian Köcher 541692c4a8 Use host max log level when initializing the RuntimeLogger (#8655)
* Use host max log level when initializing the `RuntimeLogger`

This should fix performance problems introduced by logging under certain
circumstances. Before we always called into the host and the host was
doing the log filtering, now as the correct max log level is set, we
don't call into the host for every log line to check if it should be
logged. However, we would still call into the host to determine if
something should be logged when `something=trace` is given as we don't
forward the log targets that are enabled.

* Finish the pr
2021-04-23 13:22:39 +00:00
Vladislav d0933c4634 Add Sora network SS58 Address (#8261)
* Add Sora network SS58 Address

Signed-off-by: Vladislav Markushin <negigic@gmail.com>

* Update Sora network SS58 Address to `69`

Signed-off-by: Vladislav Markushin <negigic@gmail.com>

Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
2021-04-14 09:16:12 +00:00
Alexander Theißen f854194139 contracts: Add RPC that allows instantiating of a contract (#8451)
* contracts: Add RPC that allows instantiating of a contract

* Encode `debug_message` as bytes because usage of `String` is forbidden

* Remove erroneous derive attribute

* Fix rpc tests for new `debug_message` encoding

* Fix typo

Co-authored-by: Andrew Jones <ascjones@gmail.com>

Co-authored-by: Andrew Jones <ascjones@gmail.com>
2021-04-13 11:26:52 +00:00
Sukhveer Sanghera a946c3343e Add Social Network (#8065)
* Add Social Network

* Remove TNET

* Update ss58-registry.json

* Update ss58-registry.json

* Update ss58-registry.json

* Add back comment

Co-authored-by: everhusk <sanghera@everhusk.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Github Actions <action@github.com>
2021-03-29 17:18:29 +00:00
Tomasz Drwięga f3d4355a20 Custom RPC for Merkle Mountain Range pallet (#8137)
* Add MMR custom RPC.

* Change RuntimeApi to avoid hardcoding leaf type.

* Properly implement the new RuntimeAPI and wire up RPC.

* Extract Offchain DB as separate execution extension.

* Enable offchain DB access for offchain calls.

* Fix offchain_election tests.

* Skip block initialisation for proof generation.

* Fix integration test setup.

* Fix offchain tests. Not sure how I missed them earlier 🤷.

* Fix long line.

* One more test missing.

* Update mock for multi-phase.

* Address review grumbbles.

* Address review grumbles.

* Fix line width of a comment
2021-03-10 15:28:56 +00:00
honeywest b3f8e064f2 Clippy arithmetic new (#8282)
* optimize code

* fix clippy replace = with += or %=

* fix redundant closure found warning

* redundant field names in struct initialization

* fix clippy warning and optimize code

* fix clippy warning

* fix clippy warning

* fix test error
2021-03-08 11:35:26 +01:00
Jakub Pánik f0c3656489 Add ss58 prefix for HydraDX (#8058)
* Add ss58 prefix for HydraDX

* fix formatting
2021-02-25 09:03:49 +00:00
Wei Tang 3e3b5f9cba Reserve ss58 prefix 48 for Neatcoin (#8165)
* Reserved ss58 prefixes for Neatcoin

* Switch to use 63

* Switch to use 48
2021-02-24 00:28:57 +01:00
Robin Syihab e7ac265649 Make Regex in ss58codec and secret phrase crypto static (#8117) (#8177) 2021-02-22 22:37:48 +01:00
Bastian Köcher 821e018d75 Ensure we spawn the block import worker as an essential task (#8155)
* Ensure we spawn the block import worker as an essential task

This pr ensures that we spawn the block import worker as an essential
task. This is quite important as we need to bring down the node when the
block import is done. Besides that it adds some debug output to the
block import worker.

* Don't be stupid :D
2021-02-19 16:31:03 +00:00
Kian Paimani 16a27c28a9 Migration testing runtime API/Bot (#8038)
* A clean new attempt

* Checkpoint to move remote.

* A lot of dependency wiring to make it feature gated.

* bad macro, bad macro.

* Undo the DB mess.

* Update frame/support/src/traits.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Apply suggestions from code review

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* unbreak the build

* Update frame/try-runtime/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update utils/frame/try-runtime/cli/Cargo.toml

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Update frame/try-runtime/Cargo.toml

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Address most review grumbles.

* Fix build

* Add some comments

* Remove allowing one pallet at a time.

* More grumbles.

* relocate remote-ext

* Fix build

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-02-19 14:52:09 +00:00
Guillaume Thiolliere f49aae65a8 fix deprecated usage of panic (#8134) 2021-02-16 19:02:53 +01:00
Bastian Köcher 33f9becf41 Simplify runtime api error handling (#8114)
* Ahh

* Work work work

* Fix all the compilation errors

* Fix test

* More fixes...
2021-02-15 11:55:40 +00:00
Benjamin Kampmann 6a964c5df0 Releasing 3.0 (#8098)
* bumping version for next release
* add changelog
* add guide
2021-02-10 19:23:18 +01:00
nahuseyoum 1baffde51f Add Aventus ss58 address (#8050)
* Update crypto.rs

* Update ss58-registry.json

* quote fields

* Update ss58-registry.json

* Update crypto.rs

* Update ss58-registry.json

* Update ss58-registry.json

* Update ss58-registry.json

* Update crypto.rs

* Update ss58-registry.json
2021-02-09 20:30:16 +00:00
frank 1ee71e54e5 Add Ares SS58 address type (#8061) 2021-02-09 14:57:41 +01:00
Kun 929c1c732a Add Crust Network SS58 Address (#8064)
* Add Crust Address Format

* Add Crust Address Format

* Delete extra ss58 json info
2021-02-09 14:53:01 +01:00
Gavin Wood 4b1460f61f Extend SS58 network identifiers (#8039)
* Initial draft

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Improve readability, add format filter.

* Link

* Fixes

* Update primitives/core/src/crypto.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Suggestions from review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-02-06 15:00:10 +00:00
Guillaume Thiolliere f48296e9ad Update parity-scale-codec to 2.0 (#7994)
* update cargo.toml

* use 2.0 in mmmr
2021-01-29 12:22:45 +00:00
cheme 878f7ccf6e Allow transaction for offchain indexing (#7290)
* Moving offchain change set to state machine overlay change set,
preparing use of change set internally.

* Make change set generic over key and value, and use it for offchain
indexing.

* test ui change

* remaining delta

* generating with standard method

* Remove 'drain_committed' function, and documentation.

* Default constructor for enabling offchain indexing.

* Remove offchain change specific iterators.

* remove pub accessor

* keep previous hierarchy, just expose iterator instead.

* Update primitives/state-machine/src/overlayed_changes/mod.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* fix line break

* missing renamings

* fix import

* fix new state-machine tests.

* Don't expose InnerValue type.

* Add test similar to set_storage.

* Remove conditional offchain storage (hard to instantiate correctly).

* fix

* offchain as children cannot fail if top doesn't

Co-authored-by: Addie Wagenknecht <addie@nortd.com>
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
2021-01-22 12:27:43 +00:00
Bastian Köcher cd0ad4805d Make offchain indexing work (#7940)
* Make offchain indexing work

This fixes some bugs with offchain indexing to make it actually working ;)

* Fix tests

* Fix browser build

* Update client/db/src/offchain.rs

Co-authored-by: cheme <emericchevalier.pro@gmail.com>

* Remove seperation between prefix and key

Co-authored-by: cheme <emericchevalier.pro@gmail.com>
2021-01-21 13:12:42 +01:00
Black3HDF 0b69577a3e Add ss58 version prefix for Litentry (#7918) 2021-01-18 15:08:19 +01:00
Aten 660cf13e6d Add ss58 version prefix for Patract/Jupiter (from PatractHubs) (#7785) 2021-01-15 17:59:29 +01:00
Satish Mohan da9c73125f Add ss58 version prefix for CORD (from Dhiway) (#7862)
* Add ss58 version prefix for CORD

* Add ss58 version prefix for CORD
2021-01-12 14:24:03 +01:00
Guillaume Thiolliere 014e6f03c6 bumpd minor version (#7873) 2021-01-12 09:25:47 +01:00
dependabot[bot] 6b4cc36c60 Bump sha2 from 0.8.2 to 0.9.2 (#7643)
* Bump sha2 from 0.8.2 to 0.9.2

Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.8.2 to 0.9.2.
- [Release notes](https://github.com/RustCrypto/hashes/releases)
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.8.2...streebog-v0.9.2)

Signed-off-by: dependabot[bot] <support@github.com>

* Fix compilation error

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
2021-01-11 11:58:26 +00:00
Igor Matuszewski 028f3d2674 Merge 2.0.1 backport branch into mainline master (#7842)
* Backport paritytech/substrate#7381

* Bring back genesis storage build in aura/timestamp

To not change spec version, see
https://github.com/paritytech/substrate/pull/7686#discussion_r540032743

* Backport paritytech/substrate#7238

* Backport paritytech/substrate#7395

* Bump impl_version

* Fix UI tests and bump trybuild dep

See https://github.com/rust-lang/rust/pull/73996

Backports:
https://github.com/paritytech/substrate/pull/7764
https://github.com/paritytech/substrate/pull/7656

* Partially backport paritytech/substrate#7838

* Release frame-support with a dep compilation fix

* Bump patch level for remaining crates

This is done because at the time of writing cargo-unleash does not fully
support partial workspace publishing and mixes both local and crates.io
versions of the packages, leading to errors in the release check workflow.

* Backport paritytech/substrate#7854

...to fix compilation error when using futures-* v0.3.9.

* Adding Changelog  entry for patch release

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Benjamin Kampmann <ben@parity.io>
2021-01-11 11:24:29 +01:00
tuminfei 467599df13 UniArts reserve SS58 address id 38 (#7651)
* UniArts reserve SS58 address id 45

* Update ss58-registry.json

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

Co-authored-by: Xiang Li <bigxiang@gmail.com>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
2021-01-08 13:43:43 +00:00