aboutsummaryrefslogtreecommitdiffstats
path: root/internal/ethapi/api.go
Commit message (Collapse)AuthorAgeFilesLines
* internal/ethapi: add transactionHash in blockreceipts (#58)johnliu-dexon2019-04-091-0/+1
|
* internal/ethapi: add getBlockReceiptsByHash (#56)johnliu-dexon2019-04-091-0/+35
| | | | | | | | | | * dex: add getBlockReceiptsByHash add rpc method for performance acceleration * Update internal/ethapi/api.go Co-Authored-By: johnliu-dexon <42129254+johnliu-dexon@users.noreply.github.com>
* core: various changes on tps tuning (#46)Wei-Ning Huang2019-04-091-0/+1
|
* api: allow sending batch of raw transactionsWei-Ning Huang2019-04-091-0/+39
|
* core: fix blockReward serializationWei-Ning Huang2019-04-091-1/+1
|
* app: add cache mechanism to increase performanceBojie Wu2019-04-091-1/+2
|
* dex: return round in get block rpc outputWei-Ning Huang2019-04-091-0/+1
|
* core: included Dexcon metadata in blockWei-Ning Huang2019-04-091-0/+2
|
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-04-091-18/+18
|
* eth, les, geth: implement cli-configurable global gas cap for RPC calls (#19401)Martin Holst Swende2019-04-081-6/+15
| | | | | | | | * eth, les, geth: implement cli-configurable global gas cap for RPC calls * graphql, ethapi: place gas cap in DoCall * ethapi: reformat log message
* all: simplify timestamps to uint64 (#19372)Martin Holst Swende2019-04-081-1/+1
| | | | | | | | | | | | | | * all: simplify timestamps to uint64 * tests: update definitions * clef, faucet, mobile: leftover uint64 fixups * ethash: fix tests * graphql: update schema for timestamp * ethash: remove unused variable
* internal/ethapi: ask transaction pool for pending nonce (#15794)Yondon Fu2019-01-071-0/+9
|
* core, internal, eth, miner, les: Take VM config from BlockChain (#17955)Paweł Bylica2018-12-061-4/+4
| | | | | | | | | | | Until this commit, when sending an RPC request that called `NewEVM`, a blank `vm.Config` would be taken so as to set some options, based on the default configuration. If some extra configuration switches were passed to the blockchain, those would be ignored. This PR adds a function to get the config from the blockchain, and this is what is now used for RPC calls. Some subsequent changes need to be made, see https://github.com/ethereum/go-ethereum/pull/17955#pullrequestreview-182237244 for the details of the discussion.
* internal: fix typo in comments (#18106)Kenso Trabing2018-11-151-1/+1
| | | Changed "signTransactions" to "signTransaction"
* EIP-1186 eth_getProof (#17737)Simon Jentzsch2018-10-191-0/+66
| | | | | | | | | | | | | | | | * first impl of eth_getProof * fixed docu * added comments and refactored based on comments from holiman * created structs * handle errors correctly * change Value to *hexutil.Big in order to have the same output as parity * use ProofList as return type
* internal/ethapi: warn on failed account accessesPéter Szilágyi2018-10-101-3/+9
|
* all: fix various comment typos (#17748)Liang ZOU2018-09-251-1/+1
|
* cmd, core, eth, miner, params: configurable gas floor and ceilPéter Szilágyi2018-08-291-1/+1
|
* crypto: replace ToECDSAPub with error-checking func UnmarshalPubkey (#16932)Felix Lange2018-06-121-4/+2
| | | | | | ToECDSAPub was unsafe because it returned a non-nil key with nil X, Y in case of invalid input. This change replaces ToECDSAPub with UnmarshalPubkey across the codebase.
* internal/ethapi: reduce pendingTransactions to O(txs+accs) from O(txs*accs)Péter Szilágyi2018-06-121-4/+9
|
* rpc: support returning nil pointer big.Ints (null)Péter Szilágyi2018-06-111-7/+7
|
* core: improve getBadBlocks to return full block rlp (#16902)Martin Holst Swende2018-06-111-6/+14
| | | | | | | | * core: improve getBadBlocks to return full block rlp * core, eth, ethapi: changes to getBadBlocks formatting * ethapi: address review concerns
* params: fix golint warnings (#16853)kiel barry2018-06-051-3/+3
| | | params: fix golint warnings
* core/rawdb: separate raw database access to own package (#16666)Péter Szilágyi2018-05-071-3/+4
|
* core/types: remove String methods from struct types (#16205)Steven Roose2018-04-051-1/+2
| | | | | | Most of these methods did not contain all the relevant information inside the object and were not using a similar formatting type. Moreover, the existence of a suboptimal String method breaks usage with more advanced data dumping tools like go-spew.
* internal/ethapi: make resent gas params optionalPéter Szilágyi2018-03-081-2/+2
|
* cmd/evm, core/vm, internal/ethapi: don't disable call gas meteringPéter Szilágyi2018-03-051-7/+7
|
* internal/ethapi: fix getTransactionReceiptPéter Szilágyi2018-02-281-2/+2
|
* eth, les, light: filter on logs only, derive receipts on demandPéter Szilágyi2018-02-231-3/+7
|
* ethapi: prevent creating contract if no data is provided (#16108)Martin Holst Swende2018-02-211-0/+12
| | | | | | * ethapi: prevent creating contract if no data is provided * internal/ethapi: downcase error for no data on contract creation
* core, trie: intermediate mempool between trie and database (#15857)Péter Szilágyi2018-02-061-1/+1
| | | This commit reduces database I/O by not writing every state trie to disk.
* internal: fix a typo that caused a lint error on travis (#15987)Guillaume Ballet2018-01-291-1/+1
|
* ethapi: add personal.signTransaction (#15971)Martin Holst Swende2018-01-271-20/+54
| | | | | | | | * ethapi: add personal.signTransaction * ethapi: refactor to minimize duplicate code * ethapi: make nonce,gas,gasPrice obligatory in signTransaction
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-031-31/+32
|
* internal/ethapi: support "input" in transaction args (#15640)Felix Lange2017-12-181-3/+16
| | | | | The tx data field is called "input" in returned objects and "data" in argument objects. Make it so "input" can be used, but bail if both are set.
* internal/ethapi: don't crash for missing receiptsrhaps1072017-12-141-1/+4
| | | | Fixes #15408 Fixes #14432
* internal/ethapi: fix typo in comment (#15659)yoza2017-12-131-1/+1
|
* Added output to clarify gas calculation in txpool.inspecttsarpaul2017-11-171-2/+2
|
* core/vm, internal/ethapi: tracer no full storage, nicer json output (#15499)Péter Szilágyi2017-11-171-25/+32
| | | | | | * core/vm, internal/ethapi: tracer no full storage, nicer json output * core/vm, internal/ethapi: omit disabled trace fields
* accounts, internal: fail if no suitable estimated gas found (#15477)gary rong2017-11-151-13/+26
| | | | | | * accounts, internal: return an error if no suitable estimated gas found * accounts, internal: minor polishes on the gas estimator
* internal, accounts, eth: utilize vm failed flag to help gas estimationrjl4934564422017-10-021-15/+18
|
* core/types, internal: swap Receipt.Failed to StatusPéter Szilágyi2017-10-021-8/+3
|
* internal/ethapi: add status code to receipt rpc returnrjl4934564422017-10-021-3/+14
|
* internal/ethapi: remove code duplication around tx sending (#15158)slumber11222017-09-251-21/+7
|
* eth, internal/ethapi: fix spelling of 'Ethereum' (#15164)Ernesto del Toro2017-09-201-4/+4
|
* core: make txpool operate on immutable statePéter Szilágyi2017-09-051-1/+0
|
* core: implement Metropolis EIP 658, receipt status byterjl4934564422017-08-221-1/+2
|
* accounts: refactor API for generalized USB walletsPéter Szilágyi2017-08-091-4/+11
|
* accounts, console, internal: support trezor hardware walletPéter Szilágyi2017-08-091-0/+16
|
* internal: fix megacheck warnings (#14919)Egon Elbre2017-08-071-26/+3
|
* core: remove redundant storage of transactions and receipts (#14801)Péter Szilágyi2017-07-151-146/+68
| | | | | | | | | | | | | | * 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-21/+12
| | | | | | | | | 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).
* internal/ethapi: initialize account mutex in lock properlyMartin Holst Swende2017-06-011-2/+3
|
* Merge pull request #14516 from holiman/noncefixesPéter Szilágyi2017-05-301-34/+36
|\ | | | | internal/ethapi: add mutex around signing + nonce assignment
| * internal/ethapi: add mutex around signing + nonce assignmentMartin Holst Swende2017-05-301-34/+36
| | | | | | | | | | This prevents concurrent assignment of identical nonces when automatic assignment is used.
* | internal/ethapi: fix tx nonces in pool inspect/contentPéter Szilágyi2017-05-291-8/+8
|/
* accounts/keystore, crypto: enforce 256 bit keys on importPéter Szilágyi2017-05-231-4/+2
|
* internal/ethapi: lock when auto-filling transaction nonce (#14483)Martin Holst Swende2017-05-191-0/+23
| | | | | | | More context in the bug This solves the problems of transactions being submitted simultaneously, and getting the same nonce, due to the gap (due to signing) between nonce-issuance and nonce-update. With this PR, a lock will need to be acquired whenever a nonce is used, and released when the transaction is submitted or errors out.
* cmd, eth, les, mobile: make networkid uint64 everywherePéter Szilágyi2017-04-251-2/+2
|
* internal/ethapi: return empty arrays instead of null (#14374)bas-vk2017-04-241-3/+3
| | | | | | * internal/ethapi: return empty arrays instead of null * internal/ethapi: minor comments to avoid future regressions
* 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.
* all: import "context" instead of "golang.org/x/net/context"Felix Lange2017-03-231-1/+1
| | | | | | | | | | 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.
* core/vm: use uint64 instead of *big.Int in tracer (#3805)Yohann Leon2017-03-221-2/+2
|
* all: swap out the C++ ethash to the pure Go one (mining todo)Péter Szilágyi2017-03-091-6/+2
|
* all: update light logs (and a few others) to the new modelPéter Szilágyi2017-03-031-28/+26
|
* all: unify big.Int zero checks, use common/math in more places (#3716)Felix Lange2017-02-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* internal/ethapi: fixes #2648, returns logsBloom for pending blocktranvictor2017-02-271-1/+1
|
* common: move big integer math to common/math (#3699)Felix Lange2017-02-271-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-17/+16
|
* params: core, core/vm, miner: 64bit gas instructionsJeffrey Wilcke2017-02-141-20/+42
| | | | | | | | | | | | | | | | | Reworked the EVM gas instructions to use 64bit integers rather than arbitrary size big ints. All gas operations, be it additions, multiplications or divisions, are checked and guarded against 64 bit integer overflows. In additon, most of the protocol paramaters in the params package have been converted to uint64 and are now constants rather than variables. * common/math: added overflow check ops * core: vmenv, env renamed to evm * eth, internal/ethapi, les: unmetered eth_call and cancel methods * core/vm: implemented big.Int pool for evm instructions * core/vm: unexported intPool methods & verification methods * core/vm: added memoryGasCost overflow check and test
* Revert "params: core, core/vm, miner: 64bit gas instructions (#3514)"Jeffrey Wilcke2017-02-131-41/+20
| | | | This reverts commit 8b57c494908637a5c0e74f8f7a13b3218e026757.
* accounts, cmd, internal, node: implement HD wallet self-derivationPéter Szilágyi2017-02-131-1/+5
|
* accounts, cmd, internal, mobile, node: canonical account URLsPéter Szilágyi2017-02-131-3/+1
|
* accounts, cmd, eth, internal, miner, node: wallets and HD APIsPéter Szilágyi2017-02-131-19/+102
|
* accounts, cmd, eth, internal, mobile, node: split account backendsPéter Szilágyi2017-02-131-36/+39
|
* params: core, core/vm, miner: 64bit gas instructions (#3514)Jeffrey Wilcke2017-02-021-27/+47
| | | | | | | | | | | | | | | | Reworked the EVM gas instructions to use 64bit integers rather than arbitrary size big ints. All gas operations, be it additions, multiplications or divisions, are checked and guarded against 64 bit integer overflows. In additon, most of the protocol paramaters in the params package have been converted to uint64 and are now constants rather than variables. * common/math: added overflow check ops * core: vmenv, env renamed to evm * eth, internal/ethapi, les: unmetered eth_call and cancel methods * core/vm: implemented big.Int pool for evm instructions * core/vm: unexported intPool methods & verification methods * core/vm: added memoryGasCost overflow check and test
* accounts/abi/bind, internal/ethapi: binary search gas estimation (#3587)Péter Szilágyi2017-01-211-2/+28
| | | | | | | | | | | | | 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.
* internal/ethapi: fix duration parameter of personal_unlockAccount (#3542)Felix Lange2017-01-111-5/+8
|
* all: fix spelling errorsPéter Szilágyi2017-01-071-3/+3
|
* Merge pull request #3518 from fjl/ethclient-dependency-cleanupPéter Szilágyi2017-01-061-1/+1
|\ | | | | core/types: dependency cleanup
| * core/vm: move Log to core/typesFelix Lange2017-01-061-1/+1
| | | | | | | | | | | | | | | | 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.
* | accounts, internal, mobile: polish accounts API, extend Android testsPéter Szilágyi2017-01-051-6/+5
|/
* accounts, core, crypto, internal: use normalised V during signature handling ↵Péter Szilágyi2017-01-051-8/+27
| | | | | | | | | (#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.
* internal/ethapi: fix hex handling for eth_call input and eth_sendRawTransactionFelix Lange2016-12-201-4/+4
|
* rpc: remove HexNumber, replace all uses with hexutil typesFelix Lange2016-12-201-301/+159
| | | | | This change couldn't be automated because HexNumber was used for numbers of all sizes.
* rpc: remove HexBytes, replace all uses with hexutil.BytesFelix Lange2016-12-201-9/+9
|
* internal/ethapi: fix hex handling for eth_sign, personal_{sign,recover}Felix Lange2016-12-161-29/+14
|
* core: bugfix state change race condition in txpool (#3412)bas-vk2016-12-111-4/+12
| | | | | | | | The transaction pool keeps track of the current nonce in its local pendingState. When a new block comes in the pendingState is reset. During the reset it fetches multiple times the current state through the use of the currentState callback. When a second block comes in during the reset its possible that the state changes during the reset. If that block holds transactions that are currently in the pool the local pendingState that is used to determine nonces can get out of sync.
* core/types: turn off nonce checking for Call messagesZsolt Felfoldi2016-11-141-1/+1
|
* core/types, params: EIP#155Jeffrey Wilcke2016-11-131-34/+52
|
* all: update license informationFelix Lange2016-11-091-1/+1
|
* les: light client protocol and APIZsolt Felfoldi2016-11-091-6/+7
|
* internal/ethapi: add personal_sign and fix eth_sign to hash message (#2940)bas-vk2016-10-291-7/+72
| | | | | | | | | | | | | | | | | | | | 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.
* internal/ethapi: add debug.chaindbCompactFelix Lange2016-10-201-0/+19
|
* internal/ethapi, internal/web3ext: adds raw tx retrieval methodsKobi Gurkan2016-10-101-1/+42
|
* Merge pull request #3088 from bas-vk/rpc-block-outputFelix Lange2016-10-071-1/+1
|\ | | | | core/types: renamed receiptRoot to receiptsRoot
| * core/types: renamed receiptRoot to receiptsRootBas van Kervel2016-10-051-1/+1
| |
* | internal/ethapi: bugfix gas price and limit swapped in eth_resendBas van Kervel2016-10-051-4/+3
|/
* core, eth, trie: reuse trie journals in all our codePéter Szilágyi2016-09-281-0/+2
|
* core/state: track all accounts in canon stateFelix Lange2016-09-261-2/+2
| | | | | This change introduces a global, per-state cache that keeps account data in the canon state. Thanks to @karalabe for lots of fixes.
* ethereum, ethclient: add SyncProgress API endpointPéter Szilágyi2016-09-061-7/+7
|
* core, eth, miner: only retain 1 tx/nonce, remove bad onesPéter Szilágyi2016-09-021-36/+24
|
* internal/ethapi: add missing output fieldsFelix Lange2016-08-041-24/+33
| | | | | | | | - returned headers didn't include mixHash - returned transactions didn't include signature fields - empty transaction input was returned as "", but should be "0x" - returned receipts didn't include the bloom filter - "root" in receipts was missing 0x prefix
* core/vm: Refactor tracing to make Tracer the main interfaceNick Johnson2016-08-221-54/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This CL makes several refactors: - Define a Tracer interface, implementing the `CaptureState` method - Add the VM environment as the first argument of `Tracer.CaptureState` - Rename existing functionality `StructLogger` an make it an implementation of `Tracer` - Delete `StructLogCollector` and make `StructLogger` collect the logs directly - Change all callers to use the new `StructLogger` where necessary and extract logs from that. - Deletes the apparently obsolete and likely nonfunctional 'TraceCall' from the eth API. Callers that only wish accumulated logs can use the `StructLogger` implementation straightforwardly. Callers that wish to efficiently capture VM traces and operate on them without excessive copying can now implement the `Tracer` interface to receive VM state at each step and do with it as they wish. This CL also removes the accumulation of logs from the vm.Environment; this was necessary as part of the refactor, but also simplifies it by removing a responsibility that doesn't directly belong to the Environment.
* Merge pull request #2909 from fjl/account-manager-cleanupFelix Lange2016-08-181-65/+3
|\ | | | | all: clean up tech debt left behind by the API split
| * common/compiler: simplify solc wrapperFelix Lange2016-08-171-65/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Support for legacy version 0.9.x is gone. The compiler version is no longer cached. Compilation results (and the version) are read directly from stdout using the --combined-json flag. As a workaround for ethereum/solidity#651, source code is written to a temporary file before compilation. Integration of solc in package ethapi and cmd/abigen is now much simpler because the compiler wrapper is no longer passed around as a pointer. Fixes #2806, accidentally
* | rpc: refactor subscriptions and filtersBas van Kervel2016-08-171-122/+4
|/
* eth/api: rename signAndSendTransaction to sendTransactionBas van Kervel2016-07-221-2/+8
|
* core: added CheckNonce() to Message interfacezsfelfoldi2016-07-111-2/+2
|
* eth: separate common and full node-specific API and backend servicezsfelfoldi2016-06-161-0/+1542