- May 08, 2017
-
-
Péter Szilágyi authored
-
- May 04, 2017
-
-
Péter Szilágyi authored
-
- Apr 25, 2017
-
-
Felix Lange authored
-
Felix Lange authored
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.
-
Felix Lange authored
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.
-
- Apr 21, 2017
-
-
Felix Lange authored
-
- Apr 20, 2017
-
-
Péter Szilágyi authored
-
- Apr 14, 2017
-
-
Felix Lange authored
-
- Apr 12, 2017
-
-
Felix Lange authored
The genesis block doesn't have a valid ancestor.
-
Péter Szilágyi authored
* consensus, core, ethstats: use engine specific block beneficiary * core, eth, les, miner: use explicit beneficiary during mining
-
- Apr 10, 2017
-
-
Justin Drake authored
-
Péter Szilágyi authored
This PR is a prototype implementation of plugable consensus engines and the Clique PoA protocol ethereum/EIPs#225
-
- Apr 06, 2017
-
-
Péter Szilágyi authored
-
Felix Lange authored
* Makefile: fix devtools target * core: regenerate genesis marshaling with fjl/gencodec@cbfa5be5a8a8 * core/types: regenerate marshaling methods with fjl/gencodec@cbfa5be5a8a8 * core/types: add "hash" to JSON headers
-
- Apr 04, 2017
-
-
Gary Rong authored
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.
-
Péter Szilágyi authored
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.
-
- Mar 29, 2017
-
-
Bas van Kervel authored
-
- Mar 27, 2017
-
-
Felix Lange authored
Regenerated with fjl/gencodec@1a75a2161009 Also add ,omitempty to optional GenesisAccount fields.
-
- Mar 24, 2017
-
-
Felix Lange authored
Fixes #3819
-
- Mar 23, 2017
-
-
Felix Lange authored
This commit solves several issues concerning the genesis block: * Genesis/ChainConfig loading was handled by cmd/geth code. This left library users in the cold. They could specify a JSON-encoded string and overwrite the config, but didn't get any of the additional checks performed by geth. * Decoding and writing of genesis JSON was conflated in WriteGenesisBlock. This made it a lot harder to embed the genesis block into the forthcoming config file loader. This commit changes things so there is a single Genesis type that represents genesis blocks. All uses of Write*Genesis* are changed to use the new type instead. * If the chain config supplied by the user was incompatible with the current chain (i.e. the chain had already advanced beyond a scheduled fork), it got overwritten. This is not an issue in practice because previous forks have always had the highest total difficulty. It might matter in the future though. The new code reverts the local chain to the point of the fork when upgrading configuration. The change to genesis block data removes compression library dependencies from package core.
-
Felix Lange authored
All uses of ChainConfig.ChainId eventually end up in NewEIP155Signer. This fixes the case where users forget to set the ChainId in their config.
-
Felix Lange authored
-
- Mar 22, 2017
-
-
Zsolt Felföldi authored
* les: implement request distributor, fix blocking issues * core: moved header validation before chain mutex lock
-
Yohann Léon authored
-
Péter Szilágyi authored
-
- Mar 09, 2017
-
-
Péter Szilágyi authored
-
- Mar 07, 2017
-
-
Felix Lange authored
-
- Mar 03, 2017
-
-
Péter Szilágyi authored
-
Péter Szilágyi authored
-
- Mar 02, 2017
-
-
Felix Lange authored
This commit makes the wrapper types more generally applicable. encoding.TextMarshaler is supported by most codec implementations (e.g. for yaml). The tests now ensure that package json actually recognizes the custom marshaler implementation irrespective of how it is implemented. The Uint type has new tests, too. These are tricky because uint size depends on the CPU word size. Turns out that there was one incorrect case where decoding returned ErrUint64Range instead of ErrUintRange.
-
- Mar 01, 2017
-
-
Jeffrey Wilcke authored
* Improved the standard evm tracer output and renamed it to WriteTrace which now takes an io.Writer to write the logs to. * Added WriteLogs which writes logs to the given writer in a readable format. * evm utility now also prints logs generated during the execution.
-
Jeffrey Wilcke authored
The evm compile command implements a simple assembly language that compiles to EVM bytecode.
-
- Feb 28, 2017
-
-
Jeffrey Wilcke authored
-
Felix Lange authored
* common/math: optimize PaddedBigBytes, use it more name old time/op new time/op delta PaddedBigBytes-8 71.1ns ± 5% 46.1ns ± 1% -35.15% (p=0.000 n=20+19) name old alloc/op new alloc/op delta PaddedBigBytes-8 48.0B ± 0% 32.0B ± 0% -33.33% (p=0.000 n=20+20) * all: unify big.Int zero checks Various checks were in use. This commit replaces them all with Int.Sign, which is cheaper and less code. eg templates: func before(x *big.Int) bool { return x.BitLen() == 0 } func after(x *big.Int) bool { return x.Sign() == 0 } func before(x *big.Int) bool { return x.BitLen() > 0 } func after(x *big.Int) bool { return x.Sign() != 0 } func before(x *big.Int) int { return x.Cmp(common.Big0) } func after(x *big.Int) int { return x.Sign() } * common/math, crypto/secp256k1: make ReadBits public in package math
-
Péter Szilágyi authored
-
Péter Szilágyi authored
-
Péter Szilágyi authored
-
Péter Szilágyi authored
-
- Feb 27, 2017
-
-
Valentin Wüstholz authored
-
- Feb 26, 2017
-
-
Felix Lange authored
* common: remove CurrencyToString Move denomination values to params instead. * common: delete dead code * common: move big integer operations to common/math This commit consolidates all big integer operations into common/math and adds tests and documentation. There should be no change in semantics for BigPow, BigMin, BigMax, S256, U256, Exp and their behaviour is now locked in by tests. The BigD, BytesToBig and Bytes2Big functions don't provide additional value, all uses are replaced by new(big.Int).SetBytes(). BigToBytes is now called PaddedBigBytes, its minimum output size parameter is now specified as the number of bytes instead of bits. The single use of this function is in the EVM's MSTORE instruction. Big and String2Big are replaced by ParseBig, which is slightly stricter. It previously accepted leading zeros for hexadecimal inputs but treated decimal inputs as octal if a leading zero digit was present. ParseUint64 is used in places where String2Big was used to decode a uint64. The new functions MustParseBig and MustParseUint64 are now used in many places where parsing errors were previously ignored. * common: delete unused big integer variables * accounts/abi: replace uses of BytesToBig with use of encoding/binary * common: remove BytesToBig * common: remove Bytes2Big * common: remove BigTrue * cmd/utils: add BigFlag and use it for error-checked integer flags While here, remove environment variable processing for DirectoryFlag because we don't use it. * core: add missing error checks in genesis block parser * common: remove String2Big * cmd/evm: use utils.BigFlag * common/math: check for 256 bit overflow in ParseBig This is supposed to prevent silent overflow/truncation of values in the genesis block JSON. Without this check, a genesis block that set a balance larger than 256 bits would lead to weird behaviour in the VM. * cmd/utils: fixup import
-