aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/bind
Commit message (Collapse)AuthorAgeFilesLines
* Rebrand as tangerine-network/go-tangerineWei-Ning Huang2019-09-1711-108/+108
|
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-06-1211-108/+108
|
* accounts/abi/bind: add optional block number for calls (#17942)Dragan Milic2019-01-032-6/+70
|
* accounts/abi: fix case of generated java functions (#18372)Guillaume Ballet2019-01-021-4/+6
|
* accounts/abi: change unpacking of abi fields w/ underscores (#16513)Matt K2018-12-291-37/+4
| | | | | | | | | | | | | | * accounts/abi: fix name styling when unpacking abi fields w/ underscores ABI fields with underscores that are being unpacked into structs expect structs with following form: int_one -> Int_one whereas in abigen the generated structs are camelcased int_one -> IntOne so updated the unpack method to expect camelcased structs as well.
* accounts/abi/bind: stop using goimports in the binding generator (#17768)Jeremy Schlatter2018-10-063-19/+153
|
* accounts/abi/bind/backends: fix typo (#17749)CDsigma2018-09-291-1/+1
|
* all: protect self-mined block during reorg (#17656)gary rong2018-09-201-1/+1
|
* all: remove the duplicate 'the' in annotations (#17509)Wenbiao Zheng2018-08-271-2/+2
|
* backends: configurable gas limit to allow testing large contracts (#17358)Jeff Prestes2018-08-153-17/+19
| | | | | | | | * backends: increase gaslimit in order to allow tests of large contracts * backends: increase gaslimit in order to allow tests of large contracts * backends: increase gaslimit in order to allow tests of large contracts
* accounts, eth, les: blockhash based filtering on all code pathsPéter Szilágyi2018-07-121-11/+21
|
* core, eth: minor txpool event cleanupsPéter Szilágyi2018-05-181-1/+1
|
* all: collate new transaction events togetherrjl4934564422018-05-181-1/+1
|
* all: get rid of error when creating memory database (#16716)gary rong2018-05-091-1/+1
| | | | | | | | * all: get rid of error when create mdb * core: clean up variables definition * all: inline mdb definition
* core/rawdb: separate raw database access to own package (#16666)Péter Szilágyi2018-05-071-3/+12
|
* Merge pull request #15990 from markya0616/sim_backend_block_hashMartin Holst Swende2018-03-191-2/+2
|\ | | | | accounts/abi, core: add AddTxWithChain in BlockGen for simulation
| * accounts/abi, core: add AddTxWithChain in BlockGen for simulationmark.lin2018-01-291-2/+2
| |
* | accounts/abi: normalize method name to a camel-case string (#15976)Mark2018-03-072-10/+45
| |
* | accounts/abi: Abi binding support for nested arrays, fixes #15648, including ↵protolambda2018-03-052-70/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nested array unpack fix (#15676) * accounts/abi/bind: support for multi-dim arrays Also: - reduce usage of regexes a bit. - fix minor Java syntax problems Fixes #15648 * accounts/abi/bind: Add some more documentation * accounts/abi/bind: Improve code readability * accounts/abi: bugfix for unpacking nested arrays The code previously assumed the arrays/slices were always 1 level deep. While the packing supports nested arrays (!!!). The current code for unpacking doesn't return the "consumed" length, so this fix had to work around that by calculating it (i.e. packing and getting resulting length) after the unpacking of the array element. It's far from ideal, but unpacking behaviour is fixed now. * accounts/abi: Fix unpacking of nested arrays Removed the temporary workaround of packing to calculate size, which was incorrect for slice-like types anyway. Full size of nested arrays is used now. * accounts/abi: deeply nested array unpack test Test unpacking of an array nested more than one level. * accounts/abi: Add deeply nested array pack test Same as the deep nested array unpack test, but the other way around. * accounts/abi/bind: deeply nested arrays bind test Test the usage of bindings that were generated for methods with multi-dimensional (and not just a single extra dimension, like foo[2][3]) array arguments and returns. edit: trigger rebuild, CI failed to fetch linter module. * accounts/abi/bind: improve array binding wrapArray uses a regex now, and arrayBindingJava is improved. * accounts/abi: Improve naming of element size func The full step size for unpacking an array is now retrieved with "getFullElemSize". * accounts/abi: support nested nested array args Previously, the code only considered the outer-size of the array, ignoring the size of the contents. This was fine for most types, but nested arrays are packed directly into it, and count towards the total size. This resulted in arguments following a nested array to replicate some of the binary contents of the array. The fix: for arrays, calculate their complete contents size: count the arg.Type.Elem.Size when Elem is an Array, and repeat when their child is an array too, etc. The count is the number of 32 byte elements, similar to how it previously counted, but nested. * accounts/abi: Test deep nested arr multi-arguments Arguments with a deeply nested array should not cause the next arguments to be read from the wrong position.
* | eth, les, light: filter on logs only, derive receipts on demandPéter Szilágyi2018-02-231-0/+13
| |
* | core, trie: intermediate mempool between trie and database (#15857)Péter Szilágyi2018-02-061-4/+10
| | | | | | This commit reduces database I/O by not writing every state trie to disk.
* | accounts/abi/bind: support event filtering in abigenPéter Szilágyi2018-01-247-33/+903
|/
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-035-21/+20
|
* accounts/abi: handle named ouputs prefixed with underscores (#15766)Péter Szilágyi2017-12-302-2/+80
| | | | | | | | * accounts/abi: handle named ouputs prefixed with underscores * accounts/abi: handle collinding outputs for struct unpacks * accounts: handle purely underscore output names
* accounts, consensus, core, eth: make chain maker consensus agnostic (#15497)gary rong2017-12-221-3/+3
| | | | | | | | | | * accounts, consensus, core, eth: make chain maker consensus agnostic * consensus, core: move CalcDifficulty to Engine interface * consensus: add docs for calcDifficulty function * consensus, core: minor comment fixups
* all: use gometalinter.v2, fix new gosimple issues (#15650)Zach2017-12-131-1/+1
|
* accounts, internal: fail if no suitable estimated gas found (#15477)gary rong2017-11-151-11/+26
| | | | | | * accounts, internal: return an error if no suitable estimated gas found * accounts, internal: minor polishes on the gas estimator
* all: gofmt -w -s (#15419)ferhat elmas2017-11-081-1/+1
|
* cmd, consensus, core, miner: instatx clique for --dev (#15323)Péter Szilágyi2017-10-241-1/+1
| | | | | | | | * cmd, consensus, core, miner: instatx clique for --dev * cmd, consensus, clique: support configurable --dev block times * cmd, core: allow --dev to use persistent storage too
* accounts/abi: improve type handling, add event support (#14743)RJ Catalano2017-10-171-1/+1
|
* internal, accounts, eth: utilize vm failed flag to help gas estimationrjl4934564422017-10-021-11/+13
|
* accounts/abi/backends: add AdjustTime (#15077)Dave Appleton2017-09-151-0/+17
|
* accounts/abi/bind: pass non-empty directory when calling goimports (#15070)nkbai2017-09-082-2/+2
|
* core: implement Metropolis EIP 658, receipt status byterjl4934564422017-08-221-1/+2
|
* core, light: send chain events using event.Feed (#14865)Miya Chen2017-08-181-2/+1
|
* cmd/abigen: update generated go file header text (#14845)Leo Shklovskii2017-07-241-2/+2
| | | | As per https://golang.org/s/generatedcode. This will allow other tools such as golint to properly ignore the files.
* core: remove redundant storage of transactions and receipts (#14801)Péter Szilágyi2017-07-151-1/+2
| | | | | | | | | | | | | | * core: remove redundant storage of transactions and receipts * core, eth, internal: new transaction schema usage polishes * eth: implement upgrade mechanism for db deduplication * core, eth: drop old sequential key db upgrader * eth: close last iterator on successful db upgrage * core: prefix the lookup entries to make their purpose clearer
* core/state: access trie through Database interface, track errors (#14589)Felix Lange2017-06-271-2/+2
| | | | | | | | | With this commit, core/state's access to the underlying key/value database is mediated through an interface. Database errors are tracked in StateDB and returned by CommitTo or the new Error method. Motivation for this change: We can remove the light client's duplicated copy of core/state. The light client now supports node iteration, so tracing and storage enumeration can work with the light client (not implemented in this commit).
* consensus, core, ethstats: use engine specific block beneficiary (#14318)Péter Szilágyi2017-04-121-1/+1
| | | | | | * consensus, core, ethstats: use engine specific block beneficiary * core, eth, les, miner: use explicit beneficiary during mining
* core, consensus: pluggable consensus engines (#3817)Péter Szilágyi2017-04-051-2/+2
| | | | | 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.
* core: refactor genesis handlingFelix Lange2017-03-233-22/+19
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* all: import "context" instead of "golang.org/x/net/context"Felix Lange2017-03-235-5/+5
| | | | | | | | | | 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.
* accounts/abi/bind: allow client to specify sender address for call (#3782)bas-vk2017-03-162-2/+42
|
* all: swap out the C++ ethash to the pure Go one (mining todo)Péter Szilágyi2017-03-091-1/+2
|
* Merge pull request #3723 from karalabe/logger-updates-2Péter Szilágyi2017-02-281-1/+1
|\ | | | | Logger updates
| * all: next batch of log polishes to contextual versionsPéter Szilágyi2017-02-281-1/+1
| |
* | all: unify big.Int zero checks, use common/math in more places (#3716)Felix Lange2017-02-281-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* accounts, eth/downloader: use "err" instead of "error" in logsPéter Szilágyi2017-02-271-1/+1
|
* common: move big integer math to common/math (#3699)Felix Lange2017-02-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* accounts, cmd: port packages over to the new logging systemPéter Szilágyi2017-02-231-4/+5
|
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-4/+3
|
* accounts, cmd, eth, internal, mobile, node: split account backendsPéter Szilágyi2017-02-131-2/+2
|
* accounts/abi/bind, internal/ethapi: binary search gas estimation (#3587)Péter Szilágyi2017-01-212-7/+72
| | | | | | | | | | | | | 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.
* cmd/geth, core: add support for recording SHA3 preimages (#3543)Nick Johnson2017-01-171-1/+1
|
* all: fix ineffectual assignments and remove uses of crypto.Sha3Felix Lange2017-01-091-1/+1
| | | | | go get github.com/gordonklaus/ineffassign ineffassign .
* all: fix issues reported by honnef.co/go/simple/cmd/gosimpleFelix Lange2017-01-071-10/+10
|
* core/types: remove redundant SignECDSA wrappers, rename to SignTxFelix Lange2017-01-051-1/+1
|
* core/vm: improved EVM run loop & instruction calling (#3378)Jeffrey Wilcke2017-01-051-1/+1
| | | | | | | | | | | | | | | 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.
* accounts, core, crypto, internal: use normalised V during signature handling ↵Péter Szilágyi2017-01-051-1/+1
| | | | | | | | | (#3455) 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.
* core, core/vm: implemented a generic environment (#3348)Jeffrey Wilcke2016-12-061-1/+5
| | | | | | | | 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.
* accounts/abi/bind, mobile: review fixes and android testsPéter Szilágyi2016-11-152-8/+12
|
* mobile: initial wrappers for mobile supportPéter Szilágyi2016-11-143-12/+266
|
* core/types, params: EIP#155Jeffrey Wilcke2016-11-134-16/+15
|
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-3/+6
| | | | | | | | | | | | | | | 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: Jeffrey Wilcke <jeffrey@ethereum.org>
* all: update license informationFelix Lange2016-11-093-3/+3
|
* internal/ethapi: add personal_sign and fix eth_sign to hash message (#2940)bas-vk2016-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* core/state: implement reverts by journaling all changesFelix Lange2016-10-061-2/+4
| | | | | | | | | | 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!
* core/state: track all accounts in canon stateFelix Lange2016-09-261-5/+2
| | | | | This change introduces a global, per-state cache that keeps account data in the canon state. Thanks to @karalabe for lots of fixes.
* accounts/abi/bind: add utilities for waiting on transactionsFelix Lange2016-08-234-15/+267
| | | | | | | | | 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.
* accounts/abi/bind: use ethereum interfacesFelix Lange2016-08-223-175/+157
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* accounts/abi/bind/backends: remove nil and remote backendsFelix Lange2016-08-214-203/+10
| | | | | | | | | | | | 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.
* rpc: add new client, use it everywhereFelix Lange2016-07-231-142/+18
| | | | | | The new client implementation supports concurrent requests, subscriptions and replaces the various ad hoc RPC clients throughout go-ethereum.
* accounts, core, eth: pass chain config for chain maker to test DAOPéter Szilágyi2016-07-151-2/+2
|
* core: added CheckNonce() to Message interfacezsfelfoldi2016-07-111-1/+2
|
* eth: separate common and full node-specific API and backend servicezsfelfoldi2016-06-165-48/+77
|
* accounts/abi/bind, eth: rely on getCode for sanity checks, not estimate and callPéter Szilágyi2016-05-205-6/+101
|
* accounts/abi/bind: fix multi-value anonymous unmarshallingPéter Szilágyi2016-05-122-3/+37
|
* release, all: integrate the release service into gethPéter Szilágyi2016-05-021-2/+3
|
* accounts/abi/bind, eth: add contract non-existent errorPéter Szilágyi2016-04-274-4/+60
|
* accounts/abi/bind/backends: estimate needed gas, not usedPéter Szilágyi2016-04-151-1/+1
|
* accounts, crypto: move keystore to package accountsFelix Lange2016-04-122-28/+23
| | | | | | | | | | 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.
* accounts/abi/bind: support generating bindings for various arraysPéter Szilágyi2016-04-052-16/+67
|
* Merge pull request #2405 from karalabe/abigen-default-methodsJeffrey Wilcke2016-04-013-5/+102
|\ | | | | accounts/abi/bind: surface raw wrappers to access low level ops
| * accounts/abi/bind: surface raw wrappers to access low level opsPéter Szilágyi2016-04-013-5/+102
| |
* | accounts/a/b/backends, core: chain maker homestead block set to 0Jeffrey Wilcke2016-04-011-2/+1
| | | | | | | | | | | | | | The chain maker and the simulated backend now run with a homestead phase beginning at block 0 (i.e. there's no frontier). This commit also fixes up #2388
* | core: added basic chain configurationJeffrey Wilcke2016-04-011-3/+8
|/ | | | | | | | | Added chain configuration options and write out during genesis database insertion. If no "config" was found, nothing is written to the database. Configurations are written on a per genesis base. This means that any chain (which is identified by it's genesis hash) can have their own chain settings.
* accounts/abi/bind: support account slices, drop hash typePéter Szilágyi2016-03-311-2/+2
|
* accounts/abi/bind: merge all tests into a single suitePéter Szilágyi2016-03-311-22/+22
|
* accounts/abi/bind: use anonymous ephemeral call result structsPéter Szilágyi2016-03-311-15/+10
|
* accounts/abi/bind, cmd/abigen: dedup structs, exclude patternsPéter Szilágyi2016-03-261-6/+6
|
* accounts/abi/bind: fix double pointer in generated codePéter Szilágyi2016-03-252-4/+36
|
* accounts/abi/bind, cmd/abigen: port to templates, bind to solidityPéter Szilágyi2016-03-249-428/+530
|
* accounts/abi/bind: constructor, auth utils and various backendsPéter Szilágyi2016-03-248-244/+696
|
* accounts/abi/bind, cmd/abigen: Go API generator around an EVM ABIPéter Szilágyi2016-03-244-0/+834