aboutsummaryrefslogtreecommitdiffstats
path: root/internal/ethapi
Commit message (Collapse)AuthorAgeFilesLines
* 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
|/
* core/vm: improved EVM run loop & instruction calling (#3378)Jeffrey Wilcke2017-01-053-5/+5
| | | | | | | | | | | | | | | 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-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-112-5/+13
| | | | | | | | 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, core/vm: implemented a generic environment (#3348)Jeffrey Wilcke2016-12-063-63/+10
| | | | | | | | 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.
* core/types: turn off nonce checking for Call messagesZsolt Felfoldi2016-11-141-1/+1
|
* core/types, params: EIP#155Jeffrey Wilcke2016-11-132-34/+56
|
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-6/+3
| | | | | | | | | | | | | | | 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-092-2/+2
|
* les: light client protocol and APIZsolt Felfoldi2016-11-092-8/+9
|
* internal/debug, internal/ethapi, rpc, swarm/storage: Ran "go fmt"Kenji Siu2016-11-011-22/+22
|
* Merge pull request #3064 from pirapira/limit_struct_logsJeffrey Wilcke2016-10-311-1/+2
|\ | | | | core/vm: add limit option to LogConfig
| * vm, ethapi: add `limit` option to traceTransactionYoichi Hirai2016-09-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | that specifies the maximum number of elements in the `structLogs` output. This option is useful for debugging a transaction that involves a large number of repetition. For example, ``` debug.traceTransaction(tx, {disableStorage: true, limit: 2}) ``` shows at most the first two steps in the `structLogs`.
* | 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
| |
* | Merge pull request #3100 from kobigurk/developFelix Lange2016-10-171-1/+42
|\ \ | | | | | | internal/ethapi, internal/web3ext: adds raw tx retrieval methods
| * | internal/ethapi, internal/web3ext: adds raw tx retrieval methodsKobi Gurkan2016-10-101-1/+42
| | |
* | | Merge pull request #3111 from obscuren/gas-price-forkPéter Szilágyi2016-10-151-1/+3
|\ \ \ | |/ / |/| | core, core/vm: added gas price variance table (EIP #150)
| * | core, core/vm: added gas price variance tableJeffrey Wilcke2016-10-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements 1b & 1c of EIP150 by adding a new GasTable which must be returned from the RuleSet config method. This table is used to determine the gas prices for the current epoch. Please note that when the CreateBySuicide gas price is set it is assumed that we're in the new epoch phase. In addition this PR will serve as temporary basis while refactorisation in being done in the EVM64 PR, which will substentially overhaul the gas price code.
* | | 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
| | |
* | | Merge pull request #3092 from fjl/state-journalJeffrey Wilcke2016-10-061-8/+8
|\ \ \ | | | | | | | | core/state: implement reverts by journaling all changes
| * | | core/state: implement reverts by journaling all changesFelix Lange2016-10-061-8/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!
* / / internal/ethapi: bugfix gas price and limit swapped in eth_resendBas van Kervel2016-10-051-4/+3
|/ /
* / cmd, core, internal, light, tests: avoid hashing the code in the VMPéter Szilágyi2016-10-011-1/+1
|/
* 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, internal, miner: optimize txpool for quick opsPéter Szilágyi2016-09-021-1/+1
|
* core, eth, miner: only retain 1 tx/nonce, remove bad onesPéter Szilágyi2016-09-022-37/+25
|
* 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
* internal/ethapi: Fix bug in opCodeWrapper usageNick Johnson2016-08-242-6/+23
|
* internal/ethapi: Improve tracer error reporting and serializationNick Johnson2016-08-242-11/+26
|
* core/vm, eth: Add support for javascript trace functionsNick Johnson2016-08-232-0/+486
|
* 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-183-73/+90
|\ | | | | all: clean up tech debt left behind by the API split
| * common/compiler: simplify solc wrapperFelix Lange2016-08-173-73/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-162-0/+1661