Commit Graph

118 Commits

Author SHA1 Message Date
Steven Roose ec8ee611ca core/types: remove String methods from struct types (#16205)
Most of these methods did not contain all the relevant information
inside the object and were not using a similar formatting type.
Moreover, the existence of a suboptimal String method breaks usage
with more advanced data dumping tools like go-spew.
2018-04-05 14:13:02 +02:00
Péter Szilágyi 28ef23f446
internal/ethapi: make resent gas params optional 2018-03-08 12:29:42 +02:00
Péter Szilágyi b7e57ca1d0
cmd/evm, core/vm, internal/ethapi: don't disable call gas metering 2018-03-05 14:01:13 +02:00
Péter Szilágyi ba7b384019
internal/ethapi: fix getTransactionReceipt 2018-02-28 12:40:15 +02:00
Péter Szilágyi 5cf1d35470
eth, les, light: filter on logs only, derive receipts on demand 2018-02-22 19:12:43 +02:00
Martin Holst Swende b585f76128 ethapi: prevent creating contract if no data is provided (#16108)
* ethapi: prevent creating contract if no data is provided

* internal/ethapi: downcase error for no data on contract creation
2018-02-21 16:10:18 +02:00
Felix Lange a5c0bbb4f4
all: update license information (#16089) 2018-02-14 13:49:11 +01:00
Péter Szilágyi 55599ee95d core, trie: intermediate mempool between trie and database (#15857)
This commit reduces database I/O by not writing every state trie to disk.
2018-02-05 17:40:32 +01:00
Guillaume Ballet dd7a715d73 internal: fix a typo that caused a lint error on travis (#15987) 2018-01-29 15:35:05 +02:00
Martin Holst Swende 722bac84fa ethapi: add personal.signTransaction (#15971)
* ethapi: add personal.signTransaction

* ethapi: refactor to minimize duplicate code

* ethapi: make nonce,gas,gasPrice obligatory in signTransaction
2018-01-26 19:32:43 +02:00
Péter Szilágyi 6f69cdd109
all: switch gas limits from big.Int to uint64 2018-01-03 14:45:35 +02:00
Péter Szilágyi 5258785c81
cmd, core, eth/tracers: support fancier js tracing (#15516)
* cmd, core, eth/tracers: support fancier js tracing

* eth, internal/web3ext: rework trace API, concurrency, chain tracing

* eth/tracers: add three more JavaScript tracers

* eth/tracers, vendor: swap ottovm to duktape for tracing

* core, eth, internal: finalize call tracer and needed extras

* eth, tests: prestate tracer, call test suite, rewinding

* vendor: fix windows builds for tracer js engine

* vendor: temporary duktape fix

* eth/tracers: fix up 4byte and evmdis tracer

* vendor: pull in latest duktape with my upstream fixes

* eth: fix some review comments

* eth: rename rewind to reexec to make it more obvious

* core/vm: terminate tracing using defers
2017-12-21 13:56:11 +02:00
Péter Szilágyi fe070ab5c3
Merge pull request #15674 from chfast/vm-no-snapshot-param
core/vm: Remove snapshot param from Interpreter.Run()
2017-12-18 16:16:59 +02:00
Felix Lange 8c33ac10bf
internal/ethapi: support "input" in transaction args (#15640)
The tx data field is called "input" in returned objects and "data" in
argument objects. Make it so "input" can be used, but bail if both
are set.
2017-12-18 12:50:21 +01:00
Paweł Bylica fb5f25eeee
core/vm: Remove snapshot param from Interpreter.Run() 2017-12-15 13:33:35 +01:00
rhaps107 e9971d356b internal/ethapi: don't crash for missing receipts
Fixes #15408
Fixes #14432
2017-12-14 13:24:34 +01:00
yoza bbea4b2b53 internal/ethapi: fix typo in comment (#15659) 2017-12-12 18:55:39 +01:00
Péter Szilágyi 989fb4472a
internal/ethapi: avoid recreating JavaScript tracer wrappers 2017-11-24 13:55:12 +02:00
Pulyak Viktor f5091e5711 internal/ethapi: fix js tracer to properly decode addresses (#15297)
* Add method getBalanceFromJs for work with address as bytes

* expect []byte instead of common.Address in ethapi tracer
2017-11-18 03:56:03 +02:00
tsarpaul c7b0abf86b Added output to clarify gas calculation in txpool.inspect 2017-11-17 15:07:57 +02:00
Péter Szilágyi b0190189a3
core/vm, internal/ethapi: tracer no full storage, nicer json output (#15499)
* core/vm, internal/ethapi: tracer no full storage, nicer json output

* core/vm, internal/ethapi: omit disabled trace fields
2017-11-16 18:53:18 +02:00
gary rong 984c25ac40 accounts, internal: fail if no suitable estimated gas found (#15477)
* accounts, internal: return an error if no suitable estimated gas found

* accounts, internal: minor polishes on the gas estimator
2017-11-14 18:26:31 +02:00
rjl493456442 94903d572b
internal, accounts, eth: utilize vm failed flag to help gas estimation 2017-10-02 15:26:40 +03:00
Péter Szilágyi 7e9e3a134b
core/types, internal: swap Receipt.Failed to Status 2017-10-02 14:04:22 +03:00
rjl493456442 a31835c8b4
internal/ethapi: add status code to receipt rpc return 2017-10-02 11:42:53 +03:00
slumber1122 2b4a5f2677 internal/ethapi: remove code duplication around tx sending (#15158) 2017-09-25 10:38:42 +02:00
Ernesto del Toro 3c8656347f eth, internal/ethapi: fix spelling of 'Ethereum' (#15164) 2017-09-20 11:31:31 +02:00
Péter Szilágyi da7d57e07c
core: make txpool operate on immutable state 2017-09-05 13:34:41 +03:00
Péter Szilágyi 3c48a25762 Merge pull request #15014 from rjl493456442/metropolis-eip658
core: add status as a consensus field in receipt
2017-08-23 14:39:37 +03:00
Martin Holst Swende 286ec5df40 cmd/evm, core/vm, internal/ethapi: Show error when exiting (#14985)
* cmd/evm, core/vm, internal/ethapi: Add 'err' to tracer interface CaptureEnd

* cmd/evm: fix nullpointer when there is no error
2017-08-23 14:37:18 +03:00
rjl493456442 28aea46ac0
core: implement Metropolis EIP 658, receipt status byte 2017-08-22 18:35:17 +03:00
Miya Chen bf1e263128 core, light: send chain events using event.Feed (#14865) 2017-08-18 12:58:36 +02:00
Péter Szilágyi 5d9ac49c7e
accounts: refactor API for generalized USB wallets 2017-08-09 13:26:07 +03:00
Péter Szilágyi db568a61e2
accounts, console, internal: support trezor hardware wallet 2017-08-09 11:30:17 +03:00
Egon Elbre f42bd73ce5 internal: fix megacheck warnings (#14919) 2017-08-07 17:14:40 +02:00
Péter Szilágyi 0ff35e170d core: remove redundant storage of transactions and receipts (#14801)
* core: remove redundant storage of transactions and receipts

* core, eth, internal: new transaction schema usage polishes

* eth: implement upgrade mechanism for db deduplication

* core, eth: drop old sequential key db upgrader

* eth: close last iterator on successful db upgrage

* core: prefix the lookup entries to make their purpose clearer
2017-07-14 19:39:53 +03:00
Felix Lange 9e5f03b6c4 core/state: access trie through Database interface, track errors (#14589)
With this commit, core/state's access to the underlying key/value database is
mediated through an interface. Database errors are tracked in StateDB and
returned by CommitTo or the new Error method.

Motivation for this change: We can remove the light client's duplicated copy of
core/state. The light client now supports node iteration, so tracing and storage
enumeration can work with the light client (not implemented in this commit).
2017-06-27 15:57:06 +02:00
Martin Holst Swende 80f7c6c299 cmd/evm: add --prestate, --sender, --json flags for fuzzing (#14476) 2017-06-07 17:09:08 +02:00
Martin Holst Swende 1a0eb903f1 internal/ethapi: initialize account mutex in lock properly 2017-06-01 17:16:12 +03:00
Péter Szilágyi 41bdf49eed Merge pull request #14516 from holiman/noncefixes
internal/ethapi: add mutex around signing + nonce assignment
2017-05-30 18:15:57 +03:00
Martin Holst Swende ea11f7dd7a internal/ethapi: add mutex around signing + nonce assignment
This prevents concurrent assignment of identical nonces when automatic
assignment is used.
2017-05-30 16:43:38 +02:00
Péter Szilágyi 673c92db6b
internal/ethapi: fix tx nonces in pool inspect/content 2017-05-29 11:17:31 +03:00
Felix Lange ef25b826e6 Merge pull request #14502 from karalabe/mobile-import-ecdsa
Enforce 256 bit keys on raw import, support raw mobile imports
2017-05-24 22:30:47 +02:00
Felix Lange 261b3e2351 Merge pull request #14336 from obscuren/metropolis-preparation
consensus, core/*, params: metropolis preparation refactor
2017-05-24 22:28:22 +02:00
Péter Szilágyi aa73420207
accounts/keystore, crypto: enforce 256 bit keys on import 2017-05-23 14:58:03 +03:00
Martin Holst Swende 83721a95ce internal/ethapi: lock when auto-filling transaction nonce (#14483)
More context in the bug This solves the problems of transactions being
submitted simultaneously, and getting the same nonce, due to the gap (due to
signing) between nonce-issuance and nonce-update. With this PR, a lock will
need to be acquired whenever a nonce is used, and released when the transaction
is submitted or errors out.
2017-05-19 15:03:56 +02:00
Jeffrey Wilcke 10a57fc3d4 consensus, core/*, params: metropolis preparation refactor
This commit is a preparation for the upcoming metropolis hardfork. It
prepares the state, core and vm packages such that integration with
metropolis becomes less of a hassle.

* Difficulty calculation requires header instead of individual
  parameters
* statedb.StartRecord renamed to statedb.Prepare and added Finalise
  method required by metropolis, which removes unwanted accounts from
  the state (i.e. selfdestruct)
* State keeps record of destructed objects (in addition to dirty
  objects)
* core/vm pre-compiles may now return errors
* core/vm pre-compiles gas check now take the full byte slice as argument
  instead of just the size
* core/vm now keeps several hard-fork instruction tables instead of a
  single instruction table and removes the need for hard-fork checks in
  the instructions
* core/vm contains a empty restruction function which is added in
  preparation of metropolis write-only mode operations
* Adds the bn256 curve
* Adds and sets the metropolis chain config block parameters (2^64-1)
2017-05-18 09:05:58 +02:00
Péter Szilágyi e61035c5a3
cmd, eth, les, mobile: make networkid uint64 everywhere 2017-04-25 14:53:50 +03:00
bas-vk 54253aae4c internal/ethapi: return empty arrays instead of null (#14374)
* internal/ethapi: return empty arrays instead of null

* internal/ethapi: minor comments to avoid future regressions
2017-04-24 15:00:30 +03:00
bas-vk 5e29f4be93 cmd/utils, node: remove unused solc references and improve RPC config (#14324)
Currently http cors and websocket origins are a comma separated string in the
config object. These are replaced with string arrays that are more expressive in
case of a config file.
2017-04-12 23:04:14 +02:00