aboutsummaryrefslogtreecommitdiffstats
path: root/internal
Commit message (Collapse)AuthorAgeFilesLines
* cmd, dashboard, log: log collection and exploration (#17097)Kurkó Mihály2018-07-111-3/+18
| | | | | | | | | | | | * cmd, dashboard, internal, log, node: logging feature * cmd, dashboard, internal, log: requested changes * dashboard, vendor: gofmt, govendor, use vendored file watcher * dashboard, log: gofmt -s -w, goimports * dashboard, log: gosimple
* internal/debug: use pprof goroutine writer for debug_stacks (#16892)Ryan Schneider2018-06-141-3/+4
| | | | | | | | | | | | * debug: Use pprof goroutine writer in debug.Stacks() to ensure all goroutines are captured. * Up to 64MB limit, previous code only captured first 1MB of goroutines. * internal/debug: simplify stacks handler * fix typo * fix pointer receiver
* internal/web3ext: fix method name for enabling mutex profiling (#16964)Ryan Schneider2018-06-131-2/+2
|
* 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, eth: minor txpool event cleanupsPéter Szilágyi2018-05-181-1/+1
|
* all: collate new transaction events togetherrjl4934564422018-05-181-1/+1
|
* build: specify the key to use when invoking gpg:sign-and-deploy-file (#16696)ligi2018-05-091-0/+12
|
* core/rawdb: separate raw database access to own package (#16666)Péter Szilágyi2018-05-071-3/+4
|
* internal: golint updates for this or self warning (#16634)kiel barry2018-05-021-27/+27
|
* cmd/geth, mobile: add memsize to pprof server (#16532)Felix Lange2018-04-231-10/+17
| | | | | | | | * cmd/geth, mobile: add memsize to pprof server This is a temporary change, to be reverted before the next release. * cmd/geth: fix variable name
* all: fix various typos (#16533)Wuxiang2018-04-191-1/+1
| | | | | | | | * fix typo * fix typo * fix typo
* 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/debug: add support for mutex profiles (#16230)Felix Lange2018-03-032-4/+38
|
* internal/ethapi: fix getTransactionReceiptPéter Szilágyi2018-02-281-2/+2
|
* metrics: pull library and introduce ResettingTimer and InfluxDB reporter ↵Anton Evangelatov2018-02-231-0/+6
| | | | | | | | | | | | | | | | | | | | (#15910) * go-metrics: fork library and introduce ResettingTimer and InfluxDB reporter. * vendor: change nonsense/go-metrics to ethersphere/go-metrics * go-metrics: add tests. move ResettingTimer logic from reporter to type. * all, metrics: pull in metrics package in go-ethereum * metrics/test: make sure metrics are enabled for tests * metrics: apply gosimple rules * metrics/exp, internal/debug: init expvar endpoint when starting pprof server * internal/debug: tiny comment formatting fix
* 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
* all: update license information (#16089)Felix Lange2018-02-142-9/+9
|
* internal/build: fix usage of strings.TrimLeft (#16066)ferhat elmas2018-02-121-1/+1
|
* 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-272-20/+60
| | | | | | | | * ethapi: add personal.signTransaction * ethapi: refactor to minimize duplicate code * ethapi: make nonce,gas,gasPrice obligatory in signTransaction
* cmd/ethkey: fix formatting, review nits (#15807)Felix Lange2018-01-161-3/+5
| | | | | | | | This commit: - Adds a --msgfile option to read the message to sign from a file instead of command line argument. - Adds a unit test for signing subcommands. - Removes some weird whitespace in the code.
* all: update generated code (#15808)Felix Lange2018-01-081-16/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * core/types, core/vm, eth, tests: regenerate gencodec files * Makefile: update devtools target Install protoc-gen-go and print reminders about npm, solc and protoc. Also switch to github.com/kevinburke/go-bindata because it's more maintained. * contracts/ens: update contracts and regenerate with solidity v0.4.19 The newer upstream version of the FIFSRegistrar contract doesn't set the resolver anymore. The resolver is now deployed separately. * contracts/release: regenerate with solidity v0.4.19 * contracts/chequebook: fix fallback and regenerate with solidity v0.4.19 The contract didn't have a fallback function, payments would be rejected when compiled with newer solidity. References to 'mortal' and 'owned' use the local file system so we can compile without network access. * p2p/discv5: regenerate with recent stringer * cmd/faucet: regenerate * dashboard: regenerate * eth/tracers: regenerate * internal/jsre/deps: regenerate * dashboard: avoid sed -i because it's not portable * accounts/usbwallet/internal/trezor: fix go generate warnings
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-032-32/+34
|
* cmd, core, eth/tracers: support fancier js tracing (#15516)Péter Szilágyi2017-12-213-531/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * cmd, core, eth/tracers: support fancier js tracing * eth, internal/web3ext: rework trace API, concurrency, chain tracing * eth/tracers: add three more JavaScript tracers * eth/tracers, vendor: swap ottovm to duktape for tracing * core, eth, internal: finalize call tracer and needed extras * eth, tests: prestate tracer, call test suite, rewinding * vendor: fix windows builds for tracer js engine * vendor: temporary duktape fix * eth/tracers: fix up 4byte and evmdis tracer * vendor: pull in latest duktape with my upstream fixes * eth: fix some review comments * eth: rename rewind to reexec to make it more obvious * core/vm: terminate tracing using defers
* Merge pull request #15674 from chfast/vm-no-snapshot-paramPéter Szilágyi2017-12-181-1/+1
|\ | | | | core/vm: Remove snapshot param from Interpreter.Run()
| * core/vm: Remove snapshot param from Interpreter.Run()Paweł Bylica2017-12-151-1/+1
| |
* | 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
|
* internal/ethapi: avoid recreating JavaScript tracer wrappersPéter Szilágyi2017-11-241-43/+42
|
* eth, internal: Implement getModifiedAccountsBy(Hash|Number) using trie diffs ↵Nick Johnson2017-11-201-0/+12
| | | | | | | | | | | | (#15512) * eth, internal: Implement using trie diffs * eth, internal: Changes in response to review * eth: More fixes to getModifiedAccountsBy* * eth: minor polishes on error capitalization
* internal/ethapi: fix js tracer to properly decode addresses (#15297)Pulyak Viktor2017-11-181-10/+10
| | | | | | * Add method getBalanceFromJs for work with address as bytes * expect []byte instead of common.Address in ethapi tracer
* 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
* dockerignore, internal/build: forward correct git folderPéter Szilágyi2017-11-132-4/+5
|
* .dockerignore, internal/build: Read git information directly from file (#15458)Arba Sasmoyo2017-11-132-5/+18
| | | | | | | | | | | | | * .dockerignore, internal/build: Read git information directly from file This commit changes the way of retrieving git commit and branch for build environment from running git command to reading git files directly. This commit also adds required git files into Docker build context. fixes: #15346 * .dockerignore: workaround for including some files in .git
* internal/web3ext: make whisper v5 methods work (#15111)Guillaume Ballet2017-10-063-2977/+351
|
* 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
|
* internal/debug: add debug_setGCPercentFelix Lange2017-09-112-0/+11
|
* internal/debug: add debug_freeOSMemory (#15122)Felix Lange2017-09-112-71/+68
|
* core: make txpool operate on immutable statePéter Szilágyi2017-09-052-2/+0
|
* Merge pull request #15014 from rjl493456442/metropolis-eip658Péter Szilágyi2017-08-231-1/+2
|\ | | | | core: add status as a consensus field in receipt
| * core: implement Metropolis EIP 658, receipt status byterjl4934564422017-08-221-1/+2
| |
* | cmd/evm, core/vm, internal/ethapi: Show error when exiting (#14985)Martin Holst Swende2017-08-231-1/+1
|/ | | | | | * cmd/evm, core/vm, internal/ethapi: Add 'err' to tracer interface CaptureEnd * cmd/evm: fix nullpointer when there is no error
* core, light: send chain events using event.Feed (#14865)Miya Chen2017-08-181-0/+4
|
* 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-092-0/+21
|
* internal: fix megacheck warnings (#14919)Egon Elbre2017-08-072-34/+3
|
* internal/build: add GoTool and document why it uses GOROOTFelix Lange2017-08-071-2/+14
|
* 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
* internal/web3ext: fix debug.traceBlockFromFile wrapper (#14774)Daniel Sloof2017-07-101-2/+2
| | | | | As stated in the documentation, this method should be called traceBlockFromFile and not traceBlockByFile. Previously this would result in a 'The method ... does not exist/is not available' error.
* core/state: access trie through Database interface, track errors (#14589)Felix Lange2017-06-272-30/+16
| | | | | | | | | 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).
* Merge pull request #14540 from bas-vk/whisper-apiPéter Szilágyi2017-06-261-26/+36
|\ | | | | whisperv5: integrate whisper and implement API
| * whisperv5: integrate whisper and add whisper RPC simulatorBas van Kervel2017-06-151-26/+36
| |
* | swarm/test: add integration test for 'swarm up' (#14353)Lewis Marshall2017-06-211-0/+270
|/
* cmd/evm: add --prestate, --sender, --json flags for fuzzing (#14476)Martin Holst Swende2017-06-071-0/+7
|
* 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-303-36/+92
|\ | | | | internal/ethapi: add mutex around signing + nonce assignment
| * internal/ethapi: add mutex around signing + nonce assignmentMartin Holst Swende2017-05-303-36/+92
| | | | | | | | | | 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
|/
* Merge pull request #14502 from karalabe/mobile-import-ecdsaFelix Lange2017-05-251-4/+2
|\ | | | | Enforce 256 bit keys on raw import, support raw mobile imports
| * accounts/keystore, crypto: enforce 256 bit keys on importPéter Szilágyi2017-05-231-4/+2
| |
* | Merge pull request #14336 from obscuren/metropolis-preparationFelix Lange2017-05-251-1/+1
|\ \ | |/ |/| consensus, core/*, params: metropolis preparation refactor
| * consensus, core/*, params: metropolis preparation refactorJeffrey Wilcke2017-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is a preparation for the upcoming metropolis hardfork. It prepares the state, core and vm packages such that integration with metropolis becomes less of a hassle. * Difficulty calculation requires header instead of individual parameters * statedb.StartRecord renamed to statedb.Prepare and added Finalise method required by metropolis, which removes unwanted accounts from the state (i.e. selfdestruct) * State keeps record of destructed objects (in addition to dirty objects) * core/vm pre-compiles may now return errors * core/vm pre-compiles gas check now take the full byte slice as argument instead of just the size * core/vm now keeps several hard-fork instruction tables instead of a single instruction table and removes the need for hard-fork checks in the instructions * core/vm contains a empty restruction function which is added in preparation of metropolis write-only mode operations * Adds the bn256 curve * Adds and sets the metropolis chain config block parameters (2^64-1)
* | 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.
* whisper: switching to v5 + minor refactoring (#14387)gluk2562017-04-281-1/+100
|
* cmd, eth, les, mobile: make networkid uint64 everywherePéter Szilágyi2017-04-251-2/+2
|
* Merge pull request #14350 from fjl/trie-iterator-skip-2Péter Szilágyi2017-04-251-0/+5
|\ | | | | eth: add debug_storageRangeAt
| * eth: add debug_storageRangeAtFelix Lange2017-04-251-0/+5
| |
* | 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
* all: update license informationFelix Lange2017-04-141-1/+1
|
* cmd/utils, node: remove unused solc references and improve RPC config (#14324)bas-vk2017-04-132-6/+1
| | | | | Currently http cors and websocket origins are a comma separated string in the config object. These are replaced with string arrays that are more expressive in case of a config file.
* consensus/clique, internal/web3ext: support hash based API queries (#14321)Péter Szilágyi2017-04-121-2/+10
| | | | | | * consensus/clique, internal/web3ext: support hash based API queries * consensus/clique: make RPC return types public
* Merge pull request #14311 from Arachnid/tracingNick Johnson2017-04-121-22/+62
|\ | | | | internal/ethapi: Add support for fetching information about the current call in JS traces
| * internal/ethapi: Add support for fetching information about the current call ↵Nick Johnson2017-04-111-22/+62
| | | | | | | | in JS traces
* | consensus/clique: Proof of Authority (#3753)Péter Szilágyi2017-04-101-0/+41
|/ | | | This PR is a prototype implementation of plugable consensus engines and the Clique PoA protocol ethereum/EIPs#225
* .travis, build: autodelete old unstable archives (#13867)Péter Szilágyi2017-04-062-2/+55
| | | | | | | | This commit adds a build step to travis to auto-delete unstable archives older than 14 days (our regular release schedule) from Azure via ci.go purge. The commit also pulls in the latest Azure storage code, also switching over from the old import path (github.com/Azure/azure-sdk-for-go) to the new split one (github.com/Azure/azure-storage-go).
* 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.
* swarm/api: improve FUSE build constraints, logging and APIs (#3818)Felix Lange2017-03-311-24/+19
| | | | | | | | | | | | | | | | | | | | * swarm/api: fix build/tests on unsupported platforms Skip FUSE tests if FUSE is unavailable and change build constraints so the 'lesser' platforms aren't mentioned explicitly. The test are compiled on all platforms to prevent regressions in _fallback.go Also gofmt -w -s because why not. * internal/web3ext: fix swarmfs wrappers Remove inputFormatter specifications so users get an error when passing the wrong number of arguments. * swarm/api: improve FUSE-related logging and APIs The API now returns JSON objects instead of strings. Log messages for invalid arguments are removed.
* build: unify vendor skipping logicFelix Lange2017-03-231-0/+28
| | | | | This fixes a recent bug where 'make geth' built everything instead of just geth.
* swarm/api: support mounting manifests via FUSE (#3690)Zahoor Mohamed2017-03-231-0/+29
|
* all: import "context" instead of "golang.org/x/net/context"Felix Lange2017-03-233-13/+4
| | | | | | | | | | 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-223-7/+7
|
* Merge pull request #3756 from fjl/core-types-gencodecFelix Lange2017-03-222-3/+4
|\ | | | | core/types: use gencodec for JSON marshaling code
| * internal/jsre/deps: ensure that go generate produces no changesFelix Lange2017-03-072-3/+4
| |
* | internal/ethapi: drop eth_compile (#3740)Péter Szilágyi2017-03-162-85/+1
| |
* | all: finish integrating Go ethash, delete C++ vendorPéter Szilágyi2017-03-091-14/+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-034-37/+35
|
* 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
* Merge pull request #3717 from tranvictor/masterPéter Szilágyi2017-02-281-1/+1
|\ | | | | internal/ethapi: return logsBloom for pending block
| * internal/ethapi: fixes #2648, returns logsBloom for pending blocktranvictor2017-02-271-1/+1
| |
* | all: disable log message colors outside of gethFelix Lange2017-02-271-4/+13
|/ | | | Also tweak behaviour so colors are only enabled when stderr is a terminal.
* 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
* internal, log: support debug log prints, displaying log originsPéter Szilágyi2017-02-231-3/+11
|
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-234-48/+50
|
* params: core, core/vm, miner: 64bit gas instructionsJeffrey Wilcke2017-02-143-23/+45
| | | | | | | | | | | | | | | | | 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
* core, eth, internal: Added `debug_getBadBlocks()` method (#3654)Martin Holst Swende2017-02-141-1/+6
| | | | | | | | | | | | | | | | * core,eth,internal: Added `debug_getBadBlocks()` method When bad blocks are discovered, these are stored within geth. An RPC-endpoint makes them availablewithin the `debug` namespace. This feature makes it easier to discover network forks. ``` * core, api: go format + docs * core/blockchain: Documentation, fix minor nitpick * core: fix failing blockchain test
* Revert "params: core, core/vm, miner: 64bit gas instructions (#3514)"Jeffrey Wilcke2017-02-133-44/+23
| | | | 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-132-19/+114
|
* accounts, cmd, eth, internal, mobile, node: split account backendsPéter Szilágyi2017-02-132-53/+57
|
* accounts/abi, internal/jsre/deps: gofmt -w -s (#3636)Diego Siqueira2017-02-031-2/+2
| | | Signed-off-by: DiSiqueira <dieg0@live.com>
* params: core, core/vm, miner: 64bit gas instructions (#3514)Jeffrey Wilcke2017-02-023-30/+50
| | | | | | | | | | | | | | | | 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
* console, internal/web3ext: remove bzz and ens extensions (#3602)Felix Lange2017-01-251-97/+0
| | | | | web3.js includes bzz methods and throws an error when the extension module is reregistered. The ENS RPC API is deprecated and not exposed by anything.
* 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/guide: initial test suite to ensure guide snippets run ok (#3582)Péter Szilágyi2017-01-202-0/+118
|
* Merge pull request #3579 from bas-vk/natspecPéter Szilágyi2017-01-171-6/+0
|\ | | | | cmd,eth,les,internal: remove natspec support
| * cmd,eth,les,internal: remove natspec supportBas van Kervel2017-01-171-6/+0
| |
* | cmd/geth, core: add support for recording SHA3 preimages (#3543)Nick Johnson2017-01-171-0/+6
|/
* internal: update web3.js to 0.18.1, embed deps with go-bindata (#3545)Péter Szilágyi2017-01-136-327/+774
|
* internal/ethapi: fix duration parameter of personal_unlockAccount (#3542)Felix Lange2017-01-111-5/+8
|
* all: fix spelling errorsPéter Szilágyi2017-01-072-14/+14
|
* 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/jsre: fix built-in inspect functionFelix Lange2016-12-202-4/+4
| | | | | inspect was broken by ffaf58f0a98 (May 2016!). Looks like nobody uses this function.
* 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.
* cmd/bzzd: swarm daemon fixes (#3359)Viktor Trón2016-11-281-14/+2
| | | | | | | | | | | | * cmd/bzzd: add missing p2p/discovery flags * cmd/bzzd: fix two bugs crashing bzzd if bootnodes flag given * cmd/bzzd: make no swap default, renamed flag bzznoswap->bzzswap * internal/web3ext: correct methods for bzz IPC module * cmd/bzzd: ethapi param not mandatory. Warning if no blockchain * cmd/bzzd: correct default IPC modules in help string * cmd/utils: fix help description for networkId - add Ropsten * cmd/bzz, swarm/api, swarm/network: add swarm networkId flag * cmd/bzzd: change nosync flag to sync and BootTFlag
* internal/build: use 'git tag --points-at' to get the current tagFelix Lange2016-11-281-1/+6
| | | | This should restore support for building with git 1.x.
* cmd/utils, internal/web3ext: removed httpGetJeffrey Wilcke2016-11-251-5/+0
|
* internal/web3ext: remove registrar-related extensionsFelix Lange2016-11-251-30/+0
| | | | (cherry picked from commit d54ad55c6079ae6eab93d7f34ce5c4ec829f8e5b)
* internal/build: add support for git tag in local EnvironmentFelix Lange2016-11-232-3/+9
| | | | | | I didn't add this initially because the command I tried was too slow. The 'git for-each-ref ...' invocation takes 40ms on my machine. That ought to be acceptable.
* .travis, build: Build step to push .aar to Maven CentralPéter Szilágyi2016-11-141-1/+1
|
* 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-095-3/+5
|
* les: light client protocol and APIZsolt Felfoldi2016-11-092-8/+9
|
* build: fix remote path for archive uploads (#3243)Felix Lange2016-11-091-0/+6
| | | | archiveUpload did not handle absolute paths correctly. Fix it by using the basename and ensure that uploads can be tested using -n.
* build: NSIS based Windows installer (#3240)Péter Szilágyi2016-11-091-0/+23
| | | | This commit adds support for creating Windows installers to ci.go
* internal/build: call correct signer methodPéter Szilágyi2016-11-081-1/+1
|
* build, internal/build: misc improvements (#3229)Felix Lange2016-11-031-10/+18
| | | | | | | | | | | | | * travis.yml: don't create darwin/386 builds * build: remove godep remains * internal/build: improve archives - enable compression for zip files - don't write half-complete archives * build: add -unstable to archive names
* travis, build: implement uploading archives to azurePéter Szilágyi2016-11-032-0/+116
|
* internal/debug, internal/ethapi, rpc, swarm/storage: Ran "go fmt"Kenji Siu2016-11-012-23/+23
|
* 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-292-8/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Godeps, vendor: convert dependency management to trash (#3198)Péter Szilágyi2016-10-291-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit converts the dependency management from Godeps to the vendor folder, also switching the tool from godep to trash. Since the upstream tool lacks a few features proposed via a few PRs, until those PRs are merged in (if), use github.com/karalabe/trash. You can update dependencies via trash --update. All dependencies have been updated to their latest version. Parts of the build system are reworked to drop old notions of Godeps and invocation of the go vet command so that it doesn't run against the vendor folder, as that will just blow up during vetting. The conversion drops OpenCL (and hence GPU mining support) from ethash and our codebase. The short reasoning is that there's noone to maintain and having opencl libs in our deps messes up builds as go install ./... tries to build them, failing with unsatisfied link errors for the C OpenCL deps. golang.org/x/net/context is not vendored in. We expect it to be fetched by the user (i.e. using go get). To keep ci.go builds reproducible the package is "vendored" in build/_vendor.
* | internal/ethapi: add debug.chaindbCompactFelix Lange2016-10-202-0/+23
| |
* | Merge pull request #3100 from kobigurk/developFelix Lange2016-10-172-1/+55
|\ \ | | | | | | internal/ethapi, internal/web3ext: adds raw tx retrieval methods
| * | internal/ethapi, internal/web3ext: adds raw tx retrieval methodsKobi Gurkan2016-10-102-1/+55
| | |
* | | 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.
* | | | metrics, internal/debug: Add --pprofaddr flag, expose metrics via gexpNick Johnson2016-10-141-2/+7
| |/ / |/| |
* | | 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
| |/ / |/| |
* | | internal/build: fix git tag env variable for AppVeyorFelix Lange2016-10-031-1/+1
|/ /
* | internal/build: use less edgy command to get the branch nameFelix Lange2016-10-031-1/+3
| |
* | Merge pull request #3066 from fjl/build-envPéter Szilágyi2016-10-022-8/+120
|\ \ | | | | | | build: improve debian packaging
| * | build: improve debian packagingFelix Lange2016-10-022-8/+120
| |/ | | | | | | | | | | | | | | | | | | This commit tweaks the debian packaging tool: * All build environment metadata can now be overriden on the command line. This allows testing the CI build behaviour locally. * -unstable packages now actually contain the binaries (oops) * packages use Go 1.7 to build * archiving is skipped for PR builds
* / 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
|
* swarm: plan bee for content storage and distribution on web3ΞTHΞЯSPHΞЯΞ2016-08-311-9/+151
| | | | | | | | | | | | | | | | | | | | | | | This change imports the Swarm protocol codebase. Compared to the 'swarm' branch, a few mostly cosmetic changes had to be made: * The various redundant log message prefixes are gone. * All files now have LGPLv3 license headers. * Minor code changes were needed to please go vet and make the tests pass on Windows. * Further changes were required to adapt to the go-ethereum develop branch and its new Go APIs. Some code has not (yet) been brought over: * swarm/cmd/bzzhash: will reappear as cmd/bzzhash later * swarm/cmd/bzzup.sh: will be reimplemented in cmd/bzzup * swarm/cmd/makegenesis: will reappear somehow * swarm/examples/album: will move to a separate repository * swarm/examples/filemanager: ditto * swarm/examples/files: will not be merged * swarm/test/*: will not be merged * swarm/services/swear: will reappear as contracts/swear when needed
* common,internal: typo/misspelling fixes (#2953)gregg dourgarian2016-08-271-5/+5
|
* 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-233-1/+488
|
* 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
|/
* Merge pull request #2740 from Firescar96/removepeerFelix Lange2016-07-291-0/+5
|\ | | | | node, p2p, internal: Add ability to remove peers via admin interface
| * node, p2p, internal: Add ability to remove peers via admin interfaceFirescar962016-07-151-0/+5
| |
* | rpc: add new client, use it everywhereFelix Lange2016-07-231-1/+1
| | | | | | | | | | | | The new client implementation supports concurrent requests, subscriptions and replaces the various ad hoc RPC clients throughout go-ethereum.
* | eth/api: rename signAndSendTransaction to sendTransactionBas van Kervel2016-07-222-4/+10
| |
* | core: added CheckNonce() to Message interfacezsfelfoldi2016-07-111-2/+2
| |
* | Merge pull request #2159 from zsfelfoldi/light-backendPéter Szilágyi2016-06-302-0/+1661
|\ \ | |/ |/| eth: separate common and full node-specific API and backend service
| * eth: separate common and full node-specific API and backend servicezsfelfoldi2016-06-162-0/+1661
| |
* | web3ext: Remove old natspec Admin_JS stubsJustin Clark-Casey2016-06-241-15/+0
| | | | | | | | This stops them from showing up on the javascript console.
* | build: add ci.go, use it everywhereFelix Lange2016-06-222-0/+299
|/ | | | | | The new build script, ci.go, replaces some of the older shell scripts. ci.go can compile go-ethereum, run the tests, create release archives and debian source packages.
* cmd/geth: codegansta/cli package renamed to urfave/cliBas van Kervel2016-06-091-1/+1
|
* internal/jsre: ensure Stop can be called more than onceFelix Lange2016-06-031-7/+9
| | | | This makes "geth js file.js" terminate again.
* console, internal/jsre: colorize JavaScript exceptions tooPéter Szilágyi2016-05-302-2/+20
|
* cmd, console: split off the console into a reusable packagePéter Szilágyi2016-05-307-0/+16874
|
* eth: add new RPC method (personal.) SignAndSendTransactionBas van Kervel2016-05-201-0/+6
|
* cmd/geth, internal/web3ext, rpc: surface rpc module, fix shh, fix minerPéter Szilágyi2016-05-111-116/+131
|
* internal/debug: also rename debug_startTrace to debug_startGoTraceFelix Lange2016-05-065-14/+14
| | | | This was missing from the previous change.
* internal/debug: rename debug_trace to debug_goTraceFelix Lange2016-05-062-4/+4
| | | | Reduces confusion with EVM execution tracing methods.
* eth: add personal_importRawKey for runtime private key importAles Katona2016-04-281-6/+21
|
* rpc: move web3.js extensions to internal/web3extFelix Lange2016-04-151-0/+463
|
* internal/debug: add memStats and gcStats to APIFelix Lange2016-04-131-0/+15
|
* cmd/utils, internal/debug: show all stacks for 10x Ctrl-C induced panicFelix Lange2016-03-122-0/+51
| | | | | Go 1.6 only prints stacks for the current goroutine by default, but for this panic we want to see all of them.
* internal/debug: don't disable heap profile collection by defaultFelix Lange2016-03-121-0/+1
| | | | | Setting runtime.MemProfileRate to 0 through the flag default value makes it impossible to get an 'in-use' profile.
* internal/debug: APIs for profiling and tracingFelix Lange2016-01-284-0/+404
The debug package provides an RPC wrapper for glog settings and the debugging facilities of the Go runtime. They can be triggered through both command line flags and the IPC listener.