- 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 提交于
-
- 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 提交于
-
- 13 2月, 2017 1 次提交
-
-
由 Péter Szilágyi 提交于
-
- 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 1 次提交
-
-
由 Nick Johnson 提交于
-
- 09 1月, 2017 1 次提交
-
-
由 Felix Lange 提交于
go get github.com/gordonklaus/ineffassign ineffassign .
-
- 07 1月, 2017 1 次提交
-
-
由 Felix Lange 提交于
-
- 05 1月, 2017 3 次提交
-
-
由 Felix Lange 提交于
-
由 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.
-
由 Péter Szilágyi 提交于
To address increasing complexity in code that handles signatures, this PR discards all notion of "different" signature types at the library level. Both the crypto and accounts package is reduced to only be able to produce plain canonical secp256k1 signatures. This makes the crpyto APIs much cleaner, simpler and harder to abuse.
-
- 06 12月, 2016 1 次提交
-
-
由 Jeffrey Wilcke 提交于
Environment is now a struct (not an interface). This reduces a lot of tech-debt throughout the codebase where a virtual machine environment had to be implemented in order to test or run it. The new environment is suitable to be used en the json tests, core consensus and light client.
-
- 15 11月, 2016 1 次提交
-
-
由 Péter Szilágyi 提交于
-
- 14 11月, 2016 1 次提交
-
-
由 Péter Szilágyi 提交于
-
- 13 11月, 2016 2 次提交
-
-
由 Jeffrey Wilcke 提交于
-
由 Jeffrey Wilcke 提交于
This commit implements EIP158 part 1, 2, 3 & 4 1. If an account is empty it's no longer written to the trie. An empty account is defined as (balance=0, nonce=0, storage=0, code=0). 2. Delete an empty account if it's touched 3. An empty account is redefined as either non-existent or empty. 4. Zero value calls and zero value suicides no longer consume the 25k reation costs. params: moved core/config to params Signed-off-by: NJeffrey Wilcke <jeffrey@ethereum.org>
-
- 09 11月, 2016 1 次提交
-
-
由 Felix Lange 提交于
-
- 29 10月, 2016 1 次提交
-
-
由 bas-vk 提交于
This commit includes several API changes: - The behavior of eth_sign is changed. It now accepts an arbitrary message, prepends the well-known string \x19Ethereum Signed Message:\n<length of message> hashes the result using keccak256 and calculates the signature of the hash. This breaks backwards compatability! - personal_sign(hash, address [, password]) is added. It has the same semantics as eth_sign but also accepts a password. The private key used to sign the hash is temporarily unlocked in the scope of the request. - personal_recover(message, signature) is added and returns the address for the account that created a signature.
-
- 06 10月, 2016 1 次提交
-
-
由 Felix Lange 提交于
This commit replaces the deep-copy based state revert mechanism with a linear complexity journal. This commit also hides several internal StateDB methods to limit the number of ways in which calling code can use the journal incorrectly. As usual consultation and bug fixes to the initial implementation were provided by @karalabe, @obscuren and @Arachnid. Thank you!
-
- 26 9月, 2016 1 次提交
-
-
由 Felix Lange 提交于
This change introduces a global, per-state cache that keeps account data in the canon state. Thanks to @karalabe for lots of fixes.
-
- 23 8月, 2016 1 次提交
-
-
由 Felix Lange 提交于
The need for these functions comes up in code that actually deploys and uses contracts. As of this commit, they can be used with both SimulatedBackend and ethclient. SimulatedBackend gains some additional methods in the process and is now safe for concurrent use.
-
- 22 8月, 2016 1 次提交
-
-
由 Felix Lange 提交于
In this commit, contract bindings and their backend start using the Ethereum Go API interfaces offered by ethclient. This makes ethclient a suitable replacement for the old remote backend and gets us one step closer to the final stable Go API that is planned for go-ethereum 1.5. The changes in detail: * Pending state is optional for read only contract bindings. BoundContract attempts to discover the Pending* methods via an interface assertion. There are a couple of advantages to this: ContractCaller is just two methods and can be implemented on top of pretty much anything that provides Ethereum data. Since the backend interfaces are now disjoint, ContractBackend can simply be declared as a union of the reader and writer side. * Caching of HasCode is removed. The caching could go wrong in case of chain reorganisations and removing it simplifies the code a lot. We'll figure out a performant way of providing ErrNoCode before the 1.5 release. * BoundContract now ensures that the backend receives a non-nil context with every call.
-
- 21 8月, 2016 1 次提交
-
-
由 Felix Lange 提交于
The remote backend is superseded by ethclient. The nil backend's stated purpose was to enable testing of accounts/abi/bind. None of its methods actually worked. A much simpler way to get a crashing backend is to simply pass nil as the backend. With a one-line change to the generator (removing two explicit interface assertions), passing nil actually works. Removing these backends means that less changes are required later.
-
- 23 7月, 2016 1 次提交
-
-
由 Felix Lange 提交于
The new client implementation supports concurrent requests, subscriptions and replaces the various ad hoc RPC clients throughout go-ethereum.
-
- 15 7月, 2016 1 次提交
-
-
由 Péter Szilágyi 提交于
-
- 11 7月, 2016 1 次提交
-
-
由 zsfelfoldi 提交于
-
- 16 6月, 2016 1 次提交
-
-
由 zsfelfoldi 提交于
-
- 20 5月, 2016 1 次提交
-
-
由 Péter Szilágyi 提交于
-
- 12 5月, 2016 1 次提交
-
-
由 Péter Szilágyi 提交于
-
- 02 5月, 2016 1 次提交
-
-
由 Péter Szilágyi 提交于
-
- 27 4月, 2016 1 次提交
-
-
由 Péter Szilágyi 提交于
-
- 15 4月, 2016 1 次提交
-
-
由 Péter Szilágyi 提交于
-
- 12 4月, 2016 1 次提交
-
-
由 Felix Lange 提交于
The account management API was originally implemented as a thin layer around crypto.KeyStore, on the grounds that several kinds of key stores would be implemented later on. It turns out that this won't happen so KeyStore is a superflous abstraction. In this commit crypto.KeyStore and everything related to it moves to package accounts and is unexported.
-
- 05 4月, 2016 1 次提交
-
-
由 Péter Szilágyi 提交于
-