Commit Graph

1085 Commits

Author SHA1 Message Date
Tomasz Drwięga d5c21c9707 Send each log as a separate notifications. (#7175) 2017-12-05 20:14:50 +03:00
Svyatoslav Nikolsky 5bd2894146 Fixed build && test (#7128)
* fixed build && test

* fixed rpc tests
2017-11-23 14:47:08 +01:00
Jaco Greeff 17df58b767 Add localUrl to serialization 2017-11-21 15:02:54 +01:00
Robert Habermeier 81212c5031 Merge branch 'master' into upload-crates 2017-11-17 16:42:41 +01:00
Svyatoslav Nikolsky e16f6fb9d9 SecretStore: servers set change session api (#6925)
* SecretStore: first key versions flush

* SecretStore: key versions in encryption session

* SecretStore: flush key versions negotiation session

* SecretStore: connected key version negotiation session to cluster

* SecretStore: cluster sessions container refactoring

* SecretStore: flush

* SecretStore: flush key versions

* SecretStore: flush

* SecretStore: delegation proto

* SecretStore: decryption_session_is_delegated_when_node_does_not_have_key_share

* SecretStore: fixed version in decryption session

* SecretStore: signing_session_is_delegated_when_node_does_not_have_key_share

* SecretStore: started restoring admin sessions

* SecretStore: restoring admin sessions

* SecretStore: removed obsolete ShareRemove && ShareMove sessions

* SecretStore: ShareAdd math tests only require old_t+1 nodes

* SecretStore: ShareAdd revamp using new math backend

* SecretStore: do not include isolated nodes into consensus_group

* SecretStore: ServersSetChange + ShareAdd revamp

* removed debug printlns

* SecretStore: key version negotiation tests

* SecretStore: removed debug/merge artifacts

* SecretStore: fixed master node selection

* SecretStore: cleanup + tests + fixes

* SecretStore: uncommented tests

* SecretStore: cleaning up

* SecretStore: cleaning up + tests

* SecretStore: cleaning up

* SecretStore: cleaning up && tests

* SecretStore: fixing TODOs

* SecretStore: fixing TODOs + cleanup

* SecretStore: fixing TODOs

* SecretStore: nodes_add_to_the_node_with_obsolete_version

* SecretStore: nodes_add_fails_when_not_enough_share_owners_are_connected

* SecretStore: tests

* SecretStore: signing && delegation tests

* SecretStore: signing && decryption tests when some nodes are isolated

* SecretStore: sessions_are_removed_when_initialization_fails

* SecretStore: ceaning up

* SecretStore: removed obsolete comments

* SecretStore: signing_session_completes_if_node_does_not_have_a_share

* SecretStore: initial ServersSetChange API

* SecretStore: added secretstore_signServersSet RPC

* SecretStore: ChangeServersSet parse tests

* SecretStore: fixes after manual ServersSetChange tests

* lost file

* fixed network ports overlap in tests

* lost files
2017-11-16 17:34:23 +01:00
Marek Kotewicz e6048e4a34
Merge pull request #7054 from paritytech/allocate_with_zeroes
Small performance gain in allocations
2017-11-14 15:48:11 +01:00
Marek Kotewicz 5a76d35ca8
Merge pull request #7051 from paritytech/td-jsonrpc-bump
Bump JSON-RPC version
2017-11-14 15:43:26 +01:00
Kirill Pimenov 6ddabc0f49 Small performance gain in allocations
As measured in
https://gist.github.com/kirushik/e0d93759b0cd102f814408595c20a9d0,
it's much faster not to iterate over zeroes, and just allocate a
contiguous array of zeroes directly.
2017-11-14 13:06:50 +01:00
Tomasz Drwięga f7fa9f6e9d
Drop jsonrpc_core::Error 2017-11-14 12:17:48 +01:00
Tomasz Drwięga 7e512c637a
Bump version. 2017-11-13 22:52:25 +01:00
Tomasz Drwięga 8b85f648ca
HashMap::retain 2017-11-13 17:09:30 +01:00
Tomasz Drwięga 72907da2ae
Garbage collect hashmap entries. 2017-11-12 12:50:13 +01:00
Robert Habermeier ec5519ccd1 rename hash crate to keccak-hash 2017-11-10 20:08:28 +01:00
Nicolas Gotchac 8c6b89df72 Merge branch 'master' into fix-nonce-reservation 2017-11-10 17:36:12 +01:00
Nicolas Gotchac 15c97336a4 Create hashmap in RPC Apis 2017-11-10 17:11:04 +01:00
Nicolas Gotchac 4c8780f188 Use nonce reservation per address 2017-11-09 19:49:34 +01:00
Robert Habermeier 4a07010539 Merge branch 'master' into light-local-tx 2017-11-07 16:56:28 +01:00
Tomasz Drwięga ffee6aacff Creating pending block with all transactions from the queue (#6942)
* Allow to include all queue transactions in pending block.

* Fix tests.
2017-11-03 15:20:20 +01:00
Arkadiy Paronyan 60bb2d9c74
Set zero nonce and gasprice for calls by default (#6954) 2017-11-02 12:50:08 +01:00
Tomasz Drwięga 0a69d5ac4c Return decoded seal fields. (#6932) 2017-11-01 11:29:03 +01:00
Tomasz Drwięga ec44e3d265 Fix serialization of status in transaction receipts. (#6926) 2017-11-01 11:25:10 +01:00
Tomasz Drwięga b861ad37a4 Reserve nonces for signing (#6834)
* Nonce future - reserve and dispatch

* Single thread nonce tests

* Track status of reserved nonces.

* Initialization of nonce reservations.

* Prospective Signer

* Fix cli tests.
2017-11-01 11:23:18 +01:00
Marek Kotewicz 39e27076ad
Merge pull request #6842 from paritytech/td-evm-json
Fix JSON tracing for sub-calls.
2017-10-29 21:47:14 -07:00
Tomasz Drwięga b98150526c Fix serialization of non-localized transactions (#6868)
* Fix serialization of non-localized transactions.

* Return proper SignedTransactions representation.
2017-10-24 12:13:00 +02:00
Tomasz Drwięga 025244e8b2 Return error on timed unlock attempt. (#6777) 2017-10-24 11:57:55 +02:00
Robert Habermeier 965dff3d32 light: get local transactions by hash 2017-10-24 07:30:53 +02:00
Tomasz Drwięga 42e23a9633
Return proper SignedTransactions representation. 2017-10-23 16:45:06 +02:00
Tomasz Drwięga 4ba2587226
Fix serialization of non-localized transactions. 2017-10-23 14:46:36 +02:00
Tomasz Drwięga 2d222a5920
Capture traces and write some tests. 2017-10-20 16:06:36 +02:00
Tomasz Drwięga 1d9542fe88
Fix RPC compilation warnings. 2017-10-17 15:41:32 +02:00
Kirill Pimenov 86c2633280 Migrate to Futures in SigningQueue (#6689)
* oneshot channels instead of custom promises

* Future instead of handle_dispatch

* Even less copying

* Those explicit waits were a mistake, thanks, @tomusdrw

* No more unsafe polling

* Test for the new `is_done()` method

* Mark Futures as `#[must_use]`

* Solve most compilation warnings

* `try_ready!` is more ideomatic

* Turn spaces into tabs

* Documentation and visibility improvements

* Minor code style improvements

* Make Futures run on an explisit reactor

* Another round of code style issues

* Simplify ConfirmationReceiver type

* Flatten ConfirmationOutcome into a plain Result type

* Get rid of a separate `pending` set, it was a stupid idea

* Clarify `add_request` docs

* No need to reduce the scope of the mutex here
2017-10-17 14:50:53 +02:00
debris 16d84f8ecf finished removing ipc 2017-10-16 18:18:43 +02:00
Arkadiy Paronyan 5b29b6d064 Squash remaining warnings (#6789)
* Fixed comment warnings

* Fixed remaining warnings
2017-10-16 12:31:52 +02:00
debris db3ff67182 Merge branch 'master' into kvdb_split 2017-10-15 16:40:20 +02:00
debris 616cafb04a renamed kvdb_memorydb::in_memory -> kvdb_memorydb::create 2017-10-15 16:17:15 +02:00
Dmitry Kashitsyn dab40e832c Removes redundant `mut` in rpc 2017-10-15 20:11:07 +07:00
debris 5c220ab64b Merge branch 'master' into kvdb_split 2017-10-13 12:18:49 +02:00
Arkadiy Paronyan f3ea2f354e v1.9.0 (#6727) 2017-10-12 23:44:02 +02:00
Robert Habermeier a2d9b6f9ce remove RPC parameter leniency now that mist formats correctly (#6651) 2017-10-12 23:35:52 +02:00
debris eb526b7769 separated kvdb into 3 crates: kvdb, kvdb-memorydb && kvdb-rocksdb, #6693 2017-10-12 15:36:27 +02:00
Marek Kotewicz 6279ff32f5 Separate migrations from util (#6690)
* separate migration from util and make its dependencies into libs:

* snappy
* kvdb
* error
* common

* renamed common -> macros

* util error does not depend on snappy module

* ethsync does not depend on util nor ethcore_error

* nibbleslice and nibblevec merged with patricia_trie crate

* removed unused dependencies from util

* util journaldb traits does not need to be public

* util_error

* fixed ethcore compile error

* ignore .swo files

* Update chain.rs
2017-10-10 20:01:27 +02:00
Robert Habermeier b010fb5004 Light Client: fetch transactions/receipts by transaction hash (#6641)
* rpc: transaction/receipt requests made async

* rpc: light client fetches transaction and uncle by hash/index

* on_demand: request type for transaction index

* serve transaction index requests in light protocol

* add a test for transaction index serving

* fetch transaction and receipts by hash on light client

* fix decoding tests

* light: more lenient cost table parsing (backwards compatible)

* fix tests and warnings

* LES -> PIP

* Update provider.rs

* proper doc comments for public functions
2017-10-08 18:19:27 +02:00
Afri Schoedon 360ecd3728 Add Musicoin and MCIP-3 UBI hardfork. (#6621)
* Add musicoin chain spec.

* Add musicoin to parity node

* Add musicoin to the wallet

* Add i18n for musicoin

* Align musicoin chain spec with 1.8, ref #6134

* Update musicoin bootnodes

* Prepare MCIP-3 in musicoin chain spec.

* Update musicoin chain spec with contract addresses for MCIP-3

* Extend ethash params by MCIP-3

* Fix musicoin chain spec json

* Use U256 for block rewards.

* Update musicoin registrar

* Fix merge leftovers

* Update musicoin chain spec for latest master

* Bestow MCIP-3 block reward(s).

* Update musicoin registry once and for all

* Align MCIP-3 block reward with go implementation

* Remove mcip3 test chain spec from repository

* Update MCIP-3 block rewards

* Musicoin homestead transition is at 1_150_000

* Expect mcip3 transtion to be properly defined in chain spec.

* Panic handling for mcip to default to regular block rewards if not specified

* Giving mcip3 rewards a useful default value.

* Fix ethjson tests.

* Update musicoin chain spec

* Fix tests 0:)

* Add musicoin mcip3 era test spec.

* Update musicoin chain spec(s)

* Add tests for mcip3 era block rewards

* Fix tests

* Disable byzantium for musicoin

* Pass miner reward to the tracer.

* Allow modifying blockreward in MCIP-3 transition.
2017-10-08 18:17:59 +02:00
Arkadiy Paronyan 77a2c77c45 Renamed RPC receipt statusCode field to status (#6650) 2017-10-06 09:11:17 +02:00
Tomasz Drwięga e8b418ca03 Update jsonrpc dependencies and rewrite dapps to futures. (#6522)
* Bump version.

* Fix RPC crate.

* Fix BoxFuture in crates.

* Compiles and passes tests!

* Get rid of .boxed()

* Fixing issues with the UI.

* Remove minihttp. Support threads.

* Reimplement files serving to do it in chunks.

* Increase chunk size.

* Remove some unecessary copying.

* Fix tests.

* Fix stratum warning and ipfs todo.

* Switch to proper branch of jsonrpc.

* Update Cargo.lock.

* Update docs.

* Include dapps-glue in workspace.

* fixed merge artifacts

* Fix test compilation.
2017-10-05 12:35:01 +02:00
Anton Gavrilov 0a5c9b0465 Add pagination for trace_filter rpc method (#6312)
* Optional offset and count added on client level

* Rpc interface extended

* Tests corrected

* Filtering code refactored a little bit

* Offset type was changed to usize

* Handling of block hash in offset added

* Offset reworked to number

* Trailing comma removed

* Import for Quantity type added

* Offset and count moved into filter object

* Lost comma removed

* Return empty vec instead of None in case of incorrect range
2017-10-03 10:03:46 +02:00
Robert Habermeier bc167a211b Generalize engine trait (#6591)
* move common forks and parameters to common params

* port specs over to new format

* fix RPC tests

* parity-machine skeleton

* remove block type

* extract out ethereum-specific methods into EthereumMachine

* beginning to integrate Machine into engines. dealing with stale transitions in Ethash

* initial porting to machine

* move block reward back into engine

* abstract block reward logic

* move last hash and DAO HF logic into machine

* begin making engine function parameters generic

* abstract epoch verifier and ethash block reward logic

* instantiate special ethereummachine for ethash in spec

* optional full verification in verify_block_family

* re-instate tx_filter in a way that works for all engines

* fix warnings

* fix most tests, further generalize engine trait

* uncomment nullengine, get ethcore tests compiling

* fix warnings

* update a bunch of specs

* re-enable engine signer, validator set, and transition handler

* migrate basic_authority engine

* move last hashes into executedblock

* port tendermint

* make all ethcore tests pass

* json-tests compilation

* fix RPC tests: change in gas limit for new block changed PoW hash

* fix minor grumbles

* validate chainspecs

* fix broken import

* fix transaction verification for pre-homestead
2017-09-26 14:19:08 +02:00
Wei Tang d8af9f4e7b Add RPC eth_chainId for querying the current blockchain chain ID (#6329)
* Add RPC eth_chainId for querying the current blockchain chain ID

Currently although we can use `net_version` RPC call to get the
current network ID, there's no RPC for querying the chain ID. This
makes it impossible to determine the current actual blockchain using
the RPC. An ETH/ETC client can accidentally connect to an ETC/ETH RPC
endpoint without knowing it unless it tries to sign a transaction or
it fetch a transaction that is known to have signed with a chain
ID. This has since caused trouble for application developers, such as
MetaMask, to add multi-chain support.

The same RPC endpoint is also about to be merged for ETC's
go-ethereum: https://github.com/ethereumproject/go-ethereum/pull/336

* Add eth_chainId to js's web3 interface

* Add a mocked test for eth_chainId

* Add chainId in js's jsonrpc interfaces

* Change return type for eth_chainId to `Option<u64>`

* Change name eth_chainId to parity_chainId

* Wrong test name and missed var for rpc_parity_chain_id test

* Use U256 to return chainId and fix for master

u64 returns decimal integer, and there seems to be no type called
U64. So here I use U256 to return the hex integer.

* Fix chainID test

Before EIP155 fork number, chainID should be null.

* Change both parity_chainId and transaction::chainId to use U64

This makes it consistent that all chain ids returned are hex string.

* Fix wrong U64 serialization
2017-09-26 14:17:07 +02:00
Jef 5c08698fa0 Use memmap for dag cache (#6193)
* Rebase and fix compilation errors (tests not yet fixed)

* Use `debug_assert` over `assert`

* Fix tests

* Assert safety, clean up

* Fix up stale cache removal, move one assert to debug_assert

* Remove printlns

* Add licenses

* Fix benches

* Inline some no-ops in a hot loop that weren't being inlined

* Add spooky comment to make sure no-one removes the inlining annotations

* Minor cleanup

* Add option to switch between mmap and ram

* Flag ethash to use less memory when running light client

* Fix tests

* Remove todo comment (it's done)

* Replace assertion with error return

* Fix indentation

* Use union instead of `transmute`

* Fix benches

* Extract to constants

* Clean up and fix soundness holes

* Fix formatting

* Ignore missing-file errors

* Make incorrect cache size an error condition instead of a panic, remove dead code

* Fix compilation errors from rebase

* Fix compilation errors in tests

* Fix compilation errors in tests
2017-09-25 19:45:33 +02:00
Tomasz Drwięga 965e8ae74e
Use host as ws/dapps url if present. 2017-09-21 15:11:15 +02:00