Commit Graph

285 Commits

Author SHA1 Message Date
Bastian Köcher 03e9c5afd4 Offchain-worker: Accessing time is not HTTP (#10220)
Accessing time related functionality is clearly not related to HTTP. So, this pr introduces a `TIME` capability.
2021-11-08 22:03:37 +01:00
cheme 471e9cfbf1 Hashing proc macro utils (#9875)
* hashing macro

* fmt

* use in easy place, and fix blake sizes

* fix

* Fixes, docs.
Allow ident as input.

* fix doc tests

* update error in test (nmapkey and key are same type).

* hashing crates under sp_core

* Doc updates and format.

* use all existing hashing functions.

* return array of u8

* Update primitives/core/hashing/proc-macro/src/impls.rs

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

* ToTokeen for an array of u8

* fix

* re

* Improve impls

* complete doc tests

* fmt

* fix doctest format

* fix ui test (nmap key type alias)

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Bastian Köcher <info@kchr.de>
2021-11-02 09:35:23 +00:00
Bastian Köcher 47c7447106 Offchain-worker: Make it possible to disable http support (#10087)
* Offchain-worker: Make it possible to disable http support

If a chain doesn't require http support in its offchain workers, this pr enables them to disable the
http support.

* Switch to bitflags

* Use Capabilities

* Update client/offchain/src/lib.rs

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

* Fix test

* Update client/offchain/src/lib.rs

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

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
2021-10-31 19:13:19 +01:00
Squirrel 98c157886c Switch to using ss58-registry crate (#9755)
* Switch to using ss58-registry crate
* Custom(42) is now eq to Substrate

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

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2021-10-12 09:54:40 +01:00
RyuH1 29ff036463 Add SS58 prefix for Automata (#9805) 2021-10-01 11:22:13 +00:00
Gautham 951a033e8d Add Polkadex to SS58 Registry (#9825)
* Add PDEX to SS58 Registry.

* Add PDEX to SS58 Registry.
2021-09-28 06:10:40 +00:00
Andrew Jones 49b6dfd2e5 Enrich metadata with type information (#8615)
* Cargo.lock after merge

* Restore scale-info feature

* Fully qualify TypeInfo derive

* Skip PendingSwap T

* Add missing skip_type_params attr

* metadata docs features

* Reduce pallet event attribute to struct

* Cargo.lock

* Update frame/balances/src/tests_composite.rs

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

* Line widths check

* Cargo.lock

* Add scale-info/std

* Update frame/system/src/lib.rs

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

* Use `skip_type_params` to remove `TypeInfo` requirements on checks

* Revert "Remove unused Call metadata stuff"

This reverts commit 41311f85

* Skip BalanceSwapAction type parameter

* Remove unused event metadata macro

* Update frame-metadata

* Update primitives/npos-elections/compact/src/codec.rs

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

* Manual TypeInfo for Header

* Remove TypeInfo requirement for consts in BoundedVec etc.

* Another TypeInfo bound removed

* review: fix indentation

* TypeInfo impls for Identity types

* Add some todos to add custom TypeInfo impls

* Update frame/support/procedural/src/pallet/expand/pallet_struct.rs

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

* Add some todos to add custom TypeInfo impls

* Add a test for manual Data TypeInfo impl

* Add custom TypeInfo impl for Vote

* Era custom TypeInfo crimes

* Revert finality-grandpa version to 0.14.z

* review: renamed module to pallet_constants_metadata

* New line at end of file

* Add missing scale-info/std

* Update frame/support/src/storage/types/mod.rs

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

* Remove StorageEntryType::Map unused flag

* Add missing scale-info dependency after merge

* SignedExtension::AdditionalSigned metadata

* Update frame-metadata, use abbreviated docs and args fields

* Update frame/example/Cargo.toml

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* Add scale_info/std and remove unused scale-info dependency

* Remove scale-info dependency

* Remove treasury pallet::metadata

* Remove redundant Event test

* Add back scale-info as dev dependency

* fix error metadata when no error defined in decl_module

* Add Module3 to tests

* Fix metadata test

* Add docs feature to frame-support test

* WIP fixing pallet metadata test

* Remove redundant FunctionMetadata, FunctionArgumentMetadata as per https://github.com/paritytech/frame-metadata/pull/20

* Use main branch of frame-metadata

* Use patch of scale-info for latest changes

* Use latest patched scale-info

* Manual TypeInfo for DigestItem

* Manual TypeInfo for DigestItem

* Update scale-info

* Skip __Ignore variants for Error, depends on https://github.com/paritytech/scale-info/pull/117

* Named fields for FRAME v2 pallet Call variants

* Named fields for FRAME v1 pallet Call variants

* Add missing scale-info dependency

* WIP expand benchmark call variant

* fix benchmark with new function

create a new function for each variant of a pallet call.
This function is called by benchmarking macro in order not to break call
creation with unnamed argument

* fix tests

* more fix

* Fix staking tests

* Fix offchain workers calls

* Cherry pick rustfmt.toml from master

* cargo +nightly-2021-06-22 fmt --all

* Update to new call variant structs

* More call variant struct updates

* Remove unused import

* More call variant structs

* More call variant structs

* Even more call variant structs

* Mooar variant structs

* Evermore variant structs

* Call variant structs ad infinitum

* Fmt

* More call variants

* Last call variant

* Call variants all done?

* Fix SS58Prefix type

* Potential workaround for BitFlags<IdentityFields> TypeInfo

* Enable docs capturing for Call, Event, and Error types

* Fix IdentityFields TypeInfo

* Remove metadata-docs feature

* Add capture_docs = true for legacy Call, Event and Error types

* Fmt

* Fix metadata test type

* Update benchmarks with call struct variants

* Fmt

* More test fixes

* Fmt

* Fix benches

* Use latest capture_docs attr

* Latest scale_info

* Fmt

* review: change &Vec to &[]

* Remove pallet metadata attr

* review: remove commented out test code

* review: skip_type_params trailing comma suggestion

* Update to scale-info 0.10.0

* Update construct_runtime ui tests, different because of metadata TypeInfo impls

* Add some TypeInfo derives for UI tests

* Update storage ensure span ui stderrs

* Update call argument bound ui tests

Possibly changed because change from tuple to struct variants?

* Add scale-info dev dependency

* Update to latest finality-grandpa release

* review: missing newline

* review: missing scale-info/std

* review: remove duplicate scale-info/std

* review: remove fully qualified TypeInfo

* review: add missing scale-info/std

* review: remove unnecessary imports.

* Fmt

* Use crates.io RC version of frame-metadata

* Remove scale-info/std because it is a dev dependency

* Add missing scale_info dev-dependency for test

* Delete empty metadata folder

* Fix sp_std import

* review: improve manual UncheckedExtrinsic TypeInfo impl

* review: use full scale-info for dev-dependency

* Remove DefaultByteGetter impl

* review: derive TypeInfo for generic header

* Fmt

* Update primitives/runtime/src/generic/unchecked_extrinsic.rs

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* Update primitives/runtime/src/generic/unchecked_extrinsic.rs

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* Update bin/node/executor/Cargo.toml

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

* Update frame/identity/src/types.rs

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

* Update frame/support/src/dispatch.rs

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

* Remove redundant derive

* Simplify scale-info dependency

* Strip underscore prefix from call variant struct names

* Another underscore field

* More underscore fields

* Another underscore field

* Update to frame-metadata 14.0.0-rc.2 with combined StorageEntryType::Map

* Fmt

* Revert weights formatting

* Fix up some tests

* Fix up some tests for StorageEntryTypeMetadata

* scale-info dev dependency

* Fix test error

* Add missing TypeInfo derives

* Add back missing scale-info dependency

* Add back missing scale-info dependency

* Fix npos compact impls

* Cargo.lock

* Fmt

* Fix errors

* Fmt

* Fix renamed raw_solution field

* Fix error

* Fmt

* Fix some benchmarks

* Fmt

* Stray R

* Fix

* Add missing TypeInfos

* ui test fix

* Fix line widths

* Revert "ui test fix"

This reverts commit 2d15ec058a216e3f92d713f1174603a2bb1eac65.

* Upgrade to scale-info 0.11.0

* Revert "Upgrade to scale-info 0.11.0"

This reverts commit 047bb179085a0059c36cd20ab405f55cf0867e28.

* Add Runtime type

* Update to scale-info 0.12

* Update to scale-info 1.0

* Update frame-metadata to version 14.0.0

* Patch finality-grandpa until release available

* Fix metadata tests

* Fix metadata tests

* Fmt

* Remove patched finality-grandpa

* Fix tests, use scale_info imports

* Fix pallet tests

* Add BlockNumber TypeInfo bound

* ui test fix

* Cargo.lock

* Remove pallet metadata

* Cargo.lock

* Add missing scale-info dependency

* Remove pallet event metadata

* Fix error

* Fix collective errors

* Semicolol

* Fmt

* Remove another metadata attribute

* Add new variant to custom digest TypeInfo

* Fmt

* Cargo.lock from master

* Remove comma lol

* Fix example call error

* Fix example call error properly

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-09-15 11:40:41 +00:00
pangwa b8f4a4c147 Add Clover Finance to SS58 Registry (#9236)
* Add Clover Finance to SS58 Registry

* Merge and fix spaces

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

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-09-14 14:22:10 +00:00
Seun Lanlege 9245bfbbc2 Adds composable.finance to ss58 registry (#9608)
* adds composable.finance ss58 registry

* adds composable ss58 format

* correct prefix

* dedupe

Co-authored-by: CI system <>
2021-09-13 10:54:13 +02:00
GreenBaneling | Supercolony a36e881783 Implemented seal_ecdsa_recovery function in the contract pallet (#9686)
* Implemented `seal_ecdsa_recovery` function in the contract pallet.
Added benchmark and unit test.

* Run `cargo fmt`

* Skip fmt for slices

* Changes according comments in pull request.

* Fix build without `unstable-interface` feature

* Applied suggestion from the review

* Apply suggestions from code review

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* Apply suggestions from code review

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* Changed RecoveryFailed to EcdsaRecoverFailed

* Manually updated weights.rs

* Apply suggestions from code review

Co-authored-by: Michael Müller <mich@elmueller.net>

Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Michael Müller <mich@elmueller.net>
2021-09-10 11:30:56 +00:00
Trevor Arjeski d9f02296ab RUSTSEC-2021-0076 bump libsecp256k1 (#9391)
* RUSTSEC-2021-0076 bump libsecp256k1

libsecp256k1 allows overflowing signatures
https://rustsec.org/advisories/RUSTSEC-2021-0076

Changes were made to conform to libsecp256k1 version differences.

Closes #9356

* parse_standard_slice() -> parse_overflowing_slice()

* Added v2 host function for ecdsa_verify

* Add feature tag over helpers

* Added ecdsa_verify v2 to test runner

* PR feedback

- Spaces -> tabs
- renamed two helper functions

* Fixed imports after rebasing

* Bump rest of libsecp256k1 (and libp2p)

libp2p also uses libsecp256k1 so it is required to be bumped too, along
with all the version difference changes.

* Add version2 for ecdsa pubkey recovery

* libp2p rebase master fixes

* Fix test panic when non Behaviour event is returned

* Update bin/node/browser-testing/Cargo.toml

* Update primitives/core/src/ecdsa.rs

* Update primitives/core/src/ecdsa.rs

* Update Cargo.lock

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-08-16 14:17:10 +00:00
Squirrel 7e9b8d278e depend-o-pocalipse (#9450)
Remove unneeded dependencies and dev-dependencies.
Made self_destruct test not dependent on wasm bin size.  
Updated code related to deprecated warning on tracing-subscriber `scope()` 
( See https://github.com/tokio-rs/tracing/issues/1429 )
2021-08-13 15:18:37 +01:00
Kian Paimani abd08e29ce Rewrap all comments to 100 line width (#9490)
* reformat everything again

* manual formatting

* last manual fix

* Fix build
2021-08-11 14:56:55 +00:00
Guillaume Thiolliere 23e8088c1c Make allocator limit available for the runtime (#9393)
* make allocator limit available

* better inner doc

* move const

* fmt

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-07-27 13:04:11 +00:00
Logan Saether d18c6a5200 Add Zeitgeist ss58 prefix 73 reservation (#8509) 2021-07-22 20:53:57 -04:00
Squirrel aafe64315a Remove extra commas made redundent after rustfmt (#9404)
* Remove extra commas made redundent after rustfmt
2021-07-22 11:06:17 +01:00
Bastian Köcher 7b56ab15b4 Run cargo fmt on the whole code base (#9394)
* Run cargo fmt on the whole code base

* Second run

* Add CI check

* Fix compilation

* More unnecessary braces

* Handle weights

* Use --all

* Use correct attributes...

* Fix UI tests

* AHHHHHHHHH

* 🤦

* Docs

* Fix compilation

* 🤷

* Please stop

* 🤦 x 2

* More

* make rustfmt.toml consistent with polkadot

Co-authored-by: André Silva <andrerfosilva@gmail.com>
2021-07-21 14:32:32 +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
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
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
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
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