rjl493456442
a6e5751a9c
core/vm/runtime: return tx reverted back
2017-06-16 16:19:00 +08:00
rjl493456442
569ed15527
core: trace whether tx is reverted
...
detect whether tx is reverted during state transition and save to receipt if
so.
2017-06-15 21:55:43 +08:00
rjl493456442
3b20bbfbbd
core/vm: set revert flag in contract when state revert happen.
2017-06-15 21:52:17 +08:00
rjl493456442
19c8193876
core/vm: add a reverted flag in vm contract
...
which is used to indicate whether state revert happen during
state transition.
if child's revert flag been set, it will also affect its parent
recursively
2017-06-15 21:49:12 +08:00
rjl493456442
d14dceb396
core/types: add a reverted field in receipt
2017-06-15 21:47:37 +08:00
Péter Szilágyi
335abdceb1
Merge pull request #14581 from holiman/byte_opt
...
core/vm: improve opByte
2017-06-13 14:44:19 +03:00
Martin Holst Swende
ac9865791a
core/vm, common/math: Add doc about Byte, fix format
2017-06-08 23:16:05 +02:00
Martin Holst Swende
80f7c6c299
cmd/evm: add --prestate, --sender, --json flags for fuzzing ( #14476 )
2017-06-07 17:09:08 +02:00
bailantaotao
bc24b7a912
core/types: use Header.Hash for block hashes ( #14587 )
...
Fixes #14586
2017-06-07 12:06:25 +02:00
Martin Holst Swende
1496b3aff6
common/math, core/vm: Un-expose bigEndianByteAt, use correct terms for endianness
2017-06-06 18:38:38 +02:00
Lewis Marshall
04d2de9119
core: Fix VM error logging
...
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-06-05 23:51:32 +01:00
Martin Holst Swende
3285a0fda3
core/vm, common/math: Add fast getByte for bigints, improve opByte
2017-06-05 08:44:11 +02:00
Nick Johnson
d5a79934dc
core/vm: Use a bitmap instead of a map for jumpdest analysis
...
t push --force
2017-06-01 19:14:05 +01:00
Péter Szilágyi
cba33029a8
core: only reorg changed account, not all
2017-05-31 23:26:24 +03:00
Péter Szilágyi
9702badd83
core: don't uselessly recheck transactions on dump
2017-05-31 21:29:50 +03:00
Péter Szilágyi
280609c99b
core: check for gas limit exceeding txs too on new block
2017-05-30 00:31:37 +03:00
Péter Szilágyi
08959bbc70
cmd, core, eth: configurable txpool parameters
2017-05-29 11:29:46 +03:00
Péter Szilágyi
c98bce709c
core: fix minor accidental typos and comment errors
2017-05-25 17:22:45 +03:00
changhong
17f0b11942
core: typos and comments improve
...
1. fix typos
2. methods recevier of struct should be same
3. comments improve
(cherry picked from commit 1ba9795395 )
2017-05-25 17:14:33 +03:00
Jeffrey Wilcke
846d091bd2
core/vm: allocate stack to 1024
...
Pre allocate the stack to 1024 optimising stack pushing, reducing calls
to runtime.makeslice and runtime.mallocgc
2017-05-25 11:37:04 +02: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
Péter Szilágyi
aa73420207
accounts/keystore, crypto: enforce 256 bit keys on import
2017-05-23 14:58:03 +03:00
Jeffrey Wilcke
10582a97ca
core/vm: expose intpool to stack dup method
...
Improve the duplication method of the stack to reuse big ints by passing
in an existing integer pool.
2017-05-23 10:52:11 +02:00
Jeffrey Wilcke
e16a7ef60f
core/vm: capped int pool
2017-05-23 10:40:09 +02:00
Jeffrey Wilcke
a816e75662
core/vm: improved push instructions
...
Improved push instructions by removing unnecessary big int allocations
and by making it int instead of big.Int
2017-05-23 10:39:53 +02:00
Valentin Wüstholz
04b668b232
core/vm: improve error message for invalid opcodes
2017-05-22 17:48:07 +02:00
Jeffrey Wilcke
e7119ce12d
core/state: fixed (self)destructed objects
...
Add the object to the list of destructed objects during a selfdestruct /
suicide operation and also remove it from the list once the journal
reverts.
2017-05-18 09:05:58 +02:00
Jeffrey Wilcke
a5f6a1cb7c
consensus, core, core/vm, parems: review fixes
2017-05-18 09:05:58 +02:00
Jeffrey Wilcke
e6aff513db
core/types: corrected abstract signing address
2017-05-18 09:05:58 +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
a2f23ca9b1
cmd, core, eth, miner: remove txpool gas price limits ( #14442 )
2017-05-16 21:07:27 +02:00
Péter Szilágyi
60293820b7
core: fix processing regression during receipt import
2017-05-08 12:09:35 +03:00
Péter Szilágyi
d51a9fd6b7
cmd, core, params: add --rinkeby flag for fast connectivity
2017-05-04 12:36:20 +03:00
Péter Szilágyi
ba3bcd16a6
Merge pull request #14350 from fjl/trie-iterator-skip-2
...
eth: add debug_storageRangeAt
2017-04-25 11:10:20 +03:00
Felix Lange
207bd7d2cd
eth: add debug_storageRangeAt
2017-04-25 02:14:32 +02:00
Felix Lange
4047ccad2f
trie: add start key to NodeIterator constructors
...
The 'step' method is split into two parts, 'peek' and 'push'. peek
returns the next state but doesn't make it current.
The end of iteration was previously tracked by setting 'trie' to nil.
End of iteration is now tracked using the 'iteratorEnd' error, which is
slightly cleaner and requires less code.
2017-04-25 02:14:31 +02:00
Felix Lange
a13e920af0
trie: clean up iterator constructors
...
Make it so each iterator has exactly one public constructor:
- NodeIterators can be created through a method.
- Iterators can be created through NewIterator on any NodeIterator.
2017-04-25 02:14:31 +02:00
Felix Lange
7b2fc0643f
core, light: delete SplitStatTy, ChainSplitEvent (unused)
2017-04-21 18:56:00 +02:00
Péter Szilágyi
edef84da2b
core: make genesis incompatibility error more explicit
2017-04-20 14:14:13 +03:00
Felix Lange
0cc492f815
all: update license information
2017-04-14 10:29:00 +02:00
Felix Lange
2870496124
core: don't import genesis block in TestDAOForkRangeExtradata
...
The genesis block doesn't have a valid ancestor.
2017-04-12 18:47:47 +02:00
Péter Szilágyi
a7b9e484d0
consensus, core, ethstats: use engine specific block beneficiary ( #14318 )
...
* consensus, core, ethstats: use engine specific block beneficiary
* core, eth, les, miner: use explicit beneficiary during mining
2017-04-12 16:38:31 +03:00
Justin
542e42b21e
core: fix comment typo
2017-04-10 16:01:31 +03:00
Péter Szilágyi
feeccdf4ec
consensus/clique: Proof of Authority ( #3753 )
...
This PR is a prototype implementation of plugable consensus engines and the
Clique PoA protocol ethereum/EIPs#225
2017-04-10 12:24:12 +02:00
Péter Szilágyi
158d603528
consensus, core: drop all the legacy custom core error types
2017-04-06 17:34:19 +03:00
Felix Lange
3d8de95f99
core, core/types: regenerate JSON marshaling, add "hash" to headers ( #13868 )
...
* Makefile: fix devtools target
* core: regenerate genesis marshaling with fjl/gencodec@cbfa5be5a8
* core/types: regenerate marshaling methods with fjl/gencodec@cbfa5be5a8
* core/types: add "hash" to JSON headers
2017-04-06 11:38:21 +03:00
gary rong
49437a02c9
core/state: make TestSnapshotRandom work again ( #3816 )
...
In `touch` operation, only `touched` filed has been changed. Therefore
in the related undo function, only `touched` field should be reverted.
In addition, whether remove this obj from dirty map should depend on
prevDirty flag.
2017-04-05 00:44:16 +02:00
Péter Szilágyi
09777952ee
core, consensus: pluggable consensus engines ( #3817 )
...
This commit adds pluggable consensus engines to go-ethereum. In short, it
introduces a generic consensus interface, and refactors the entire codebase to
use this interface.
2017-04-05 00:16:29 +02:00
bas-vk
baf20010e7
core/types: rename txdata.gasLimit -> txdata.gas in JSON ( #13848 )
2017-03-29 11:59:13 +02:00
Felix Lange
aa9a78e463
core, core/types: use non-pointer receiver for Marshal* methods
...
Regenerated with fjl/gencodec@1a75a21610
Also add ,omitempty to optional GenesisAccount fields.
2017-03-27 13:29:01 +02:00