- 23 3月, 2017 1 次提交
-
-
由 Felix Lange 提交于
There is no need to depend on the old context package now that the minimum Go version is 1.7. The move to "context" eliminates our weird vendoring setup. Some vendored code still uses golang.org/x/net/context and it is now vendored in the normal way. This change triggered new vet checks around context.WithTimeout which didn't fire with golang.org/x/net/context.
-
- 16 3月, 2017 1 次提交
-
-
由 bas-vk 提交于
-
- 09 3月, 2017 1 次提交
-
-
由 Péter Szilágyi 提交于
-
- 02 3月, 2017 1 次提交
-
-
由 Péter Szilágyi 提交于
* accounts, cmd, eth, ethdb: port logs over to new system * ethdb: drop concept of cache distribution between dbs * eth: fix some log nitpicks to make them nicer
-
- 28 2月, 2017 2 次提交
-
-
由 Felix Lange 提交于
* 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 提交于
-
- 27 2月, 2017 2 次提交
-
-
由 Péter Szilágyi 提交于
-
由 Felix Lange 提交于
* 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
-
- 23 2月, 2017 2 次提交
-
-
由 Péter Szilágyi 提交于
-
由 Péter Szilágyi 提交于
-
- 18 2月, 2017 1 次提交
-
-
由 Felix Lange 提交于
* vendor: add github.com/btcsuite/btcd/btcec * crypto: add btcec fallback for sign/recover without cgo This commit adds a non-cgo fallback implementation of secp256k1 operations. * crypto, core/vm: remove wrappers for sha256, ripemd160
-
- 17 2月, 2017 1 次提交
-
-
由 Péter Szilágyi 提交于
-
- 13 2月, 2017 12 次提交
-
-
由 Péter Szilágyi 提交于
- Handle a data race where a Ledger drops between list and open - Prolong Ledger tx confirmation window to 30 days from 1 minute - Simplify Ledger chainid-signature calculation and validation - Simplify Ledger USB APDU request chunking algorithm - Silence keystore account cache notifications for manual actions - Only enable self derivations if wallet open succeeds
-
由 Péter Szilágyi 提交于
-
由 Péter Szilágyi 提交于
-
由 Péter Szilágyi 提交于
-
由 Péter Szilágyi 提交于
-
由 Péter Szilágyi 提交于
-
由 Péter Szilágyi 提交于
-
由 Péter Szilágyi 提交于
-
由 Péter Szilágyi 提交于
-
由 Péter Szilágyi 提交于
-
由 Péter Szilágyi 提交于
-
由 Péter Szilágyi 提交于
-
- 03 2月, 2017 1 次提交
-
-
由 Diego Siqueira 提交于
Signed-off-by: NDiSiqueira <dieg0@live.com>
-
- 21 1月, 2017 1 次提交
-
-
由 Péter Szilágyi 提交于
Gas estimation currently mostly works, but can underestimate for more funky refunds. This is because various ops (e.g. CALL) need more gas to run than they actually consume (e.g. 2300 stipend that is refunded if not used). With more intricate contract interplays, it becomes almost impossible to return a proper value to the user. This commit swaps out the simplistic gas estimation to a binary search approach, honing in on the correct gas use. This does mean that gas estimation needs to rerun the transaction log(max-price) times to measure whether it fails or not, but it's a price paid by the transaction issuer, and it should be worth it to support proper estimates.
-
- 17 1月, 2017 2 次提交
-
-
由 Péter Szilágyi 提交于
-
由 Nick Johnson 提交于
-
- 13 1月, 2017 1 次提交
-
-
由 Péter Szilágyi 提交于
-
- 09 1月, 2017 5 次提交
-
-
由 Felix Lange 提交于
go get github.com/gordonklaus/ineffassign ineffassign .
-
由 Thomas Bocek 提交于
Check for slice in type as well and adapted test case as arrays also store its types.
-
由 Jeffrey Wilcke 提交于
-
由 tbocek 提交于
-
由 Thomas Bocek 提交于
On solidity contract I have "uint32 []" type, when abigen creates Go bindings - they are also "[]uint32" type on Go side. Even though it looks like it should work - the actual type of the data coming from the chain is of type " []*big.Int". When executing contract function from Go side - getting unmarshal error: abi: cannot unmarshal []*big.Int in to []uint32 The fix is to create array with the correct type This fixed the issue reported in: https://github.com/ethereum/go-ethereum/issues/2802
-
- 07 1月, 2017 1 次提交
-
-
由 Felix Lange 提交于
-
- 06 1月, 2017 2 次提交
-
-
由 Felix Lange 提交于
-
由 Felix Lange 提交于
This significantly reduces the dependency closure of ethclient, which no longer depends on core/vm as of this change. All uses of vm.Logs are replaced by []*types.Log. NewLog is gone too, the constructor simply returned a literal.
-
- 05 1月, 2017 3 次提交
-
-
由 Felix Lange 提交于
-
由 Péter Szilágyi 提交于
-
由 Jeffrey Wilcke 提交于
The run loop, which previously contained custom opcode executes have been removed and has been simplified to a few checks. Each operation consists of 4 elements: execution function, gas cost function, stack validation function and memory size function. The execution function implements the operation's runtime behaviour, the gas cost function implements the operation gas costs function and greatly depends on the memory and stack, the stack validation function validates the stack and makes sure that enough items can be popped off and pushed on and the memory size function calculates the memory required for the operation and returns it. This commit also allows the EVM to go unmetered. This is helpful for offline operations such as contract calls.
-