Commit Graph

1216 Commits

Author SHA1 Message Date
Péter Szilágyi 579ac6287b
Merge pull request #16576 from CrispinFlowerday/bugfix/local_underpriced_txs
core: ensure local transactions aren't discarded as underpriced
2018-05-02 11:34:47 +03:00
kiel barry a7720b5926 core: golint updates for this or self warning (#16633) 2018-05-02 11:27:59 +03:00
Crispin Flowerday 0afd767537
core: ensure local transactions aren't discarded as underpriced
This fixes an issue where local transactions are discarded as
underpriced when the pool and queue are full.
2018-05-02 11:04:40 +03:00
Péter Szilágyi 7a7428a027
core, eth: fix tracer dirty finalization 2018-04-27 14:29:18 +03:00
Felix Lange b724d1aada core/state: cache missing storage entries (#16584) 2018-04-27 12:13:23 +03:00
kimmylin 86be91b3e2 core/types: avoid duplicating transactions on changing signer (#16435) 2018-04-24 10:39:03 +03:00
Wuxiang 8f8774cf6d all: fix various typos (#16533)
* fix typo

* fix typo

* fix typo
2018-04-19 16:32:02 +03:00
dm4 c514fbccc0 core/asm: accept uppercase instructions (#16531) 2018-04-19 15:31:30 +02:00
dm4 49e38c970e core/asm: remove unused condition (#16487) 2018-04-18 01:08:31 +02:00
thomasmodeneis ba1030b6b8 build: enable goimports and varcheck linters (#16446) 2018-04-18 00:53:50 +02:00
Péter Szilágyi db48d312e4
core: txpool stable underprice drop order, perf fixes 2018-04-12 12:54:22 +03:00
Martin Holst Swende 7205366c9f
core/state: fix ripemd-cornercase in Copy 2018-04-11 15:03:49 +02:00
Martin Holst Swende 0c7b99b8cc
core/state: fix bug in copy of copy State 2018-04-11 10:23:01 +02:00
Felix Lange 3caf16b15f
core: remove stray account creations in state transition (#16470)
The 'from' and 'to' methods on StateTransitions are reader methods and
shouldn't have inadvertent side effects on state.

It is safe to remove the check in 'from' because account existence is
implicitly checked by the nonce and balance checks. If the account has
non-zero balance or nonce, it must exist. Even if the sender account has
nonce zero at the start of the state transition or no balance, the nonce
is incremented before execution and the account will be created at that
time.

It is safe to remove the check in 'to' because the EVM creates the
account if necessary.

Fixes #15119
2018-04-10 15:33:25 +02:00
Felix Lange c7ab3e5544 common: delete StringToAddress, StringToHash (#16436)
* common: delete StringToAddress, StringToHash

These functions are confusing because they don't parse hex, but use the
bytes of the string. This change removes them, replacing all uses of
StringToAddress(s) by BytesToAddress([]byte(s)).

* eth/filters: remove incorrect use of common.BytesToAddress
2018-04-10 14:12:07 +03:00
Péter Szilágyi 39f4c80155
Merge pull request #15225 from holiman/test_removefrom_dirtyset
Change handling of dirty objects in state
2018-04-10 12:28:30 +03:00
Martin Holst Swende 8c31d2897b
core: add blockchain benchmarks 2018-04-10 11:20:06 +02:00
Martin Holst Swende 14c9215dd3
state: handle nil in journal dirties 2018-04-10 11:20:02 +02:00
dm4 3ebcf92b42 cmd/evm: print vm output when debug flag is on (#16326) 2018-04-06 12:43:36 +02:00
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
Jia Chenhui 5909482fb5 core/state: avoid redundant addition to code size cache (#16427) 2018-04-03 17:13:19 +02:00
Péter Szilágyi d985b9052a
core/state: avoid linear overhead on journal dirty listing 2018-03-28 09:32:02 +03:00
Martin Holst Swende 958ed4f3d9
core/state: rework dirty handling to avoid quadratic overhead 2018-03-28 09:29:28 +03:00
Jia Chenhui 1a8894b3d5 core/state: uniform parameter style (#16398)
- Uniform code style.
2018-03-28 09:26:37 +03:00
hydai 6134990709
core/vm: Fixed typos in core/vm/interpreter.go 2018-03-27 12:29:04 +08:00
hydai c3dc814fea
core/vm: Fixed typo in core/vm/evm.go 2018-03-26 21:40:00 +08:00
Jia Chenhui e506d384e9 core/state: fix typo (#16370) 2018-03-26 14:45:34 +03:00
hydai 7c131f4d6d core/asm: fixed typo (posititon -> position) (#16366) 2018-03-26 13:48:39 +03:00
hydai 84c5db5409 core/vm: remove JIT VM codes (#16362) 2018-03-26 13:48:04 +03:00
Péter Szilágyi 1fae50a199
core: minor evm polishes and optimizations 2018-03-26 12:28:46 +03:00
Martin Holst Swende faed47b3c5
Merge pull request #15990 from markya0616/sim_backend_block_hash
accounts/abi, core: add AddTxWithChain in BlockGen for simulation
2018-03-19 08:29:54 +01:00
hydai a063876749 core/asm: fixed typo (labal -> label) (#16313) 2018-03-14 11:59:06 +02:00
Martin Holst Swende 4871e25f5f core/vm: optimize eq, slt, sgt and iszero + tests (#16047)
* vm: optimize eq, slt, sgt and iszero + tests

* core/vm: fix error in slt/sgt, found by vmtests. Added testcase

* core/vm: make slt/sgt cleaner
2018-03-08 14:48:19 +02:00
Kyuntae Ethan Kim 63687f04e4 core: check transaction/receipt count match when reconstructing blocks (#16272) 2018-03-07 12:05:14 +02:00
Péter Szilágyi 2b5d1a4a4c
core: update txpool tests for the removal fix 2018-03-07 10:58:11 +02:00
cui f8601430fd
core: should enqueue the invalids tx anyway
even the pending is empty we shoud enqueue the invalid txs
2018-03-07 10:07:50 +02:00
Péter Szilágyi bd6879ac51
core/vm, crypto/bn256: switch over to cloudflare library (#16203)
* core/vm, crypto/bn256: switch over to cloudflare library

* crypto/bn256: unmarshal constraint + start pure go impl

* crypto/bn256: combo cloudflare and google lib

* travis: drop 386 test job
2018-03-05 14:33:45 +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 ca64a122d3 eth/downloader: save and load trie sync progress (#16224) 2018-03-03 00:52:39 +01:00
Mark Rushakoff 98ec5e5011 core/asm: rename isAlphaNumeric to isLetter (#16212)
The function would return false for numbers, so isLetter is a more
accurate description of the behavior.
2018-02-28 12:20:07 +02:00
Martin Holst Swende f83237573f core: make current*Block atomic, and accessor functions mutex-free (#16171)
* core: make current*Block atomic, and accessor functions mutex-free

* core: fix review concerns

* core: fix error in atomic assignment

* core/light: implement atomic getter/setter for headerchain
2018-02-26 11:53:10 +02:00
Péter Szilágyi 89f914c030
core: flush out trie cache more meaningfully on stop (#16143)
* core: flush out trie cache more meaningfully on stop

* core: upgrade legacy tests to chain maker
2018-02-23 14:02:33 +02:00
Martin Holst Swende 44d40ffce1 core, vm, common: define constantinople fork + shift (#16045)
* core, vm, common: define constantinople fork, start implementation of shift instructions

* vm: more testcases

* vm: add tests for intpool erroneous intpool handling

* core, vm, common: fix constantinople review concerns

* vm: add string<->op definitions for new opcodes
2018-02-23 12:32:57 +02:00
Anton Evangelatov ae9f97221a metrics: pull library and introduce ResettingTimer and InfluxDB reporter (#15910)
* go-metrics: fork library and introduce ResettingTimer and InfluxDB reporter.

* vendor: change nonsense/go-metrics to ethersphere/go-metrics

* go-metrics: add tests. move ResettingTimer logic from reporter to type.

* all, metrics: pull in metrics package in go-ethereum

* metrics/test: make sure metrics are enabled for tests

* metrics: apply gosimple rules

* metrics/exp, internal/debug: init expvar endpoint when starting pprof server

* internal/debug: tiny comment formatting fix
2018-02-23 11:56:08 +02:00
Péter Szilágyi 0b3e23f636
core: yeah, funny file, drop it 2018-02-22 15:41:48 +02:00
ferhat elmas dc7ca52b3b core: handle ignored error (#16065)
- according to implementation of `IntrinsicGas`
we can continue execution since problem will be detected
later. However, early return is future-proof for changes.
2018-02-14 22:02:51 +02:00
ferhat elmas ff225db813 core/vm: remove unused hashing (#16075) 2018-02-14 15:41:05 +02:00
Felix Lange a5c0bbb4f4
all: update license information (#16089) 2018-02-14 13:49:11 +01:00
Felix Lange b007412db1 core: soften up state memory force-commit log messages (#16080)
Talk about "state" instead of "trie timing", "trie memory" and remove
the overzealous warning when the limit is just reached. Since the time
limit is always reached on slow machines, move the message to info level
so users don't freak out about internal details.
2018-02-13 15:12:55 +02:00
Péter Szilágyi 69c1f2c2a7
core: force import known but rolled back blocks 2018-02-12 11:54:14 +02:00