* core/asm: Fix encoding of pushed labels
EVM uses big-endian byte-order, so to pad a label value to 4 bytes,
zeros must be added to the front, not the end.
* core/asm: Fix PC calculations when a label is pushed
Incrementing PC by 5 is only correct if the label appears after a jump,
in which case there is an implicit push. When it appears after an explicit
push, PC should only be incremented by 4.
* core/asm: Allow JUMP with no argument
This way, a label can be pushed explicitly, or loaded from memory to
implement a jump table.
When we flush a batch of trie nodes into database during the state
sync, we should guarantee that all children should be flushed before
parent.
Actually the trie nodes commit order is strict by: children -> parent.
But when we flush all ready nodes into db, we don't need the order
anymore since
(1) they are all ready nodes (no more dependency)
(2) underlying database provides write atomicity
The gas price was not passed to the `EstimateGas` function. As a result,
conditional execution paths depending on `tx.gasprice` could be not
correctly processed and we could get invalid gas estimates for contract
function calls.
This PR adds a new unit test in miner package which will create some blocks from miner and then import into another chain. In this way, we can ensure all blocks generated by Geth miner obey consensus rules.
In Geth, we have two sources for configuration:
(1) Config file
(2) Command line flag
Basically geth will first resolve config file and then overwrite
configs with command line flags.
This issue is: geth should only overwrite configs if flags are truly
set. So before we apply any flag to configs, `GlobalIsSet` check
is necessary.
* update tests for istanbul
* tests: updated blockchaintests, see https://github.com/ethereum/tests/issues/637
* tests: update again, hopefully fixed this time
* tests: skip time consuming, run legacy tests
* tests: update again
* build: disable long-running tests on travis
* tests: fix formatting nits
* tests: I hate github's editor
This adds an implementation of node discovery via DNS TXT records to the
go-ethereum library. The implementation doesn't match EIP-1459 exactly,
the main difference being that this implementation uses separate merkle
trees for tree links and ENRs. The EIP will be updated to match p2p/dnsdisc.
To maintain DNS trees, cmd/devp2p provides a frontend for the p2p/dnsdisc
library. The new 'dns' subcommands can be used to create, sign and deploy DNS
discovery trees.