- Jan 22, 2019
-
-
Sergei Pepyakin authored
* WIP * Use system::Origin::Signed as an origin * Add a vm test for ext_dispatch_call * Take fee for dispatching a Call # Conflicts: # node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm * Clean & Rebuild # Conflicts: # node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm * Dispatch call test. * Rebuild the runtime. * Fix the length of the buffer. * Rebuild binaries.
-
- Jan 17, 2019
-
-
Sergei Pepyakin authored
* Move prepare under code. * Schedule update * CodeHash * create takes code_hash * pass mem def and use code in vm::execute * Actually save and load code * Use T::Hash as CodeHash * Explicit entrypoint name * Return code_hash and deposit an Event * Charge for deployed code with gas. * ImportSatisfyCheck and FunctionImplProvider * Progress. * Use new infrastructure for checking imports * Rename entrypoint to entrypoint_name * Use strings instead of a Error enum * Clean * WIP * Fix macro_define_env test. * Fix vm code tests. * Remove tests for now. * Fix borked merge * Fix build for wasm * fmt * Scaffolding for abstracting vm. * Hook up execution to exec layer. * Fix vm tests. * Use schedule directly in WasmLoader * Implement test language. * Add input_data test. * Max depth test * ext_caller * Simplify test. * Add TODO * Some tests and todos. * top_level * Clean. * Restore a couple of integration tests. * Add a few comments. * Add ext_address runtime call. * Deduplicate caller/self_account * Add not_exists test. * Change bool to TransferCause. * Add address tests. * Remove output_buf from parameter. * return from start fn. * Smart gas meter * Tracing * Fix prepare tests. * Code moving * Add ExecFeeToken * Use tokens everywhere. * Make it compile in no_std. * Lift all test requirements to TestAuxiliaries * A minor clean * First create tests * Remove unneeded TODO * Docs. * Code shuffling * Rename create → instantiate * Add test address. * Code shuffling * Add base_fee tests. * rejig the code * Add some comments * on_finalise comment * Move event deposit further * Update Cargo.lock * Use crates.io version of pwasm-utils * Format todo comments * Fix formatting * Comments * EmptyOutputBuf and OutputBuf split. * Restore code_hash * Fix node-executor. * Fix typo * Fix fmt * Update srml/contract/src/account_db.rs Co-Authored-By: pepyakin <[email protected]> * Update srml/contract/src/lib.rs Co-Authored-By: pepyakin <[email protected]> * Line wraps * Wrapping macros * Add _ prefix * Grumbles * Doc updates. * Update srml/contract/src/wasm/mod.rs Co-Authored-By: pepyakin <[email protected]> * Update srml/contract/src/lib.rs Co-Authored-By: pepyakin <[email protected]> * Add comment * Use saturation to signal overflow * Add prepare_test! macro * Require deploy function. * Add entry point tests * Add comment. * Rename code → code_cache to better describe * Get rid of weird match! * Recompile binaries * Add comments * refuse_instantiate_with_value_below_existential_deposit * Little fix * Make test more complete * Clean * Add integration test for instantiation * Rebuild runtime. * Add some tests. * Attach an issue to a TODO * Attach another issue * Apply suggestions from code review Co-Authored-By: pepyakin <[email protected]> * Update srml/contract/src/exec.rs Co-Authored-By: pepyakin <[email protected]> * Update srml/contract/src/exec.rs Co-Authored-By: pepyakin <[email protected]> * Recompile node_runtime
-
- Jan 16, 2019
-
-
Gav Wood authored
* Indices module * Remove indices stuff from balances * Rejob node, move Lookup into system. * Fix up some modules. * Fix democracy tests * Fix staking tests * Fix more tests * Final test fixes * Bump runtime versions * Assets uses compact dispatchers * Contracts module uses indexed addressing * Democracy has more compact encoding * Example now demonstrates compact eencoding * Sudo uses indexed address * Upgrade key also uses indexed lookups * Assets more compact types. * Fix test * Rebuild runtime, whitespace * Remove TOODs * Remove TODOs * Add a couple of tests back to balances. * Update lib.rs * Update lib.rs
-
- Jan 11, 2019
-
-
Xiliang Chen authored
* Move double map to support and generalize it * add docs back * reduces the number of required allocations
-
- Dec 22, 2018
-
-
Bastian Köcher authored
* Make `deposit_event` work with none generic events `fn deposit_event() = default` will now be used for none generic events `fn deposit_event<T>() = default` is now for generic events. * Update wasm files * Fixes some spelling mistakes * Update wasm and fix new module
-
- Nov 12, 2018
-
-
Sergey Pepyakin authored
* Rename Config → Schedule. * Fetch and pass config. * Integrate config everywhere. * <<<E as Ext>::T as Trait> → <<E::T as Trait> * Update roots * Cache existential_deposit * Update COMPLEXITY.md * Update roots.
-
Gav Wood authored
* Remove superfluous serde requirements. * Try to ensure hash is serde * Fixups * Building again * Attempt to reenable Block (doesn't build) * Fixes compilation for node cli * Fixes test compilation * Fix wasm * Fix tests * Remove unneeded changes * Fix up comments * Reenable some code * Compile error when origin misused. * Remove unnecessary includes of `serde_derive` * Cleanups
-
- Oct 27, 2018
-
-
Benjamin Kampmann authored
* Generalize BlockImport - move ImportBlock, BlockOrigin, ImportResult into shared sr-primitives - let Consensus provide and traits again - update consensus traits to latest development - implement traits on client::Client, test_client::TestClient - update RHD to use the new import_block API * Move ImportBlock into consensus-common * Send import notification in aura tests * Integrating aura into service * Make Signatures more generic * Aura Block Production with the given key * run aura on the thread pool * start at exact step start in aura * Add needed wasm blob, in leiu of better solutions. * Make API ids consistent with traits and bring upstream for sharing. * Add decrease_free_balance to Balances module * Encode `Metadata` once instead of two times * Bitops include xor * Upgrade key module. * Default pages to somewhat bigger. * Introduce upgrade key into node * Add `Created` event
-
- Oct 26, 2018
-
-
Bastian Köcher authored
* General `decl_module` improvements * Make `deposit_event` implementable by `decl_module!` * Make `decl_module!` implement calls directly * Regenerate the wasm file after master rebase
-
- Oct 23, 2018
-
-
Bastian Köcher authored
-
- Oct 17, 2018
-
-
Sergey Pepyakin authored
* Initial sketch. * More work. * Grammar. * Fix. * Fix grammar.
-
- Oct 16, 2018
-
-
Gav Wood authored
* Try to make everything compact * Make `Clone` work * Fix * Move contracts and balances over to compact encoding * Session and timestamp are compact * Sataking uses compact numbers * Treasury now compact * Compact Democracy * Council is compact * Fix
-
- Oct 05, 2018
-
-
guanqun authored
* enhance macro decl_storage() * update the state root hash * fix one comment
-
- Sep 27, 2018
-
-
Bastian Köcher authored
* Removes `rlp` dependency * Enable warnings about unused crates in the CI * Remove all the unused crates * Make tests working again
-
- Sep 25, 2018
-
-
Sergey Pepyakin authored
-
- Sep 15, 2018
-
-
Sergey Pepyakin authored
* WIP * Direct return of output data. * Docs and renamings. * Add get_storage test. * Overwrite the scratch buffer.
-
- Sep 12, 2018
-
-
* Remove unneeded script * Rename Substrate Demo -> Substrate * Rename demo -> node * Build wasm from last rename. * Merge ed25519 into substrate-primitives * Minor tweak * Rename substrate -> core * Move substrate-runtime-support to core/runtime/support * Rename/move substrate-runtime-version * Move codec up a level * Rename substrate-codec -> parity-codec * Move environmental up a level * Move pwasm-* up to top, ready for removal * Remove requirement of s-r-support from s-r-primitives * Move core/runtime/primitives into core/runtime-primitives * Remove s-r-support dep from s-r-version * Remove dep of s-r-support from bft * Remove dep of s-r-support from node/consensus * Sever all other core deps from s-r-support * Forgot the no_std directive * Rename non-SRML modules to sr-* to avoid match clashes * Move runtime/* to srml/* * Rename substrate-runtime-* -> srml-* * Move srml to top-level
-
- Sep 11, 2018
-
-
Sergey Pepyakin authored
-
- Sep 10, 2018
-
-
Sergey Pepyakin authored
* Introduce data and salt into ContractAddressFor * Accept salt arg in ext_create. * Integrate contracts into the demo runtime * Make libcontract compile to wasm * Remove salt parameter. This now is concern of userspace. * Rebuild binaries.
-
- Sep 07, 2018
-
-
Gav Wood authored
* System and Balances switched to new call model * Fixed up executive for new pardigm * Consensus works with Origin * Timestamp ported over * Session now compatible * Ported staking * Treasury compatible * Expunge MaybeEmpty * Make democracy work * Council compatible * Remove some aux-dispatch stuff and fix balances * Rename aux -> origin, fix contracts * Fix test * Fix example * Update macro to remove superfluous cruft * Make work with new macro * Tests * Fix some tests * Tests * Fix grumbles * Final grumble
-
- Sep 05, 2018
-
-
Bastian Köcher authored
* `decl_storage!` exposes json metadata about the storage The metadata can be accessed by calling `store_json_metadata()`. * Hide internal macros in the documentation * Include the function documentation in the store json metadata * Adapt the storage declarations to use doc comments
-
Bastian Köcher authored
-
- Sep 04, 2018
-
-
Gav Wood authored
* Introduce treasury and document * Revert bad changes * More reversions * Add example crate - Remove HasPublicAux - Rename Concrete -> Runtime * Actually commit stuff * Changes * Propagate block number in finalise. * Fix and build example * Fixes. * Fix compilation for treasury. * Fix the treasury test * Tests * Fix. * Fix tests * Fix a few grumbles * Fixes * Fix grumbles
-
- Sep 01, 2018
-
-
Sergey Pepyakin authored
* Rename ext_transfer → ext_call There are several tests where gas was changed. This is due to shrinking the name and consequently a size of contracts. * Fix macros Specifically, make fixes that allows to use a function without arguments (apart from ctx). For example: ```rust ext_return_42(ctx) -> u32 => { Ok(42) } ``` Also, add impl ConvertibleToWasm for u64. * Implement passing input data buffer from top-level This allows the transaction initiator to pass some input data that can be accessed from the executed contract. However, this only works for the top-level contract. The contract still cannot pass input data to the callee contract. The reason for that is that API doesn't support this presently. This will be addressed in the following commits. * Input data passing thru `ext_call` `ext_call` now takes a buffer (or more specifically, pointer to the start of and size of a buffer). This allows contracts to pass input data while calling into other contracts. * Input data passing thru `ext_create` Same as previous commit but for `ext_create`. * Trap on decoding error instead of panicking * Don't cascade failure in ext_call Instead, if callee doesn't complete successfuly, return a non-zero status code. This will prevent cascading traps up to the top-level. Due to this some tests were altered so that they now expect successful transfer instead of a failure. * Don't cascade failure in ext_create Same as previous commit but for ext_create. * Specify how much gas to allot for a call * Specify how much gas to allot for a create * Update tests.rs
-
- Aug 30, 2018
-
-
Gav Wood authored
* Initial commit. * Split out balances module * Minimise Balances trait requirements * Fix up balances, remove balances stuff from staking * Split off and fix up staking module * Fix executive tests * Fix up democracy module * make council work again * Remove unneeded cruft from democracy * Fix up contract module * Fix up rest of tests * Fix minor TODOs * Fix tests * Remove superfluous code * Move offline inherents to consensus module. Fixes #630 * Version needs Decode. * Move Decode back * Fix nits * Refactor to allow custom message
-
- Aug 29, 2018
-
-
Gav Wood authored
* Remove need for ident strings for storage items * Fixes * Fix tests * Minor change to macro grammer
-
- Aug 28, 2018
-
-
Sergey Pepyakin authored
* Add block gas limit check * Fix formatting * Add block_gas_limit test. * Use ExtBuilder in tests * Docs and clean-up. * Correct style
-
Gav Wood authored
* Squashed commit. New slashing mechanism (#554) … * Slashing improvements - unstake when balance too low - unstake after N slashes according to val prefs - don't early-terminate session/era unless unstaked - offline grace period before punishment * Fix warning * Cleanups and ensure slash_count decays * Bump authoring version and introduce needed authoring stub * Rename * Fix offline tracker * Fix offline tracker * Renames * Add test * Tests * Tests. Remove accidental merge files. Merge remote-tracking branch 'origin/master' into gav-new-pos Version bump, fixes (#572) … * Bump version, don't propose invalid blocks * Fix build. * Fixes. * More fixes. * Fix tests. * Fix more tests * More tests fixed Fix merge Fix accidental merge bug Fixes. Staking failsafes … - Don't slash/unstake/change session when too few staking participants - Introduce set_balance PrivCall Make minimum validator count dynamic. test fixes Fix tests. Fix tests Fix tests, update readme. Merge remote-tracking branch 'origin/master' into gav-new-pos Test with release. Use safe math when dealing with total stake Fix test again. Introduce events into runtime. Fix tests Add events for account new/reap Integration-style tests for events. * Remove old code
-
- Aug 15, 2018
-
-
* Genric over hasher * WIP start adding NodeCodec * Add codec to TrieBackend * Typechecks * Fix error type * Cleanup * Tests build (and fail) * Fix tests: don't use MemoryDB::default() * Lockfile * Address grumbles * Teach environmental! about generics * Add Finder artifacts * whitespace * Add a toy impl of Hasher and plug it in to Externalities * Use `uint` and `fixed-hash` from `parity-common` Remove unused U512 Add test to ensure H256 impls heapsizeof * lock file updates * Make hashes Encodable/Decodable * lock file updates * Impl FromIterator for TestExternalities so we can collect() and use map! * Use rustc-hex from crates Use rlp from master so dependencies do not mess up the scope * Fix tests in runtime-io * lockfile shenanigans * Add a BlakeHasher impl * Use BlakeHasher in runtime-io * lockfile updates * ws * Add a Blake2/RLP-flavoured NodeCodec * Use Blake-flavoured Hasher and NodeCodec * lockfile * Implement PartialEq and Default for TestExternalities * Add note about limitations of environmental! * Make it compile, but this is probably broken * Derive Debug so tests in executor can work * Make executor use BlakeHasher * ws * WIP make client generic * typechecks * cleanup * client tests pass * Fix client/db * cleanup * Fix network * Fix rpc * Fix service * Make TestExternalities work better au lieu d'un HashMap * Fix tests in council * Fix tests in contract * Fix tests in council * Fix democracy * Add comment about odd-looking reexports in tests * Don't need to load branch * Fix staking * Fix session * Some polkadot fixes and lockfile * Fix executive * fixup lockfile * Fix polkadot/api * Fix polkadot/service * Fix polkadot/runtime tests * Fix tests in test-runtime * Test fixes * Fix missing component in the `std` feature * Use PhantomData and Result from core * Fix paths Use core * load heapsize on wasm * implement `HeapSizeOf` for wasm * Add toy impl of `blake2_256` for no_std * lockfile * Use kvdb* from parity-common and fix errors * rebuilt lockfile * Add dummy impl of `on_advance_round` for rhododendron::Context * Fix build after merge * Add HeapSizeOf bound where needed * Sort out dependencies for no_std * Add HeapSizeOf bound where needed * use temp branch pending PR merges * Remove unneeded tests * Lock file and wasm artifacts * lockfile * Use magic commit for libp2p * Cleanup * Implement blake2_256 for no_std * Back on parity-common master * missing type params * Update Cargo.lock * whitespace * Rename concrete Rlp node codec "RlpCodec" and use everywhere Implement a Keccak-flavoured Rlp NodeCodec and use everywhere Add a KeccakHasher * Switch to use KeccakHasher * Lock file and runtimes * fixup lockfile * Fix outstanding issue using concrete types (thanks @gnunicorn) * Cleanup * More cleanup * Comment out Blake2 Hasher * implement ext_keccak256 * Address todo: FetchChecker is generic * all tests passing
-
- Jul 29, 2018
-
-
Sergey Pepyakin authored
* decl_module and extract runtime mod * Invert dependency staking←→contract * Remove CodeOf * Remove StorageOf and move double_map * Comment staking test * Clean * Add gas_price and gas_limit * Commit. * Renames * Params * WIP * Rename transfer to call * WIP * Rebuild binaries. * WIP * Backport ctro changes * Call wiring * Commit overlay. * Rename merge → commit, into_state → ..._change_set * WIP * Contract creation routines * Set code of the created account. * Fix the ID of `create` Call * Fix most of the warning. * Add the simplest test in the contract crate * Transfers work! * Add contract_create test. * Clean * Add top-level create test * Clean a bit. * Pass gas_limit and data via create. * Introduce OnAccountKill callback in staking * Hook up OnAccountKill * Comments * Pay for gas. * Refund unused gas in call * Tests for zero call and zero endownment. * Add todo about rewriting docs * Pay for gas in create transactions * Fix refunds * Clean unrelevant comments * fixup! Fix refunds * fixup! Clean unrelevant comments * Move DetermineContractAddress to contract Also restore account removal test * fixup! Clean unrelevant comments * Inline effect_transfer, remove effect_create Remove account_db! * Use own new_test_ext. * Don't account for liability * Add some docs * Move contract_fee into contract module * Take GasMeter in vm::execute * Use GasMeter throughout contract module for meter * gas module refactoring * Clean * Add base call fee * note about gas price should be taken from storage * Add base fee for create * Rename send → call * Clean * Take fee expressed in dots in gas * Add Checked{Add,Sub,Mul,Div} to SimpleArithmetic * Make Gas generic * Store {call,create}_base_fee in storage * Clean * Rename buy_gas * Store gas_price in the storage * Remove unneeded comment. * Bail out if contract already has code. * Todos * Refund even if top-level contract fails. * Fix error msg * Fix caller issue * Extract tests module * Add max_depth var in storage * Remove left over gas_left * Refactor exec * Add test oog test. * set_free_balance_creating * Docs and comments. * Update storage roots because of ContractFee move * Rebuild binaries. * Simplify vm code. * Wrapping. * Refactor a bit. * Typo * UpdateBalanceOutcome enum * Style grumbles. * Rebuild binaries. * Always consume the given amount of gas. * [skip ci] endownment → endowment * Rename `AccountId` generic in on_account_kill * Fix Cargo.lock * Refine docs for gas meter. * [skip ci] Add comments for gas module * Directly assign to `return_data` at declaration * Use slices instead of vecs to pass the input data * Add todo about passing return data without copy * Use checked_add instead of add with overflow * Use return_data directly. * Rebuild binaries. * Rebuild binaries.
-
- Jul 15, 2018
-
-
Arkadiy Paronyan authored
* Refactored Slicable * Docs * Wasm build * Wasm build * Renamed traits * Review nits * Renamed Slicable as well
-
- Jun 18, 2018
-
-
Gav Wood authored
* Merge remote-tracking branch 'origin/master' into gav-xts-dont-panic * Update wasm. * consensus, session and staking all panic-safe. * Democracy doesn't panic in apply. * Fix tests. * Extra helper macro, council depanicked. * Fix one test. * Fix up all council tests. No panics! * Council voting depanicked. * Dispatch returns result. * session & staking tests updated * Fix democracy tests. * Fix council tests. * Fix up polkadot parachains in runtime * Fix borked merge * More Slicable support Support general `Option` and array types. * Basic storage types. * Existential deposit for contract creation * Basic implemnetation along with removals * Fix tests. * externalities builder fix. * Tests. * Fix up the runtime. * Fix tests. * Add generic `Address` type. * Initial function integration of Address into Extrinsic. * Fix build * All tests compile. * Fix (some) tests. * Fix signing. * Push error. * transfer can accept Address * Make Address generic over AccountIndex * Fix test * Make Council use Address for dispatch. * Fix build * Bend over backwards to support braindead derive. * Repot some files. * Fix tests. * Fix grumbles * Remove Default bound * Fix build for new nightly. * Make `apply_extrinsic` never panic, return useful Result. * More merge hell * Doesn't build, but might do soon * Serde woes * get substrate-runtime-staking compiling * Polkadot builds again! * Fix all build. * Fix tests & binaries. * Reserve some extra initial byte values of address for future format changes * Make semantic of `ReservedBalance` clear. * Fix panic handler. * Integrate other balance transformations into the new model Fix up staking tests. * Fix runtime tests. * Fix panic build. * Tests for demonstrating interaction between balance types. * Repot some runtime code * Fix checkedblock in non-std builds * Get rid of `DoLookup` phantom. * Attempt to make transaction_pool work with lookups. * Remove vscode settings * New attempt at making transaction pool work. * It builds again! * --all builds * Fix tests. * New build. * Test account nonce reset. * polkadot transaction pool tests/framework. * Address grumbles. * Revert bad `map_or` * Rebuild binaries, workaround. * Avoid casting to usize early. * reenable sync tests
-
- Jun 05, 2018
-
-
Sergey Pepyakin authored
* Apply inversion of control to contract module. * Extract contract to it's own crate. * Rebuild binaries.
-
- Jun 01, 2018
-
-
Gav Wood authored
* Merge remote-tracking branch 'origin/master' into gav-xts-dont-panic * Update wasm. * consensus, session and staking all panic-safe. * Democracy doesn't panic in apply. * Fix tests. * Extra helper macro, council depanicked. * Fix one test. * Fix up all council tests. No panics! * Council voting depanicked. * Dispatch returns result. * session & staking tests updated * Fix democracy tests. * Fix council tests. * Fix up polkadot parachains in runtime * Fix borked merge
-
- May 31, 2018
-
-
Gav Wood authored
* Merge remote-tracking branch 'origin/master' into gav-xts-dont-panic * Update wasm. * consensus, session and staking all panic-safe. * Democracy doesn't panic in apply. * Fix tests. * Extra helper macro, council depanicked. * Fix one test. * Fix up all council tests. No panics! * Council voting depanicked. * utilise hygene
-
- May 23, 2018
-
-
Sergey Pepyakin authored
* Make Trait::Balance: Slicable * Rebuild binaries.
-
Sergey Pepyakin authored
* Extract mock module. * Wasm smart-contract instrumentation * Rebuild binaries. * Memory limits and tests.
-
- May 01, 2018
-
-
* Add primitives for sandboxing. * Add sandbox module. * Implement the runtime part of the sandbox. * Rebuild binaries. * Implement smart-contract execution. * Add more documentation.
-