- Sep 10, 2020
-
-
kaichao authored
* add offchain worker api to set reserved nodes. * new offchain api to get node public key. * node public key from converter * refactor set reserved nodes ocw api. * new ndoe authorization pallet * remove unnecessary clone and more. * more * tests for node authorization pallet * remove dependency * fix build * more tests. * refactor * Update primitives/core/src/offchain/testing.rs Co-authored-by: Tomasz Drwięga <[email protected]> * Update frame/node-authorization/src/lib.rs Co-authored-by: Tomasz Drwięga <[email protected]> * Update frame/node-authorization/src/lib.rs Co-authored-by: Tomasz Drwięga <[email protected]> * Update frame/node-authorization/src/lib.rs Co-authored-by: Tomasz Drwięga <[email protected]> * format code * expose NetworkService * remove NetworkStateInfo in offchain * replace NodePublicKey with PeerId. * set max length of peer id. * clear more * use BTreeSet for set of peers. * decode opaque peer id. * extract NetworkProvider for client offchain. * use OpaquePeerId in node authorization pallet. * fix test * better documentation * fix test * doc * more fix * Update primitives/core/src/offchain/mod.rs Co-authored-by: Pierre Krieger <[email protected]> * Update client/offchain/src/api.rs Co-authored-by: Pierre Krieger <[email protected]> * derive serialize and deserialize Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Pierre Krieger <[email protected]>
-
- Jun 15, 2020
-
-
thiolliere authored
* impl filter in origin * remove IsCallable usage. Breaking: utility::batch(root, calls) no longer bypass BasicCallFilter * rename BasicCallFilter -> BaseCallFilter * refactor code * Apply suggestions from code review Co-authored-by: Kian Paimani <[email protected]> * remove forgotten temporar comment * better add suggestion in another PR * refactor: use Clone instead of mem::replace * fix tests * fix tests * fix tests * fix benchmarks * Make root bypass filter in utility::batch * fix unused imports Co-authored-by: Kian Paimani <[email protected]>
-
- May 15, 2020
-
-
Benjamin Kampmann authored
-
- Apr 27, 2020
-
-
thiolliere authored
* implementation using Keys::decode_len * add heartbeat new param * address issues * improve doc * fix test * fix overflow
-
- Apr 21, 2020
-
-
Rakan Alhneiti authored
* New approach to offchain signing. * Use in im-online * Rewrite to use Account<T> * DRY signing. * Implement send_raw_unsigned_transaction * WiP * Expunge LocalCall * Expunge LocalCall * Fix compilation. * Solve call. * Make it compile again. * Finalize implementation. * Change CreateTransaction * Clear CreateTransaction. * Add price payload * Send raw transaction * Submit signed payload / unsigned transaction (WIP) * Supertrait requirements on T::Signature * Validate signature of payload on an unsigned transaction * Fix encoding - part 1 * Make it compile. * Fix compilation of unsigned validator. * Pass price payload to the transaction * Make block number part of the signed payload * Send signed transaction * Implement all_accounts, any_account * Fix formatting * Implement submit_transaction * Submit signed transaction (ForAll, ForAny) * Fix formatting * Implement CreateSignedTransaction * Move sign and verify to AppCrypto * Sign transaction * Call `use_encoded` * Remove SubmitAndSignTransaction * Implement runtime using new SigningTypes * Adapt offchain example to changes * Fix im-online pallet * Quick fix: rename AuthorityId2 * Fix offchain example tests * Add a comment on why keystore is required in unsigned transaction test * Use UintAuthorityId instead of u64 * WIP * Remove IdentifyAccount from UintAuthorityId * Implement PublicWrapper type * Fix im-online tests * Fix runtime test * Bump spec version * Fix executor tests * Rename ImOnlineAuthId -> ImOnlineAuthorityId and formatting * Fix merge * Documentation * Revert u64 -> UintAuthorityId conversion * Fix string errors * Document public members in offchain module * Introduce SubmitTransaction * Update pallets to use SubmitTransaction * WIP * Use SubmitTransaction in offchain * Use `submit_unsigned_transaction` * Fix tests * Update docs * Remove SigningTypes requirement from `SendTransactionTypes` * Fix tests * Update frame/system/src/offchain.rs Co-Authored-By: Kian Paimani <[email protected]> * Update frame/system/src/offchain.rs Co-Authored-By: Kian Paimani <[email protected]> * Update frame/example-offchain-worker/src/tests.rs Co-Authored-By: Kian Paimani <[email protected]> * Update frame/system/src/offchain.rs Co-Authored-By: Kian Paimani <[email protected]> * Update frame/system/src/offchain.rs Co-Authored-By: Kian Paimani <[email protected]> * Remove leftover from previous iterations * Change enum to struct * Remove public * Move mock to node/executor/tests * Cleanup test-helpers * Make `application-crypto` `std` feature internal The macros should not generate code that requires that the calling crate has a feature with the name `std` defined. * Revert cargo lock update * Use TestAuthorityId from common * Restore members of account to public * Tidy up imports * Fix benchmarking pallet * Add tests demonstrating ForAll, ForAny on signer * Move definition of AppCrypto in example-offchain-worker from tests to mod::crypto * Cleanup stray comment * Fix ValidTransaction * Re-fix CreateSignedTransaction * Address PR feedback * Add can_sign method to signer * Propagate error * Improve documentation * Fix vec! macro not available * Document SendTransactiontypes * Add some docs. * Split signing examples * Add tests for signing examples * WIP can_sign - PR feedback * WIP * Split for_any / for_all into different calls * Verify payload and signature in test * Fix can_sign implementation * Fix impl_version * Import Box from sp_std * Create issues for TODOs * Ignore doctest. * Add test directly to system. Adjust UintTypes. * Add some tests to account filtering. * Remove code samples and point to example offchain worker * Fix doc links * Fix im-online tests using signatures. Co-authored-by: Tomasz Drwięga <[email protected]> Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
- Mar 24, 2020
-
-
thiolliere authored
on_initialize return weight consumed and default cost to default DispatchInfo instead of zero (#5382) * frame update * doc * move offchain worker trait also * fix weigh merge * indentation * reorder for better git diff * comment * fix benchmark * remove test
-
- Feb 21, 2020
-
-
Tomasz Drwięga authored
* Un-deprecate ValidateUnsigned. * Bump runtime. * Bump runtime. Co-authored-by: Shawn Tabrizi <[email protected]>
-
- Feb 20, 2020
-
-
Tomasz Drwięga authored
* Example of offchain worker pallet. * Fix compilation issues. * Use serde_json to parse JSON. * Add some basic tests. * Working on docs. * Fix compilation * Finish docs for signed. * Work on unsigned send. * Add some tests and missing docs. * Add example of StorageValueRef * Add weight. * Extra \n * Fix im-online test. * Bump runtime. * Fix tests. * Apply suggestions from code review Co-Authored-By: Joshy Orndorff <[email protected]> Co-Authored-By: Gavin Wood <[email protected]> * Address review comments. Co-authored-by: Joshy Orndorff <[email protected]> Co-authored-by: Gavin Wood <[email protected]>
-
- Feb 18, 2020
-
-
Nikolay Volf authored
* in executive * in other places * to UnsafeResult * move doc comment * apply suggestions * allow validity mocking for TestXt * add test * augment checkable instead of another trait * fix im online test * blockbuilder dihotomy * review suggestions * update test * Update client/block-builder/src/lib.rs * updae spec_version Co-authored-by: Bastian Köcher <[email protected]>
-
- Feb 17, 2020
-
-
Shawn Tabrizi authored
* meaningfull -> meaningful * initialise -> initialize * tokans -> tokens * incentivise -> incentivize * lenght -> length * incentivisation -> incentivization * doesnt't -> doesn't * overwriten -> overwritten * lifecycle -> life cycle * lifecycle -> life cycle * usefull -> useful * noone -> no one * spaming -> spamming * defered -> deferred * hieght -> height * sumation -> summation * ingore -> ignore * registed -> registered * Auxialary -> Auxiliary * loggin -> logging * independance -> independence * trailling -> trailing * responsability -> responsibility * trunkated -> truncated * Weither -> Whether * informations -> information * Runtume -> Runtime * choosen -> chosen * delcataion -> declaration * Unchekced -> Unchecked * defintion -> definition * scrach -> scratch * imput -> input * transfered -> transferred * endownment -> endowment * Determinator -> Determiner * relevent -> relevant * emited -> emitted * acocunt -> account * proprotional -> proportional * instantiaion -> instantiation * commited -> committed * tombstonedead -> tombstone * uwnrap -> unwrap * acount -> account * specialised -> specialized * existant -> existent * requried -> required * Anull -> Annul * AUTHORITES -> AUTHORITIES * underyling -> underlying * recognisable -> recognizable * Capitalise -> Capitalize * reportfor -> report for * hearbeat -> heartbeat * onlineness -> being online * creater -> creator * Bytearray -> Byte array * Despoit -> Deposit * substratced -> subtracted * Curent -> Current * imbalanes -> imbalances * countfown -> countdown * inexisting -> inexistent * additionaly -> additionally * substracted -> subtracted * auxilary -> auxiliary * parital -> partial * in't -> isn't * compatability -> compatibility * infomation -> information * etected -> detected * extrinsiscs -> extrinsics * reprensentation -> representation * coonfiguration -> configuration * primtives -> primitives * miscelanious -> miscellaneous * VERISON -> VERSION * endcoded -> encoded * Genrates -> Generates * miliseconds -> milliseconds * occured -> occurred * trully -> truely * truely -> truly * conjuction -> conjunction * encouters -> encounters * customised -> customized * deterministicly -> deterministically * finalisation -> finalization * pluggable -> plugable * wakeup -> wake-up * interemdiate -> intermediate * intepreting -> interpreting * finalzied -> finalized * throgh -> through * extinsic -> extrinsic * convient -> convenient * allocater -> allocator * propagateable -> propagatable * succesfuly -> successfully * finalising -> finalizing * publically -> publicly * phrasee -> phrase * substration -> substractions * substractions -> subtractions * neccessarily -> necessarily * Inlucde -> Include * unefficient -> inefficient * thay -> they * funtion -> function * datastructures -> data structures * infromation -> information * propagatable -> propagable * ecountered -> encountered * recognise -> recognize * intergration -> integration * lastet -> latest * datatypes -> data types * datatype -> data type * Strongarming -> Strong Arming * avaible -> available * Commiting -> Committing * Retreiving -> Retrieving * shoud -> should * canonicaliziation -> canonicalization * comitted -> committed * clonable -> cloneable * Uknown -> Unknown * reponse -> response * arbitary -> arbitrary * Capapbilities -> Capabilities * responsbile -> responsible * initialisation -> initialization * cames -> came * intemediate -> intermediate * reqeust -> request * intance -> instance * explcitly -> explicitly * neighor -> neighbor * reolving -> resolving * untill -> until * Validte -> Validate * deserailize -> deserialize * literaly -> literally * preceeding -> preceding * abpve -> above * chcecked -> checked * numbet -> number * Unknow -> Unknown * halfs -> halves * gossup -> gossip * givent -> given * immediatelly -> immediately * slicable -> sliceable * conensus -> consensus * Mimicks -> Mimics * acccept -> accept * serialise -> serialize * exstrinsics -> extrinsics * panicks -> panics * maintaince -> maintenance * repeatidely -> repeatedly * anecstor -> ancestor * becasue -> because * processer -> processor * Prunning -> Pruning * insterested -> interested * unuseful -> not useful * yeided -> yielded * descendfing -> descending * corresponts -> corresponds * survivew -> survive * keps -> keeps * ligh -> light * prerequisities -> prerequisites * positiion -> position * depedency -> dependency * extrinisic -> extrinsic * atomicaly -> atomically * staticly -> statically * resul -> result * timestamb -> timestamp * Utilites -> Utilities * ammount -> amount * pocess -> process * exteral -> external * Update client/finality-grandpa/src/tests.rs * Update primitives/io/src/lib.rs Co-Authored-By: joe petrowski <[email protected]> * Update primitives/blockchain/src/lib.rs Co-Authored-By: joe petrowski <[email protected]> * Update frame/support/src/weights.rs Co-Authored-By: joe petrowski <[email protected]> * Update bin/node/cli/tests/common.rs Co-Authored-By: joe petrowski <[email protected]> * Update client/api/src/execution_extensions.rs Co-Authored-By: joe petrowski <[email protected]> * Update client/cli/src/params.rs Co-Authored-By: joe petrowski <[email protected]> * Update client/executor/common/src/sandbox.rs Co-Authored-By: joe petrowski <[email protected]> * Update client/api/src/execution_extensions.rs Co-Authored-By: joe petrowski <[email protected]> * Update client/finality-grandpa/src/communication/mod.rs Co-Authored-By: joe petrowski <[email protected]> * Update client/state-db/src/pruning.rs Co-Authored-By: joe petrowski <[email protected]> * Update frame/contracts/src/tests.rs Co-Authored-By: joe petrowski <[email protected]> * Update client/api/src/execution_extensions.rs * bump impl * timestamb -> timestamp Co-authored-by: joe petrowski <[email protected]>
-
- Jan 31, 2020
-
-
Tomasz Drwięga authored
* Initial version. * Fix tests. * Refactor using StorageValueRef. * Add tests and apply review suggestions. * Bump runtime. Co-authored-by: Gavin Wood <[email protected]>
-
- Jan 05, 2020
-
-
Shawn Tabrizi authored
-
- Dec 19, 2019
-
-
Bastian Köcher authored
* Make `decl_error!` errors usable This pr implements support for returning errors of different pallets in a pallet. These errors need to be declared with `decl_error!`. The pr changes the following: - Each dispatchable function now returns a `DispatchResult` which is an alias for `Result<(), DispatchError>`. - `DispatchError` is an enum that has 4 variants: - `Other`: For storing string error messages - `CannotLookup`: Variant that is returned when something returns a `sp_runtime::LookupError` - `BadOrigin`: Variant that is returned for any kind of bad origin - `Module`: The error of a specific module. Contains the `index`, `error` and the `message`. The index is the index of the module in `construct_runtime!`. `error` is the index of the error in the error enum declared by `decl_error!`. `message` is the message to the error variant (this will not be encoded). - `construct_runtime!` now creates a new struct `ModuleToIndex`. This struct implements the trait `ModuleToIndex`. - `frame_system::Trait` has a new associated type: `ModuleToIndex` that expects the `ModuleToIndex` generated by `construct_runtime!`. - All error strings returned in any module are being converted now to `DispatchError`. - `BadOrigin` is the default error returned by any type that implements `EnsureOrigin`. * Fix frame system benchmarks
-
- Dec 16, 2019
-
-
Tomasz Drwięga authored
* Rename: Phase 1. * Unify codec. * Fixing: Phase 2 * Fixing: Phase 3. * Fixing: Phase 4. * Fixing: Phase 5. * Fixing: Phase 6. * Fixing: Phase 7. * Fixing: Phase 8. Tests * Fixing: Phase 9. Tests!!! * Fixing: Phase 10. Moar tests! * Finally done! * More fixes. * Rename primitives:: to sp_core:: * Apply renames in finality-grandpa. * Fix benches. * Fix benches 2. * Revert node-template. * Fix frame-system in our modules.
-
- Dec 10, 2019
-
-
Weiliang Li authored
* primitives/sr-io -> primitives/io * fix * rename * runtime-io -> sp-io * git mv * fix ci * remove package name * fix * fix * try minimizing diff * try minimizing diff again * try minimizing diff again
-
- Dec 02, 2019
-
-
Benjamin Kampmann authored
* Adding script for rename, could be applicable for nodes on top of it, too * add stderr and gitlab ci features * apply script * fix now minor details in expected stderr * Update the Cargo.lock * fix name: sc-transaction -> sc-tracing * fix rename in script, too
-
- Nov 27, 2019
-
-
Gavin Wood authored
* Validators don't get slashed for offlineness until 10% at once * Update frame/im-online/src/tests.rs Co-Authored-By: Marcio Diaz <[email protected]> * Update frame/im-online/src/tests.rs Co-Authored-By: Marcio Diaz <[email protected]> * Apply suggestions from code review Co-Authored-By: joe petrowski <[email protected]>
-
- Nov 22, 2019
-
-
Shawn Tabrizi authored
* palette -> frame * PALETTE, Palette -> FRAME * Move folder pallete -> frame * Update docs/Structure.adoc Co-Authored-By: Benjamin Kampmann <[email protected]> * Update docs/README.adoc Co-Authored-By: Benjamin Kampmann <[email protected]> * Update README.adoc
-
Tomasz Drwięga authored
* Pass Extensions instead of individual objects. * Move TransactionPool to a separate ExternalitiesExtension. * Fix compilation.? * Clean up. * Refactor testing utilities. * Add docs, fix tests. * Fix doctest. * Fix formatting and add some logs. * Add some docs. * Remove unused files.
-
- Nov 21, 2019
-
-
joe petrowski authored
* /paint to /palette * rename paint to palette * rename the modules in palette to be pallets * update Structure.adoc * bump impl * fix CI directory * Update docs/Structure.adoc Co-Authored-By: Benjamin Kampmann <[email protected]>
-
- Nov 14, 2019
-
-
Benjamin Kampmann authored
* Adding first rough ouline of the repository structure * Remove old CI stuff * add title * formatting fixes * move node-exits job's script to scripts dir * Move docs into subdir * move to bin * move maintainence scripts, configs and helpers into its own dir * add .local to ignore * move core->client * start up 'test' area * move test client * move test runtime * make test move compile * Add dependencies rule enforcement. * Fix indexing. * Update docs to reflect latest changes * Moving /srml->/paint * update docs * move client/sr-* -> primitives/ * clean old readme * remove old broken code in rhd * update lock * Step 1. * starting to untangle client * Fix after merge. * start splitting out client interfaces * move children and blockchain interfaces * Move trie and state-machine to primitives. * Fix WASM builds. * fixing broken imports * more interface moves * move backend and light to interfaces * move CallExecutor * move cli off client * moving around more interfaces * re-add consensus crates into the mix * fix subkey path * relieve client from executor * starting to pull out client from grandpa * move is_decendent_of out of client * grandpa still depends on client directly * lemme tests pass * rename srml->paint * Make it compile. * rename interfaces->client-api * Move keyring to primitives. * fixup libp2p dep * fix broken use * allow dependency enforcement to fail * move fork-tree * Moving wasm-builder * make env * move build-script-utils * fixup broken crate depdencies and names * fix imports for authority discovery * fix typo * update cargo.lock * fixing imports * Fix paths and add missing crates * re-add missing crates
-
- Nov 10, 2019
-
-
Bastian Köcher authored
* Adds first version of traits for generating the host functions * First steps of the procedural macro * Implements generation of the host extern functions * Prefix ext host function with snake case trait name * Implement host functions implementation on the host * Change `HostFunctions` interface * Implement `HostFunctions` for tuples * Make `WasmExecutor` generic over the host functions * Begin to add a test and make it compile * Make the test succeed * Add test to ensure that host functions are not found * It's alive! Make the `set_storage` test work * Add test for mutable references * Code cleanup and documentation etc * Add marker trait for types that should be passed as SCALE encoded * Inherit the visibility from the trait and more improvements * More impls and move them into their own file * Code simplification by dropping one trait * Give it a better name * Implement traits for arrays * Refactor code to support pass by codec/inner * Docs * Implement pass by inner for some crypto types and add a test * Implement exchangeable function support * Rewrite sr-io with as runtime interface * Start reworking after master merge * Adds `PassByCodec` derive * Adds `PassByInner` derive * Fix compilation errors * More implementations * Implement runtime interface traits for `str` * Make `sr-io` compile again * Fix more compilation errors * More progress on getting stuff back to compile * More compilation fixes * Fix warnings * Remove le conversions * Add support for `wasm_only` interfaces * Implement `Allocator` interface * Improve error message * Move `WasmAllocator` to `sr-io` and more clean ups * Use correct function signature for wasm functions * Store the host functions with the Wasm runtime * Docs update * Fix compilation after master merge * Remove `sr-io/without_std` * Make `srml-support` tests run again * More compilation error fixes * Use correct doc syntax * Fix test-runtime * Fix compilation * Catch native panics when executing the wasm runtime As with the native runtime, we now catch all native panics when we execute the wasm runtime. The panics inside the wasm runtime were already catched before by the wasm executor automatically, but any panic in the host functions could bring down the node. The recent switch to execute the native counterpart of the host function in `sr-io`, makes this change required. The native `sr-io` functions just `panic` when something is not provided or any other error occured. * Fix compilation * Don't panic in a panic * Move `sr-sandbox` to new runtime interface * Fixes tests after sandbox changes * Make sure we detect invalid utf8 * Fixes after master merge * Adds pass by enum strategy * Fix wasmtime integration * Some macro structure clean up * Rework and test exchangebale host functions * PassBy derive macros documentation * Docs for `runtime_interface` macro * Support wild card argument names * Adds ui tests * Make sure that we are backwards compatible to the old runtime interfaces * Documentation * Fixes after latest master merge * Make `wasmtime` happy * Make `full_crypto` work * Make the new interface versionable * Rename `Sanboxing` to `Sandbox` * Don't finalize in test while importing * Fix Performance regression * Fix test
-
- Nov 03, 2019
-
-
Tomasz Drwięga authored
* Add pre-dispatch checks for ValidateUnsigned * Deprecate ValidateUnsigned. * Bump specversion. * Fix test.
-
Tomasz Drwięga authored
* Don't send a heartbeat if already online. * Remove env_logger. * Update lock. * Bump runtime. * Merge master
-
- Nov 01, 2019
-
-
Gavin Wood authored
* Add AllGood event for im_online * Another event just in case. * Bump runtime
-
- Oct 31, 2019
-
-
André Silva authored
* im-online: account for block authorship * im-online: add test for block authorship onlineness * im-online: cleanup * im-online: fix test
-
- Oct 10, 2019
-
-
Bastian Köcher authored
This function executes the given closure in a context where the test externalities are set. This makes the srml tests easier to write, as the test externalities need to be created anyway.
-
- Oct 09, 2019
-
-
Bastian Köcher authored
* Move `Externalities` into `substrate-externalities` - `Externalities` now support generic extensions - Split of `primtives-storage` for storage primitive types * Move the externalities scoping into `substrate-externalities` * Fix compilation * Review feedback * Adds macro for declaring extensions * Fix benchmarks * Introduce `ExtensionStore` trait * Last review comments * Implement it for `ExtensionStore`
-
- Sep 30, 2019
-
-
André Silva authored
* srml: im-online: fix pruning of received heartbeats * srml: im-online: add test for received heartbeats pruning * srml: im-online: remove unused variables from test * node: bump spec_version
-
- Sep 13, 2019
-
-
Tomasz Drwięga authored
* Use session::validators instead of staking::current_elected * Basic test framework. * Initialize validators, attempt to heartbeat. * Use dummy crypto for im-online testing. * Remove printlns. * Finish test, make it invalid. * Add reporting test. * Finalize the test. * Remove dumbness. * Updates. * Update AuRa * Update srml/im-online/src/tests.rs Co-Authored-By: Bastian Köcher <[email protected]> * Derive Ord * Add some more tests. * Remove stray todo. * Bump runtime version. * Bump impl-trait-for-tuples. * Enforce new version of trait-for-tuples.
-