Commit Graph

2740 Commits

Author SHA1 Message Date
Jaco Greeff
8453dda7ef Merge branch 'master' into ui-2
# Conflicts:
#	js/package-lock.json
#	js/package.json
#	js/src/api/api.js
#	js/src/api/local/accounts/accounts.js
#	js/src/api/local/localAccountsMiddleware.js
#	js/src/api/local/transactions.js
#	js/src/api/pubsub/signer/signer.js
#	js/src/api/subscriptions/signer.js
#	js/src/api/transport/jsonRpcBase.js
#	js/src/api/transport/middleware.js
#	js/src/api/util/format.js
#	js/src/api/util/format.spec.js
#	js/src/contracts/abi/index.js
#	js/src/contracts/badgereg.js
#	js/src/dapps/tokenreg/Application/application.css
#	js/src/dapps/tokenreg/Application/application.js
#	js/src/modals/CreateWallet/WalletDetails/walletDetails.js
#	js/src/modals/CreateWallet/WalletDetails/walletDetails.spec.js
#	js/src/modals/CreateWallet/createWalletStore.js
#	js/src/modals/DeployContract/ParametersStep/parametersStep.js
#	js/src/modals/DeployContract/deployContract.js
#	js/src/modals/ExecuteContract/DetailsStep/detailsStep.js
#	js/src/modals/WalletSettings/walletSettings.js
#	js/src/redux/providers/certifications/actions.js
#	js/src/redux/providers/certifications/middleware.js
#	js/src/redux/providers/certifications/reducer.js
#	js/src/redux/providers/requestsActions.js
#	js/src/redux/providers/tokensActions.js
#	js/src/ui/AccountCard/accountCard.css
#	js/src/ui/Balance/balance.js
#	js/src/ui/Balance/balance.spec.js
#	js/src/ui/DappCard/dappCard.js
#	js/src/ui/Form/AddressSelect/addressSelect.js
#	js/src/ui/Form/AddressSelect/addressSelectStore.js
#	js/src/ui/Form/InputAddressSelect/inputAddressSelect.js
#	js/src/ui/Form/TypedInput/typedInput.js
#	js/src/ui/IdentityIcon/identityIcon.js
#	js/src/ui/MethodDecoding/tokenValue.js
#	js/src/util/tx.js
#	js/src/util/wallets.js
#	js/src/util/wallets/consensys-wallet.js
#	js/src/util/wallets/foundation-wallet.js
#	js/src/views/Account/account.js
#	js/src/views/Accounts/List/list.js
#	js/src/views/Contract/Queries/inputQuery.js
#	js/src/views/Contract/Queries/queries.js
#	js/src/views/Contract/contract.js
#	js/src/views/Signer/components/SignRequest/signRequest.css
#	js/src/views/Signer/components/SignRequest/signRequest.js
#	js/src/views/Signer/components/SignRequest/signRequest.spec.js
2017-10-16 12:41:41 +02:00
Dmitry Kashitsyn
3df67b376b Removes redundant mut in ethcore 2017-10-15 20:10:20 +07:00
Arkadiy Paronyan
b0c15497e1 Fixed kovan chain validation (#6758)
* Fixed kovan chain validation

* Fork detection

* Fixed typo
2017-10-14 21:59:26 +02:00
Marek Kotewicz
190c1dcede removed redundant evm deps (#6757) 2017-10-14 19:29:09 +02:00
Arkadiy Paronyan
691e93834c Fixed modexp gas calculation overflow (#6741) 2017-10-13 16:06:53 +02:00
Arkadiy Paronyan
f3ea2f354e v1.9.0 (#6727) 2017-10-12 23:44:02 +02:00
Marek Kotewicz
e51e54eeeb Merge pull request #6694 from paritytech/no-sleep
Prevent going offline when restoring or taking a snapshot
2017-10-12 15:54:29 +02:00
arkpar
301190a16f
Fixed RETURNDATA out of bounds check 2017-10-12 12:57:27 +02:00
arkpar
99143c5872
Prevent going offline when restoring or taking snapshot 2017-10-12 12:37:03 +02:00
Marek Kotewicz
bfff19ca9f Merge pull request #6705 from paritytech/serde-migration
Removes  dependency on rustc_serialize (#5988)
2017-10-11 18:17:40 +02:00
Arkadiy Paronyan
7029dda87c Fixed potential exp len overflow (#6686) 2017-10-11 16:41:28 +02:00
Dmitry Kashitsyn
604cdde71d Fixes bench and removes rustc_serialize dependency (#5988) 2017-10-11 17:39:12 +07:00
debris
025c5aebc9 Merge branch 'master' into difficulty-tests 2017-10-10 20:10:24 +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
arkpar
cc681c623f
Fixed tests after rename 2017-10-10 17:48:37 +02:00
arkpar
e5a7a674f9
Get rid of blockchain test warnings 2017-10-10 16:56:03 +02:00
arkpar
7234a7c630
Difficulty tests 2017-10-10 14:51:12 +02:00
Nikolay Volf
1601030081 WASM gas schedule (#6638)
* some failing tests

* finalize

* fallable -> fallible

* alter mul/div/static_i64

* Update schedule.rs

* to u32

* balance charge also

* review fixes

* remove redundant line
2017-10-09 13:12:58 +02:00
Marek Kotewicz
65ca2f9a07 Merge pull request #6660 from paritytech/byzantium-fork
Byzantium fork block number
2017-10-09 11:25:49 +02:00
Marek Kotewicz
de0d12d73c Merge pull request #6652 from paritytech/returndatasize-builtin-fix
Fixed RETURNDATA size for built-ins
2017-10-09 11:24:34 +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
Robert Habermeier
59365b0133 fix aura backcompat: revert to manual encoding/decoding of transition proofs (#6665) 2017-10-06 17:36:26 +02:00
arkpar
07c63c14f3
Byzantium fork block number 2017-10-06 09:47:04 +02:00
arkpar
6a1eea1b3d
Fixed RETURNDATA size for built-ins 2017-10-05 19:31:29 +02:00
Robert Habermeier
bae6a5eeec move additional_info to engines, fixes registry on non-ethash chains 2017-10-05 15:34:30 +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
fro
6956d218b5 address balance extern provided for wasm 2017-10-04 19:09:18 +03:00
Nikolay Volf
4260910db6 WASM Runtime refactoring (#6596)
* refactoring to new pwasm-std

* pass reference

* remove ref

* missing underscores
2017-10-04 13:15:59 +02:00
Svyatoslav Nikolsky
5e83ff8835 fix compilation 2017-10-03 12:59:48 +03: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
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
Lorenzo Manacorda
aab1cf020c
Rename builder module to batch 2017-09-24 20:09:40 +02:00
Lorenzo Manacorda
5f025cc1b8
Rename Requests to Batch 2017-09-24 20:09:30 +02:00
Arkadiy Paronyan
4dc7d3dc45 Fixed receipt serialization and RPC (#6555) 2017-09-21 10:11:53 +02:00
Marek Kotewicz
f38d34919b Random cleanups / improvements to a state (#6472) 2017-09-19 11:34:13 +02:00
Arkadiy Paronyan
1b6d840ada Ropsten fork (#6533) 2017-09-18 11:12:42 +02:00
Arkadiy Paronyan
25b35ebddd Byzantium updates (#5855)
* EIP-211 updates

* benchmarks

* blockhash instruction gas cost updated

* More benches

* EIP-684

* EIP-649

* EIP-658

* Updated some tests

* Modexp fixes

* STATICCALL fixes

* Pairing fixes

* More STATICALL fixes

* Use paritytech/bn

* Fixed REVERTing of contract creation

* Fixed more tests

* Fixed more tests

* Blockchain tests

* Enable previously broken tests

* Transition test

* Updated tests

* Fixed modexp reading huge numbers

* Enabled max_code_size test

* Review fixes

* Updated pairing pricing

* missing commas (style)

* Update test.rs

* Small improvements

* eip161abc
2017-09-15 21:07:54 +02:00
Hawstein
dd7a60c7a8 rename trie to patricia-trie 2017-09-15 11:49:26 +08:00
Hawstein
ade37be25b separate trie from util and make its dependencies into libs:
* bytes
* hashdb
* memorydb
* nibbleslice
* nibblevec
2017-09-15 11:03:53 +08:00
Alexey
79659bdc76 WASM sha3 test (#6512)
* sha3 test for empty input implemented

* rename sha3-> keccak

* update keccak test. Now it expects input to hash

* fix gas_left in tests
2017-09-14 19:32:29 +02:00
Fredrik Harrysson
75b6a31e87 Trezor Support (#6403)
* Copy modal from keepkey branch and generalize

The keepkey PinMatrix modal needs to be the same for Trezor, but we
should probably try to keep it general since it can be used for both.

* Add trezor communication code

This is a result of much trial-and-error and a couple of dead-ends in
how to communicate and wire everything up.

Code here is still a bit WIP with lots of debug prints and stuff.

The test works though, it is possible to sign a transaction.

* Extend the basic lib to allow Trezor

This is kind of ugly and needs some cleanup and generalization. I’ve
just copy-pasted some things to bring in the trezor wallets. I’ve also
had to add a lock to the USB API so that only one thing talks to the
USB at once.

* Add RPC plumbing needed

We need to be able to get “locked” devices from the frontend to figure
out if we’re going to display the PinMatrix or not. Then we need to be
able to send a pin to a device.

* Add logic to query backend for Trezor and display PinMatrix

There’s a bug somewhere here because signing a transaction fails if you
take too long to press the confirm button on the device.

* Change back to paritytech branch

As my fork has been merged in.

* Converting spaces to tabs, as it should be

* Incorporate correct handling of EIP-155

Turns out the Trezor was adjusting the v part of the signature, and
we’re already doing that so it was done twice.

* Some circular logic here that was incorrect

BE-encoded U256 is almost the same as RLP encoded without the
size-byte, except for <u8 sized values. What’s really done is
BE-encoded U256 and then left-trimmed to the smallest size. Kind of
obvious in hindsight.

* Resolve issue where not clicking fast enough fails

The device will not repeat a ButtonRequest when you read from it, so
you need to have a blocking `read` for whatever amount of time that you
want to give the user to click. You could also have a shorter timeout
but keep retrying for some amount of time, but it would amount to the
same thing.

* Scan after pin entry to make accepting it faster

* Remove ability to cancel pin request

* Some slight cleanup

* Probe for the correct HID Version to determine padding

* Move the PinMatrix from Accounts to Application

* Removing unused dependencies

* Mistake in copying over stuff from keepkey branch

* Simplify FormattedMessage

* Move generated code to external crate

* Remove ethcore-util dependency

* Fix broken import in test

This test is useless without a connected Trezor, not sure how to make
it useful without one.

* Merge branch 'master' into fh-4500-trezor-support

# Conflicts:
#	rpc/src/v1/helpers/dispatch.rs

* Ignore test that can't be run without trezor device

* Fixing grumbles

* Avoiding owning data in RPC method
* Checking for overflow in v part of signature
* s/network_id/chain_id
* Propagating an error from the HID Api
* Condensing code a little bit

* Fixing UI.

* Debugging trezor.

* Minor styling tweak

* Make message type into an actual type

This makes the message type that the RPC message accepts into an actual
type as opposed to just a string, based on feedback. Although I’m not
100% sure this has actually improved the situation.

Overall I think the hardware wallet interface needs some refactoring
love.

* Split the trezor RPC endpoint

It’s split into two more generic endpoints that should be suitable for
any hardware wallets with the same behavior to sit behind.

* Reflect RPC method split in javascript

* Fix bug with pin entry

* Fix deadlock for Ledger

* Avoid having a USB lock in just listing locked wallets

* Fix javascript issue (see #6509)

* Replace Mutex with RwLock

* Update Ledger test

* Fix typo causing faulty signatures (sometimes)

* *Actually* fix tests

* Update git submodule

Needed to make tests pass

* Swap line orders to prevent possible deadlock

* Make setPinMatrixRequest an @action
2017-09-14 19:28:43 +02:00
ivegotasthma
e9abcb2f6d Fix compiler warning (#6491) 2017-09-12 09:16:39 +02:00
Svyatoslav Nikolsky
03e039b13d wasm: math_sub_with_overflow test (#6474) 2017-09-11 11:43:33 +02:00
Nicolas Gotchac
f1a050366f Fix slow balances (#6471)
* Update token updates

* Update token info fetching

* Update logger

* Minor fixes to updates and notifications for balances

* Use Pubsub

* Fix timeout.

* Use pubsub for status.

* Fix signer subscription.

* Process tokens in chunks.

* Fix tokens loaded by chunks

* Linting

* Dispatch tokens asap

* Fix chunks processing.

* Better filter options

* Parallel log fetching.

* Fix signer polling.

* Fix initial block query.

* Token balances updates : the right(er) way

* Better tokens info fetching

* Fixes in token data fetching

* Only fetch what's needed (tokens)

* Fix linting issues

* Revert "Transaction permissioning (#6441)"

This reverts commit eed0e8b03a.

* Revert "Revert "Transaction permissioning (#6441)""

This reverts commit 8f96415e58dde652e5828706eb2639d43416f448.

* Update wasm-tests.

* Fixing balances fetching

* Fix requests tracking in UI

* Fix request watching

* Update the Logger

* PR Grumbles Fixes

* PR Grumbles fixes

* Linting...
2017-09-10 18:03:35 +02:00
Nikolay Volf
ee14a3fb31 WASM runtime update (#6467)
* refactor to new parity-wasm

* more errors refactoring

* final test

* update tests

* fix merge bugs
2017-09-10 18:02:31 +02:00
Robert Habermeier
ffced4e17f fix test build 2017-09-05 21:24:15 +02:00
Robert Habermeier
7d1c7a0474 allow optional casting of engine client to full client 2017-09-05 17:55:14 +02:00
Robert Habermeier
ad39446e87 Revert "fixed master (#6465)"
This reverts commit 899538ae25.
2017-09-05 17:54:05 +02:00