1. Jan 21, 2019
    • Marcio Diaz's avatar
      Fix revert for non finalized blocks (#1479) · 3c08ca7e
      Marcio Diaz authored
      * fix: temporal modification to make revert works for non finalized blocks
      
      * fix: print info when the number of blocks asked to revert is higher than the number of reversible blocks
      
      * fix: remove function get_db_path_for_subcommand and remove it from all subcommands
      
      * fix: revert only non finalized blocks
      
      * fix: improve printed information for revert command
      
      * fix: new wasm file
      
      * chore: remove unused parameter
      
      * fix: revert log logic
      
      * fix: subcommands should take sub_matches instead of matches
      
      * fix: removing confusing message
      3c08ca7e
    • Bastian Köcher's avatar
      Revert new wasm allocator (#1502) · 4d0eea0e
      Bastian Köcher authored
      * Revert "Better allocator for wasm (#1460)"
      
      This reverts commit c3bee593.
      
      * Update wasm files
      4d0eea0e
  2. Jan 18, 2019
  3. Jan 17, 2019
    • Sergei Pepyakin's avatar
      Contracts module rejig (#1358) · 8ef14908
      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: default avatarpepyakin <[email protected]>
      
      * Update srml/contract/src/lib.rs
      
      Co-Authored-By: default avatarpepyakin <[email protected]>
      
      * Line wraps
      
      * Wrapping macros
      
      * Add _ prefix
      
      * Grumbles
      
      * Doc updates.
      
      * Update srml/contract/src/wasm/mod.rs
      
      Co-Authored-By: default avatarpepyakin <[email protected]>
      
      * Update srml/contract/src/lib.rs
      
      Co-Authored-By: default avatarpepyakin <[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: default avatarpepyakin <[email protected]>
      
      * Update srml/contract/src/exec.rs
      
      Co-Authored-By: default avatarpepyakin <[email protected]>
      
      * Update srml/contract/src/exec.rs
      
      Co-Authored-By: default avatarpepyakin <[email protected]>
      
      * Recompile node_runtime
      8ef14908
    • thiolliere's avatar
      impl HasCompact for Perbill and Permill (#1411) · 8b679660
      thiolliere authored
      * impl Compact<> and HasCompact for Permill Perbill
      
      * update parity-codec to 2.2
      
      * add Cargo.lock
      
      * add lock and build for runtime
      
      * rebuild Cargo.lock after rebase
      8b679660
    • Svyatoslav Nikolsky's avatar
      c2e498f7
  4. Jan 16, 2019
    • Gav Wood's avatar
      Split Indices module from Balances (#1404) · defa2ec3
      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
      defa2ec3
    • Marcio Diaz's avatar
      Make use of NLL in client crate (#1436) · 5d454b71
      Marcio Diaz authored
      * fix: set edition to 2018 in Cargo.toml.
      
      * fix: refactor function to make use of NLL.
      
      * fix: result of applying 'cargo fix --edition' command.
      
      * fix: removes extern crate
      
      * fix: remove module uses from lib.rs
      
      * fix: tests imports
      5d454b71
  5. Jan 14, 2019
  6. Jan 11, 2019
    • Svyatoslav Nikolsky's avatar
      GRANDPA finality proof draft (#1268) · b57c4585
      Svyatoslav Nikolsky authored
      * grandpa finality proof
      
      * prove GrandpaApi::grandpa_authorities using parent block + some docs
      
      * create justification when consensus data is changed
      
      * generate justifications periodically
      
      * test for ConsensusChanges
      b57c4585
  7. Jan 10, 2019
  8. Jan 09, 2019
  9. Jan 08, 2019
  10. Jan 07, 2019
  11. Dec 22, 2018
    • Bastian Köcher's avatar
      Make `deposit_event` work with none generic events (#1309) · 9156ea30
      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
      9156ea30
  12. Dec 21, 2018
    • Gav Wood's avatar
      Sudo module (#1315) · f847f59f
      Gav Wood authored
      * Sudo module
      
      * Fix comment
      
      * Fix errors
      
      * Fix test
      
      * Update hashes
      
      * Final test fixes and build
      
      * Final hex change
      f847f59f
  13. Dec 20, 2018
    • Gav Wood's avatar
      Bump to v0.9.1 (#1307) · 36e8a513
      Gav Wood authored
      36e8a513
    • cheme's avatar
      Include default values in storage metadata (#1264) · fe193bd2
      cheme authored
      * Add a 'default' field to metadata. It contains code to generate the
      default value.
      
      * wasm update
      
      * Make 'default' field an `Option`
      
      * Boxed fn is not static, that won't be fine
      
      * static fn won't do it to as it cannot get T param, will try fat trait
      
      * Fat pointer over phantom data compatible with static instantiation
      
      * DecodeDifferent is cool, using it for decoding.
      
      * using once cell to do what would require copying lazy_static internals.
      
      * Remove cache when no_std (non compatible deps)
      
      * wasm bins update
      
      * Fuse tooling struct and enum derive.
      fe193bd2
  14. Dec 19, 2018
  15. Dec 17, 2018
  16. Dec 13, 2018
    • Gav Wood's avatar
      Lock-voting (#1254) · 0dd72145
      Gav Wood authored and asynchronous rob's avatar asynchronous rob committed
      * Optionally long lock voting
      
      * Lock voting.
      
      * Fix tests
      
      * Comment update
      
      * Comments
      
      * Minor grumbles
      
      * Docs.
      0dd72145
  17. Dec 12, 2018
  18. Dec 10, 2018
    • asynchronous rob's avatar
      Punish offline validators, aura-style (#1216) · 691e6e8f
      asynchronous rob authored
      * make offline-reporting infrastructure more generic
      
      * add a listener-trait for watching when the timestamp has been set
      
      * prevent inclusion of empty offline reports
      
      * add test for exclusion
      
      * generate aura-offline reports
      
      * ability to slash many times for being offline "multiple" times
      
      * Logic for punishing validators for missing aura steps
      
      * stub tests
      
      * pave way for verification of timestamp vs slot
      
      * alter aura import queue to wait for timestamp
      
      * check timestamp matches seal
      
      * do inherent check properly
      
      * service compiles
      
      * all tests compile
      
      * test srml-aura logic
      
      * aura tests pass
      
      * everything builds
      
      * some more final tweaks to block authorship for aura
      
      * switch to manual delays before step
      
      * restore substrate-consensus-aura to always std and address grumbles
      
      * update some state roots in executor tests
      
      * node-executor tests pass
      
      * get most tests passing
      
      * address grumbles
      691e6e8f
    • Gav Wood's avatar
      Governance: Voters put money where mouth is (#1183) · 18d818b5
      Gav Wood authored
      * Referendums only gett enacted after a delay; successful voters must
      lock funds up until enactment.
      
      * Build fixes.
      
      * Configurable council enact delay, fix test builds.
      
      * Fix spelling
      
      * Remove TODO
      18d818b5
    • Bastian Köcher's avatar
      Make `decl_module` not require a return type for functions (#1230) · 823c52d7
      Bastian Köcher authored
      If no return type is specified, `Result` is added and
      `Ok(())` is returned by default.
      
      Closes: #1182
      823c52d7
    • Wei Tang's avatar
      e592d3ed
    • Bastian Köcher's avatar
      Make runtime api generate version and identifier information (#1226) · df338c24
      Bastian Köcher authored
      * Make `decl_runtime_apis!` implement `RuntimeApiInfo` for all runtime
      apis
      
      * Make the runtime side generate the info constants as well
      
      * Make `RuntimeApiInfo` implementation use the correct generics
      
      * Adds a test for the runtime api info stuff
      
      * Remove duplicated code by using block from `test-client`
      
      * Adds `compile_fail` tests for `api_version`
      
      * Adds documentation for `api_version`
      
      * Make `impl_runtime_apis!` generate `RUNTIME_API_VERSIONS`
      
      * Update documentation and tests for `RUNTIME_API_VERSIONS`
      
      * Implement `has_api` by using the `RuntimeApiInfo`
      
      * Make `impl_runtime_apis` check that trait identifiers are unique
      
      * Prefix all runtime api function with the corresponding trait
      
      So `execute_block` will be called `Core_execute_block`.
      This makes it possible to have traits implement a function with the
      same name.
      
      * Rebase master
      
      * Update after master rebase
      df338c24
  19. Dec 09, 2018
    • cheme's avatar
      `decl_storage` as a proc_macro (#1176) · 2ad85dab
      cheme authored
      
      
      * `decl_storage` parsing of the macro (TODO change tool crate structure)
      
      * Start formatting, for now use inner macro.
      Still missing optional formating last part (genesis ...).
      
      * Calling extra genesis macro
      
      * decl_storage lines parsing.
      
      * genesis macro as quote (need some cleaning reorg)
      
      * dirty $crate substitute
      
      * proc crate reorg.
      
      * PR impl : skip usage of phantom data, it only applies in test and
      council (others required it).
      
      * Remaining macro of decl_storage, warning stringify behave sometime
      oddly.
      
      * Formatting code and some cleaning.
      
      * Include line parsing to main struct (cannot use existing macro anymore).
      
      * Remove genesis phantom data when there is already a field with type
      parameter.
      
      * Revert wasm files
      
      * Remove old version of `decl_storage`.
      
      * Fix false positive for phantom trait (additional type check on config
      build).
      
      * slight changes:
      - return token errors instead of panic
      - do not use useless intermediate vec
      
      * Update srml/support/procedural/tools/derive/src/lib.rs
      
      remove indent
      
      Co-Authored-By: default avatarcheme <[email protected]>
      
      * Switch iterations to fold, remove unused import.
      2ad85dab
  20. Dec 08, 2018
    • André Silva's avatar
      Grandpa validator set handoff justification (#1190) · 8a19aa54
      André Silva authored
      * core: make block justification optional
      
      * runtime: update wasm binaries
      
      * core: optionally pass justification on finalize_block
      
      * finality-grandpa: add channel to trigger authority set changes
      
      this will allow the `BlockImport` to trigger an authority set change when
      importing a change block that provides a justification (when syncing)
      
      * finality-grandpa: move finalize_block to free function
      
      * finality-grandpa: add GrandpaOracle for auth set liveness checking
      
      this will be used by `BlockImport` to check whether the authority set for a
      given block is still live, if the authority set isn't live then importing a
      change block requires a justification.
      
      * finality-grandpa: store justification on finalized transition blocks
      
      * finality-grandpa: check justification on authority set change blocks
      
      * finality-grandpa: poll grandpa liveness oracle every 10 seconds
      
      * finality-grandpa: spawn grandpa oracle in service setup
      
      * core: support multiple subscriptions per consensus gossip topic
      
      * finality-grandpa: create and verify justifications
      
      * finality-grandpa: update to local branch of grandpa
      
      * finality-grandpa: update to finality-grandpa v0.5.0
      
      * finality-grandpa: move grandpa oracle code
      
      * finality-grandpa: fix canonality check
      
      * finality-grandpa: clean up error handling
      
      * finality-grandpa: fix canonical_at_height
      
      * finality-grandpa: fix tests
      
      * runtime: update wasm binaries
      
      * core: add tests for finalizing block with justification
      
      * finality-grandpa: improve validation of justifications
      
      * core: remove unused IncompleteJustification block import error
      
      * core: test multiple subscribers for same consensus gossip topic
      
      * Revert "finality-grandpa: improve validation of justifications"
      
      This reverts commit 51eb2c58.
      
      * finality-grandpa: fix commit validation
      
      * finality-grandpa: fix commit ancestry validation
      
      * finality-grandpa: use grandpa v0.5.1
      
      * finality-grandpa: add docs
      
      * finality-grandpa: fix failing test
      
      * finality-grandpa: only allow a pending authority set change per fork
      
      * finality-grandpa: fix validator set transition test
      8a19aa54
  21. Dec 03, 2018
  22. Nov 30, 2018
    • Bastian Köcher's avatar
      Make `AuthorityId` serialize/deserialize to/from `ss58` (#1180) · f00d7955
      Bastian Köcher authored
      * Make `AuthorityId` serialize/deserialize to/from `ss58`
      
      * Updates the wasm files
      f00d7955
    • Bastian Köcher's avatar
      Rewrite `impl_runtime_apis!` and `decl_runtime_apis!` as proc-macro (#1174) · 5651ac71
      Bastian Köcher authored
      
      
      * Rewrites `impl_runtime_apis!` macro as `proc-macro`
      
      * Adds some documentation
      
      * Require the `impl_runtime_apis` to use a path for accessing the trait
      
      * Make the runtime implement `GetNodeBlockType`
      
      * Moves first chunk of runtime api code into the `impl_runtime_apis` macro
      
      This also renames `ClientWithApi` into `RuntimeApi`.
      
      * Make `impl_runtime_apis` use `runtime` api version automatically
      
      * `decl_runtime_apis` automatically adds `Block: BlockT` as generic parameter
      
      * Remove function generic arguments in block builder api
      
      * Remove some unnused stuff from the `decl_runtime_apis` macro
      
      * Make `InherentData` working again
      
      * Make `impl_runtime_apis!` implement the `RuntimeApi` side as well
      
      * Make it compile again after rebasing with master
      
      * Split `sr-api-macros` into multiple files
      
      * Reimplement `decl_runtime_apis!` as proc_macro
      
      * Use `decl_runtime_apis!` for `Core` as well and improve error reporting
      
      * Adds documentation for `decl_runtime_apis!` and `impl_runtime_apis!`
      
      * Move some code
      
      * Adds compile fail tests
      
      * Adds a test and fixes some bugs
      
      * Make `impl_runtime_apis!` support `_` as parameter name
      
      * Fixes build errors with wasm
      
      * Wasm rebuild after master rebase
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarbkchr <[email protected]>
      
      * Addresses some grumbles
      
      * Adds test to ensure that method signatures need to match
      
      * New wasm files
      5651ac71
    • Guanghua Guo's avatar
      Delete unused extern (#1178) · 3d7aa48c
      Guanghua Guo authored
      3d7aa48c
  23. Nov 22, 2018
  24. Nov 21, 2018
    • asynchronous rob's avatar
      Minimal switch of substrate-node to GRANDPA /Aura (#1128) · 3a8a3925
      asynchronous rob authored
      
      
      * add beginnings of SRML grandpa library
      
      * get srml-grandpa compiling
      
      * tests for srml-grandpa
      
      * add optional session integration to grandpa SRML
      
      * start integration into node runtime
      
      * Allow extracting pending change from header digest
      
      * Make it compile on wasm
      
      * make tests compile again
      
      * Move Authority Key fetching into service, simplify service factory construction
      
      * Generalize Authority Consensus Setup system
      
      * Add Authority Setup Docs
      
      * Allow CLI params to be extensible
      
       - move params to structopts
       - split parsing and default command execution
       - add custom config to node
       - extended parsing of custom config
       - extending params via structop's flatten
      
      * Minor fixes on cli extension params:
       - added docs
       - re-add actual app name, rather than node-name
       - make strategy and subcommand optional
      
      * better cli params
      
      * synchronize GRANDPA and normal node authorities
      
      * Implement grandpa::network for gossip consensus
      
      * run_grandpa in Node
      
      * Fix missed merge error
      
      * Integrate grandpa import queue
      
      * more specific type def
      
      * link up linkhalf and import block
      
      * make grandpa future send
      
      * get compiling
      
      * Fix new params convention and license header
      
      * get it running
      
      * rebuild node runtime WASM
      
      * change logging level
      
      * Update node/cli/src/params.rs
      
      Co-Authored-By: default avatarrphmeier <[email protected]>
      
      * Update node/cli/src/params.rs
      
      Co-Authored-By: default avatarrphmeier <[email protected]>
      
      * Update node/cli/src/lib.rs
      
      Co-Authored-By: default avatarrphmeier <[email protected]>
      
      * Update node/runtime/src/lib.rs
      
      Co-Authored-By: default avatarrphmeier <[email protected]>
      
      * Update node/cli/src/lib.rs
      
      Co-Authored-By: default avatarrphmeier <[email protected]>
      
      * Clean up and Fixme for mutable config
      
      * Move GrandpaService Integration into grandpa, feature gated but on per default
      
      * Fixing grandpa runtime module test
      
      * Update wasm runtime hashes for tests
      
      * GRANDPA: use post-header hash when logging scheduled changes
      
      * add an extra bit of logging to authorities
      
      * fixing missing constrain
      
      * remove old code
      
      * move `NewAuthorities` to an event in srml-grandpa
      
      * fix node-executor tests to use grandpa log
      
      * Remove GossipConsensus from tests, use newly provided sync-feature, fixes tests
      
      * Update to latest wasm runtimes
      
      * address grumbles
      
      * address grumbles
      
      * only derive deserialize when using std
      
      * Clean up use of Deserialize
      3a8a3925
    • Gav Wood's avatar
      Remove unneeded bounds. (#1149) · 34c797e8
      Gav Wood authored
      * Remove unneeded bounds.
      
      * Other wasm.
      34c797e8
  25. Nov 18, 2018
    • Bastian Köcher's avatar
      Revert and redo #952 (#1133) · e59521d2
      Bastian Köcher authored
      * Revert "Pruning changes trie without digests (#952)"
      
      This reverts commit 468d4698.
      
      * pruning changes tries without digests
      
      * u64::max_value()
      
      * Update wasm files and fix merge conflict
      
      * Fixes tests
      e59521d2