aboutsummaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* common/fdlimit: cap on MacOS file limits, fixes #18994 (#19035)Martin Holst Swende2019-02-124-11/+19
| | | | | | | | | | | | | | | | * common/fdlimit: cap on MacOS file limits, fixes #18994 * common/fdlimit: fix Maximum-check to respect OPEN_MAX * common/fdlimit: return error if OPEN_MAX is exceeded in Raise() * common/fdlimit: goimports * common/fdlimit: check value after setting fdlimit * common/fdlimit: make comment a bit more descriptive * cmd/utils: make fdlimit happy path a bit cleaner
* cmd/utils, eth: relinquish GC cache to read cache in archive modePéter Szilágyi2019-02-072-10/+10
|
* common/compiler: fixed testSource (#18978)Javier Sagredo2019-02-031-1/+2
|
* GraphQL master FF for review (#18445)Kris Shinn2019-01-212-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial work on a graphql API * Added receipts, and more transaction fields. * Finish receipts, add logs * Add transactionCount to block * Add types and . * Update Block type to be compatible with ethql * Rename nonce to transactionCount in Account, to be compatible with ethql * Update transaction, receipt and log to match ethql * Add query operator, for a range of blocks * Added ommerCount to Block * Add transactionAt and ommerAt to Block * Added sendRawTransaction mutation * Add Call and EstimateGas to graphQL API * Refactored to use hexutil.Bytes instead of HexBytes * Replace BigNum with hexutil.Big * Refactor call and estimateGas to use ethapi struct type * Replace ethgraphql.Address with common.Address * Replace ethgraphql.Hash with common.Hash * Converted most quantities to Long instead of Int * Add support for logs * Fix bug in runFilter * Restructured Transaction to work primarily with headers, so uncle data is reported properly * Add gasPrice API * Add protocolVersion API * Add syncing API * Moved schema into its own source file * Move some single use args types into anonymous structs * Add doc-comments * Fixed backend fetching to use context * Added (very) basic tests * Add documentation to the graphql schema * Fix reversion for formatting of big numbers * Correct spelling error * s/BigInt/Long/ * Update common/types.go * Fixes in response to review * Fix lint error * Updated calls on private functions * Fix typo in graphql.go * Rollback ethapi breaking changes for graphql support Co-Authored-By: Arachnid <arachnid@notdot.net>
* vendor, crypto, swarm: switch over to upstream sha3 packageDave McGregor2019-01-041-2/+2
|
* common/compiler: capture runtime code and source maps (#18020)JoranHonig2018-11-081-8/+16
|
* EIP-1186 eth_getProof (#17737)Simon Jentzsch2018-10-191-0/+9
| | | | | | | | | | | | | | | | * 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
* common, core, light: add block age into info logsPéter Szilágyi2018-09-201-0/+42
|
* all: simplify s[:] to s where s is a slice (#17673)Emil2018-09-151-1/+1
|
* common: fix typo (#17582)ligi2018-09-041-1/+1
| | | Fixes #17581
* all: remove the duplicate 'the' in annotations (#17509)Wenbiao Zheng2018-08-271-2/+2
|
* les: implement client connection logic (#16899)Felföldi Zsolt2018-08-154-0/+323
| | | | | | | | | | | | | | | | | | | | | | | This PR implements les.freeClientPool. It also adds a simulated clock in common/mclock, which enables time-sensitive tests to run quickly and still produce accurate results, and package common/prque which is a generalised variant of prque that enables removing elements other than the top one from the queue. les.freeClientPool implements a client database that limits the connection time of each client and manages accepting/rejecting incoming connections and even kicking out some connected clients. The pool calculates recent usage time for each known client (a value that increases linearly when the client is connected and decreases exponentially when not connected). Clients with lower recent usage are preferred, unknown nodes have the highest priority. Already connected nodes receive a small bias in their favor in order to avoid accepting and instantly kicking out clients. Note: the pool can use any string for client identification. Using signature keys for that purpose would not make sense when being known has a negative value for the client. Currently the LES protocol manager uses IP addresses (without port address) to identify clients.
* common: add database/sql support for Hash and Address (#15541)Vincent Serpoul2018-07-242-2/+219
|
* common/number: delete unused package (#16983)Felix Lange2018-06-142-305/+0
| | | | | This package was meant to hold an improved 256 bit integer library, but the effort was abandoned in 2015. AFAIK nothing ever used this package. Time to say goodbye.
* common: all golint warnings removed (#16852)kiel barry2018-06-146-8/+14
| | | | | | * common: all golint warnings removed * common: fixups
* cmd/abigen: support for reading solc output from stdin (#16683)Antonio Salazar Cardozo2018-06-051-4/+24
| | | | | | | | | | | | | | | Allow the --abi flag to be given - to indicate that it should read the ABI information from standard input. It expects to read the solc output with the --combined-json flag providing bin, abi, userdoc, devdoc, and metadata, and works very similarly to the internal invocation of solc, except it allows external invocation of solc. This facilitates integration with more complex solc invocations, such as invocations that require path remapping or --allow-paths tweaks. Simple usage example: solc --combined-json bin,abi,userdoc,devdoc,metadata *.sol | abigen --abi -
* common: improve documentation comments (#16701)kiel barry2018-05-296-132/+78
| | | | | This commit adds many comments and removes unused code. It also removes the EmptyHash function, which had some uses but was silly.
* common: changed if-else blocks to conform with golint (#16656)GagziW2018-05-071-8/+6
|
* rpc: clean up IPC handler (#16524)Felix Lange2018-04-181-2/+2
| | | | This avoids logging accept errors on shutdown and removes a bit of duplication. It also fixes some goimports lint warnings.
* cmd/clef, signer: initial poc of the standalone signer (#16154)Martin Holst Swende2018-04-162-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * signer: introduce external signer command * cmd/signer, rpc: Implement new signer. Add info about remote user to Context * signer: refactored request/response, made use of urfave.cli * cmd/signer: Use common flags * cmd/signer: methods to validate calldata against abi * cmd/signer: work on abi parser * signer: add mutex around UI * cmd/signer: add json 4byte directory, remove passwords from api * cmd/signer: minor changes * cmd/signer: Use ErrRequestDenied, enable lightkdf * cmd/signer: implement tests * cmd/signer: made possible for UI to modify tx parameters * cmd/signer: refactors, removed channels in ui comms, added UI-api via stdin/out * cmd/signer: Made lowercase json-definitions, added UI-signer test functionality * cmd/signer: update documentation * cmd/signer: fix bugs, improve abi detection, abi argument display * cmd/signer: minor change in json format * cmd/signer: rework json communication * cmd/signer: implement mixcase addresses in API, fix json id bug * cmd/signer: rename fromaccount, update pythonpoc with new json encoding format * cmd/signer: make use of new abi interface * signer: documentation * signer/main: remove redundant option * signer: implement audit logging * signer: create package 'signer', minor changes * common: add 0x-prefix to mixcaseaddress in json marshalling + validation * signer, rules, storage: implement rules + ephemeral storage for signer rules * signer: implement OnApprovedTx, change signing response (API BREAKAGE) * signer: refactoring + documentation * signer/rules: implement dispatching to next handler * signer: docs * signer/rules: hide json-conversion from users, ensure context is cleaned * signer: docs * signer: implement validation rules, change signature of call_info * signer: fix log flaw with string pointer * signer: implement custom 4byte databsae that saves submitted signatures * signer/storage: implement aes-gcm-backed credential storage * accounts: implement json unmarshalling of url * signer: fix listresponse, fix gas->uint64 * node: make http/ipc start methods public * signer: add ipc capability+review concerns * accounts: correct docstring * signer: address review concerns * rpc: go fmt -s * signer: review concerns+ baptize Clef * signer,node: move Start-functions to separate file * signer: formatting
* common: delete StringToAddress, StringToHash (#16436)Felix Lange2018-04-101-6/+4
| | | | | | | | | | * common: delete StringToAddress, StringToHash These functions are confusing because they don't parse hex, but use the bytes of the string. This change removes them, replacing all uses of StringToAddress(s) by BytesToAddress([]byte(s)). * eth/filters: remove incorrect use of common.BytesToAddress
* common/compiler: remove "--add-std" arg, deprecated in solidity 0.4.21Jeffery Robert Walsh2018-03-091-1/+0
|
* core, vm, common: define constantinople fork + shift (#16045)Martin Holst Swende2018-02-231-1/+1
| | | | | | | | | | | | * core, vm, common: define constantinople fork, start implementation of shift instructions * vm: more testcases * vm: add tests for intpool erroneous intpool handling * core, vm, common: fix constantinople review concerns * vm: add string<->op definitions for new opcodes
* all: update license information (#16089)Felix Lange2018-02-144-29/+29
|
* core, trie: intermediate mempool between trie and database (#15857)Péter Szilágyi2018-02-061-8/+19
| | | This commit reduces database I/O by not writing every state trie to disk.
* common/fdlimit: Move fdlimit files to separate package (#15850)Ricardo Domingos2018-01-124-0/+216
| | | | | | | | | | | | | | * common/fdlimit: Move fdlimit files to separate package When go-ethereum is used as a library the calling program need to set the FD limit. This commit extract fdlimit files to a separate package so it can be used outside of go-ethereum. * common/fdlimit: Remove FdLimit from functions signature * common/fdlimit: Rename fdlimit functions
* various: remove redundant parentheses (#15793)Furkan KAMACI2018-01-031-4/+4
|
* common: improve IsHexAddress and add tests (#15551)Steven Roose2017-12-054-28/+65
| | | | | Also unexport isHex, hasHexPrefix because IsHexAddress is the only caller. Fixes #15550
* common: fix hex utils to handle 1 byte address conversionsPéter Szilágyi2017-11-292-7/+15
|
* build: enable unconvert linter (#15456)ferhat elmas2017-11-112-4/+2
| | | | | | | | | * build: enable unconvert linter - fixes #15453 - update code base for failing cases * cmd/puppeth: replace syscall.Stdin with os.Stdin.Fd() for unconvert linter
* common: improve documentation of Hash.SetBytes (#15062)Martin Holst Swende2017-09-081-2/+2
| | | Fixes #15004
* core: implement Metropolis EIP 658, receipt status byterjl4934564422017-08-221-0/+3
|
* common: fix megacheck warningsEgon Elbre2017-08-072-9/+8
|
* common: tests for EIP55-compliant Address.Hex()Jim McDonald2017-07-161-0/+31
|
* common: Address.Hex() outputs EIP55-compliant stringJim McDonald2017-07-161-1/+23
|
* common/hexutil: wrap errors in json.UnmarshalTypeErrorFelix Lange2017-06-275-59/+102
| | | | | | | This adds type and struct field context to error messages. Instead of "hex string of odd length" users will now see "json: cannot unmarshal hex string of odd length into Go struct field SendTxArgs.from of type common.Address".
* core/vm, common/math: Add doc about Byte, fix formatMartin Holst Swende2017-06-092-15/+20
|
* common/math, core/vm: Un-expose bigEndianByteAt, use correct terms for ↵Martin Holst Swende2017-06-072-16/+17
| | | | endianness
* core/vm, common/math: Add fast getByte for bigints, improve opByteMartin Holst Swende2017-06-052-1/+120
|
* common: fixed byte padding functionsJeffrey Wilcke2017-05-231-3/+3
| | | | | | | Byte padding function should return the given slice if the length is smaller or equal rather than *only* smaller than. This fix improves almost all EVM push operations.
* common/compress: internalize encoders, add length wrappersPéter Szilágyi2017-05-083-70/+125
|
* common/bitutil: fix decompression corner cases; fuzz, test & benchPéter Szilágyi2017-05-073-43/+302
|
* common/bitutil: added data compression algorithmZsolt Felfoldi2017-05-061-0/+93
|
* common/bitutil, consensus/ethash: reusable bitutil packagePéter Szilágyi2017-05-052-0/+403
|
* Hive-test fixes (#14419)Martin Holst Swende2017-05-041-0/+2
| | | | | | | | | | * core: Fix for consensus test gasLimit > 2^63-1 https://github.com/ethereum/tests/blob/develop/BlockchainTests/bcInvalidHeaderTest.json#L238 * core: fix testcase for uncle gasUsage > gasLimit : https://github.com/ethereum/tests/blob/develop/BlockchainTests/EIP150/bcUncleHeaderValiditiy.json#L986 * math/big: rename TTM63m1 -> MaxBig63, + go fmt * core: documentation
* Merge remote-tracking branch 'fjl/license-update-1.6'Péter Szilágyi2017-04-141-1/+1
|\
| * all: update license informationFelix Lange2017-04-141-1/+1
| |
* | Merge pull request #3786 from fjl/compiler-metadataPéter Szilágyi2017-04-132-76/+56
|\ \ | |/ |/| common/compiler: add metadata output for solc > 0.4.6
| * common/compiler: add metadata output for solc > 0.4.6Steve Waldman2017-03-162-76/+56
| | | | | | | | | | | | | | Metadata is provided as JSON string, rather than as JSON object. This ensures that we can decode to a set of bytes that will be consistent with the swarm hash embedded in the code, without worrying about ambiguities of spacing, ordering, or escaping.
* | cmd/geth: add --config file flag (#13875)Felix Lange2017-04-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * p2p/discover, p2p/discv5: add marshaling methods to Node * p2p/netutil: make Netlist decodable from TOML * common/math: encode nil HexOrDecimal256 as 0x0 * cmd/geth: add --config file flag * cmd/geth: add missing license header * eth: prettify Config again, fix tests * eth: use gasprice.Config instead of duplicating its fields * eth/gasprice: hide nil default from dumpconfig output * cmd/geth: hide genesis block in dumpconfig output * node: make tests compile * console: fix tests * cmd/geth: make TOML keys look exactly like Go struct fields * p2p: use discovery by default This makes the zero Config slightly more useful. It also fixes package node tests because Node detects reuse of the datadir through the NodeDatabase. * cmd/geth: make ethstats URL settable through config file * cmd/faucet: fix configuration * cmd/geth: dedup attach tests * eth: add comment for DefaultConfig * eth: pass downloader.SyncMode in Config This removes the FastSync, LightSync flags in favour of a more general SyncMode flag. * cmd/utils: remove jitvm flags * cmd/utils: make mutually exclusive flag error prettier It now reads: Fatal: flags --dev, --testnet can't be used at the same time * p2p: fix typo * node: add DefaultConfig, use it for geth * mobile: add missing NoDiscovery option * cmd/utils: drop MakeNode This exposed a couple of places that needed to be updated to use node.DefaultConfig. * node: fix typo * eth: make fast sync the default mode * cmd/utils: remove IPCApiFlag (unused) * node: remove default IPC path Set it in the frontends instead. * cmd/geth: add --syncmode * cmd/utils: make --ipcdisable and --ipcpath mutually exclusive * cmd/utils: don't enable WS, HTTP when setting addr * cmd/utils: fix --identity
* | common: add UnprefixedHash, UnprefixedAddressFelix Lange2017-03-231-14/+30
| |
* | common/hexutil: add UnmarshalFixedUnprefixedTextFelix Lange2017-03-232-5/+62
| |
* | common/math: add HexOrDecimal64, HexOrDecimal256Felix Lange2017-03-234-12/+54
|/
* common/hexutil: ensure negative big.Int is encoded sensiblyFelix Lange2017-03-023-16/+5
| | | | Restricting encoding is silly.
* common/hexutil: implement TextMarshaler, TextUnmarshalerFelix Lange2017-03-026-84/+226
| | | | | | | | | | | | | This commit makes the wrapper types more generally applicable. encoding.TextMarshaler is supported by most codec implementations (e.g. for yaml). The tests now ensure that package json actually recognizes the custom marshaler implementation irrespective of how it is implemented. The Uint type has new tests, too. These are tricky because uint size depends on the CPU word size. Turns out that there was one incorrect case where decoding returned ErrUint64Range instead of ErrUintRange.
* common/hexutil: don't leak encoding/hex errors in DecodeFelix Lange2017-03-022-6/+9
| | | | | All other functions return errors from package hexutil, ensure that Decode does too.
* common/hexutil: reject big integer inputs > 256 bitsFelix Lange2017-03-024-3/+30
| | | | This follows the change to common/math big integer parsing in PR #3699.
* Merge pull request #3723 from karalabe/logger-updates-2Péter Szilágyi2017-02-281-2/+11
|\ | | | | Logger updates
| * all: next batch of log polishes to contextual versionsPéter Szilágyi2017-02-281-2/+11
| |
* | all: unify big.Int zero checks, use common/math in more places (#3716)Felix Lange2017-02-282-8/+48
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* common, eth/downloader, log: support terminal log formattingPéter Szilágyi2017-02-281-0/+18
|
* common: move big integer math to common/math (#3699)Felix Lange2017-02-2721-1346/+494
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* common/math: "optimised" SafeMul and added comment on Exp (#3675)Jeffrey Wilcke2017-02-182-2/+5
|
* params: core, core/vm, miner: 64bit gas instructionsJeffrey Wilcke2017-02-142-0/+75
| | | | | | | | | | | | | | | | | 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-132-75/+0
| | | | This reverts commit 8b57c494908637a5c0e74f8f7a13b3218e026757.
* params: core, core/vm, miner: 64bit gas instructions (#3514)Jeffrey Wilcke2017-02-022-0/+75
| | | | | | | | | | | | | | | | 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
* cmd,eth,les,internal: remove natspec supportBas van Kervel2017-01-171-2/+2
|
* common/hexutil: fix EncodeBig, Big.MarshalJSONFelix Lange2017-01-163-13/+4
| | | | | The code was too clever and failed to include zeros on a big.Word boundary.
* common/hexutil: allow empty strings when decoding JSON (#3559)Felix Lange2017-01-132-5/+5
|
* all: fix issues reported by honnef.co/go/simple/cmd/gosimpleFelix Lange2017-01-074-7/+7
|
* all: gofmt -w -sFelix Lange2017-01-062-19/+19
|
* common/compiler: remove workaround for solc 0.3.5 stdin bug (#3522)Felix Lange2017-01-062-36/+22
| | | | | | | | | The crash when compiling stdin was fixed in solc 0.3.6 (released 2016-08-10). While here, simplify the test so it runs with any solc version. Fixes #3484. The byte code was different for each run because recent solc embeds the swarm hash of contract metadata into the code. When compiling from stdin the name in the metadata is constant.
* common/hexutil: fix Test{Decode,Unmarshal}Uint64 on 32bit arch (#3363)Felix Lange2016-11-282-2/+2
|
* common: use package hexutil for fixed size type encodingFelix Lange2016-11-282-60/+30
|
* common/hexutil: new package for 0x hex encodingFelix Lange2016-11-284-0/+947
| | | | | The new package is purpose-built to handle the encoding consumed and produced by the RPC API.
* common/httpclient, les: removed httpclientJeffrey Wilcke2016-11-252-201/+0
|
* common/registrar: delete the old registrar codeFelix Lange2016-11-254-1036/+0
| | | | | | | The registrar was broken, unmaintained and there is a much better replacement: ENS. (cherry picked from commit 6ca8f57b08d550613175260cab7633adcacbe6ab)
* mobile: initial wrappers for mobile supportPéter Szilágyi2016-11-141-1/+4
|
* core/types: turn off nonce checking for Call messagesZsolt Felfoldi2016-11-141-1/+1
|
* core/types, params: EIP#155Jeffrey Wilcke2016-11-131-16/+12
|
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-3/+4
| | | | | | | | | | | | | | | 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-091-0/+16
|
* les: light client protocol and APIZsolt Felfoldi2016-11-091-0/+30
|
* common/math: go fmtKenji Siu2016-11-021-1/+1
|
* common/math, core/vm: implement fast EXP (#3214)Jeffrey Wilcke2016-11-021-0/+28
| | | | | | | * common/math, core/vm: implement fast EXP. Courtesy @chfast & @karalabe * common/math: fix go vet issues on exp calculation
* internal/ethapi: add personal_sign and fix eth_sign to hash message (#2940)bas-vk2016-10-292-2/+2
| | | | | | | | | | | | | | | | | | | | 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-294-4839/+0
| | | | | | | | | | | | | | | | | | | | | | | 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.
* common, core, eth/downloader: adjust import log formattingPéter Szilágyi2016-10-181-0/+40
|
* common, node: move datadir defaults into package nodeFelix Lange2016-09-162-75/+0
|
* common,internal: typo/misspelling fixes (#2953)gregg dourgarian2016-08-271-4/+4
|
* common/compiler: simplify solc wrapperFelix Lange2016-08-172-165/+132
| | | | | | | | | | | | | 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
* core: added CheckNonce() to Message interfacezsfelfoldi2016-07-111-1/+4
|
* cmd, common, console, eth, release: drop redundant "full"sPéter Szilágyi2016-06-301-2/+2
|
* eth: separate common and full node-specific API and backend servicezsfelfoldi2016-06-161-2/+2
|
* common/compiler: support relative path to solcRémy Roy2016-05-251-1/+0
|
* common: Add tests for Address#UnmarshalJSONPaulo L F Casaretto2016-04-262-3/+37
|
* all: fix go vet warningsFelix Lange2016-04-153-3/+3
|
* all: update license informationFelix Lange2016-04-153-3/+3
|
* accounts: improve API and add documentationFelix Lange2016-04-121-2/+1
| | | | | - Sign takes common.Address, not Account - Import/Export methods work with encrypted JSON keys
* accounts: streamline APIFelix Lange2016-04-121-3/+3
| | | | | | - Manager.Accounts no longer returns an error. - Manager methods take Account instead of common.Address. - All uses of Account with unkeyed fields are converted.
* Merge pull request #2404 from obscuren/common-hash-json-length-validationJeffrey Wilcke2016-04-012-0/+35
|\ | | | | common: added Hash unmarshal json length validation
| * common: added Hash unmarshal json length validationJeffrey Wilcke2016-04-012-0/+35
| |
* | core: added basic chain configurationJeffrey Wilcke2016-04-012-4/+32
|/ | | | | | | | | 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.
* core: Added EVM configuration optionsJeffrey Wilcke2016-03-241-1/+1
| | | | | The EVM is now initialised with an additional configured object that allows you to turn on debugging options.
* common/compiler: fix path problem with filepath.Glob on WindowsRémy Roy2016-03-081-1/+1
|
* common/natspec: Remove old unnused fileRicardo Catalinas Jiménez2016-02-221-253/+0
|
* common: Remove dead codeRicardo Catalinas Jiménez2016-02-222-36/+0
|
* common: Remove empty linesRicardo Catalinas Jiménez2016-02-221-2/+0
|
* all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}()Ricardo Catalinas Jiménez2016-02-228-11/+11
| | | | As we aren't really using the standarized SHA-3
* core, core/vm, crypto: fixes for homesteadJeffrey Wilcke2016-02-181-1/+4
| | | | | | * Removed some strange code that didn't apply state reverting properly * Refactored code setting from vm & state transition to the executioner * Updated tests
* cmd, common, node, rpc: rework naming convention to canonical onePéter Szilágyi2016-02-091-5/+5
|
* cmd, common, node, rpc: move HTTP RPC into node, drop singletone aspectPéter Szilágyi2016-02-052-22/+48
|
* cmd, common, node, rpc: move IPC into the node itselfPéter Szilágyi2016-02-041-5/+4
|
* rpc: migrated the RPC insterface to a new reflection based RPC layerBas van Kervel2016-01-265-48/+271
|
* common: Fix HomeDir detectionLefteris Karapetsas2016-01-081-5/+6
| | | | | | | | | | | | | | | | | | | I am working on porting geth to [Ubuntu Core](https://developer.ubuntu.com/en/snappy/https://developer.ubuntu.com/en/snappy/). I am testing geth on a Raspberry PI and for Ubuntu Core the $HOME directory is unique for each application. See [here](https://developer.ubuntu.com/en/snappy/guides/filesystem-layout) for more information of their filesystem layout. For some reason in Go `usr.HomeDir` returns a different value than `$HOME` in Ubuntu Core. Adding this at the end of `HomeDir()` ```go fmt.Printf("at HomeDir, user.HomeDir = %s and $HOME is %s\n", usr.HomeDir, os.Getenv("HOME")) ``` gives the following output ``` at HomeDir, user.HomeDir = /home/ubuntu and $HOME is /home/ubuntu/apps/geth.sideload/IJcODREBYbHO ``` With this commit, I propose giving precedence to the `$HOME` environment variable as is also suggested by the [homedir](https://github.com/mitchellh/go-homedir/blob/master/homedir.go) project.
* common: remove old RLP implementation, Value and ExtPackageFelix Lange2015-12-185-1121/+0
| | | | | In order to make this happen, kill all remaining trivial uses of common/{rlp,value}.go. The non-trivial ones have been updated earlier.
* rpc: new RPC implementation with pub/sub supportBas van Kervel2015-12-141-0/+49
|
* common: fix #2008, wrong hex prefix checkPéter Szilágyi2015-11-281-2/+2
|
* cmd, common, core, eth, node, rpc, tests, whisper, xeth: use protocol stacksPéter Szilágyi2015-11-272-14/+26
|
* cmd/utils, crypto: add --lightkdf flag for lighter KDFDrake Burroughs2015-10-292-2/+2
|
* rpc api: eth_getNatSpeczelig2015-10-275-80/+52
| | | | | | | | * xeth, rpc: implement eth_getNatSpec for tx confirmations * rename silly docserver -> httpclient * eth/backend: httpclient now accessible via eth.Ethereum init-d via config.DocRoot * cmd: introduce separate CLI flag for DocRoot (defaults to homedir) * common/path: delete unused assetpath func, separate HomeDir func
* console:zelig2015-10-224-71/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lines with leading space are ommitted from history * exit processed even with whitespace around * all whitespace lines (not only empty ones) are ignored add 7 missing commands to admin api autocomplete registrar: methods now return proper error if reg addresses are not set. fixes #1457 rpc/console: fix personal.newAccount() regression. Now all comms accept interactive password registrar: add registrar tests for errors crypto: catch AES decryption error on presale wallet import + fix error msg format. fixes #1580 CLI: improve error message when starting a second instance of geth. fixes #1564 cli/accounts: unlock multiple accounts. fixes #1785 * make unlocking multiple accounts work with inline <() fd * passwdfile now correctly read only once * improve logs * fix CLI help text for unlocking fix regression with docRoot / admin API * docRoot/jspath passed to rpc/api ParseApis, which passes onto adminApi * docRoot field for JS console in order to pass when RPC is (re)started * improve flag desc for jspath common/docserver: catch http errors from response fix rpc/api tests common/natspec: fix end to end test (skipped because takes 8s) registrar: fix major regression: * deploy registrars on frontier * register HashsReg and UrlHint in GlobalRegistrar. * set all 3 contract addresses in code * zero out addresses first in tests
* Merge pull request #1869 from Gustav-Simonsson/gpu_minerJeffrey Wilcke2015-10-161-1/+1
|\ | | | | all: Add GPU mining, disabled by default
| * all: Add GPU mining, disabled by defaultGustav Simonsson2015-10-071-1/+1
| |
* | common, crypto: add ICAP functionsGustav Simonsson2015-10-133-0/+284
|/
* common: fix #1818, secondary datadir paths to fall back toPéter Szilágyi2015-10-011-6/+16
|
* core, core/types: readd transactions after chain re-orgJeffrey Wilcke2015-09-221-1/+1
| | | | | | | | | | | | | | Added a `Difference` method to `types.Transactions` which sets the receiver to the difference of a to b (NOTE: not a **and** b). Transaction pool subscribes to RemovedTransactionEvent adding back to those potential missing from the chain. When a chain re-org occurs remove any transactions that were removed from the canonical chain during the re-org as well as the receipts that were generated in the process. Closes #1746
* Merge pull request #1793 from jeffallen/typoFelix Lange2015-09-181-18/+19
|\ | | | | common: Update README.md for the current package name
| * common: Update README.md for the current package nameJeff R. Allen2015-09-111-18/+19
| |
* | Merge pull request #1801 from fjl/ethdbJeffrey Wilcke2015-09-162-27/+1
|\ \ | | | | | | all: move common.Database to ethdb and add NewBatch
| * | all: move common.Database to package ethdbFelix Lange2015-09-152-27/+1
| |/
* | new solc api:zelig2015-09-152-14/+14
| | | | | | | | | | | | * use legacy version matcher * optimise just a boolean flag * skipf for messages in tests
* | Solidity Compiler - solc new APIzelig2015-09-122-23/+49
|/ | | | | | | | | | * adapt to new compiler versioning * use compiler version as language version * implement new solc API for versions >= 0.1.[2-9][0-9]* fixes #1770 * add optimize=1 to options * backward compatibility (for now) for <= 0.1.1, and old versions (0.[2-9][0-9]*.[0-9]+) * introduce compilerOptions to ContractInfo * clean up flair, include full version string to version line and ContractInfo
* common/compiler: fix #1598, expose solidity errorsPéter Szilágyi2015-08-261-58/+46
|
* common/compiler, common/docserver, jsre: fix tests on windowsFelix Lange2015-08-063-9/+16
|
* common: remove windows path functionsFelix Lange2015-08-063-64/+1
| | | | They were unused and their tests failed on Windows.
* common: remove config.goFelix Lange2015-07-241-83/+0
| | | | | The code in config.go is unused. The main reason for removing it is to get rid github.com/rakyll/goini in Godeps (it has no license).
* all: fix license headers one more timeFelix Lange2015-07-2438-38/+38
| | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
* all: update license headers to distiguish GPL/LGPLFelix Lange2015-07-2338-152/+152
| | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library".
* cmd, core, eth, common: genesis preparationJeffrey Wilcke2015-07-101-3/+5
| | | | | Implemented the --genesis flag thru which we can set a custom genesis block, including the official Ethereum genesis block.
* common/natspec: fixed testJeffrey Wilcke2015-07-071-1/+1
|
* all: goimports -wFelix Lange2015-07-071-1/+1
|
* all: add some godoc synopsis commentsFelix Lange2015-07-071-0/+1
|
* all: update license informationFelix Lange2015-07-0738-0/+608
|
* fix/skip tests, adapt registrar to no contract addresszelig2015-07-073-21/+27
| | | | registry initialisers now return the txhash which caller can use to retrieve receipt
* fix natspec testzelig2015-07-074-52/+98
| | | | | | * registar url string retrieval chop leading zeros now * rewrite test using test mining * remove temporary applyTxs from xeth
* fix js arguments and TestContract passeszelig2015-07-072-6/+267
|
* fix sleepBlocks, implement sleepzelig2015-07-071-1/+1
|
* Registrar and contractInfo handlingzelig2015-07-0712-354/+719
| | | | | | | | | | | | | | | | * resolver -> common/registrar * global registrar name registry interface * add Call to resolver backend interface * the hashReg and UrlHing contracts now initialised from global registry * initialization of contracts uniform * improve errors and more econsistent method names * common/registrar/ethreg: versioned registrar * integrate new naming and registrar in natspec * js console api: setGlobalRegistrar, setHashReg, setUrlHint * js test TestContract uses mining - tests fixed all pass * eth/backend: allow PoW test mode (small ethash DAG) * console jsre refers to resolver.abi/addr, * cmd/geth/contracts.go moved to common/registrar
* Change keystore to version 3Gustav Simonsson2015-06-241-0/+37
| | | | | | | | | | | | * Change password protection crypto in keystore to version 3 * Update KeyStoreTests/basic_tests.json * Add support for PBKDF2 with HMAC-SHA256 * Change MAC and encryption key to avoid unnecessary hashing * Add tests for test vectors in new wiki page defining version 3 * Add tests for new keystore tests in ethereum/tests repo * Move JSON loading util to common for use in both tests and crypto packages * Add backwards compatibility with key store version 1
* core, ethdb, trie: validate database errorsobscuren2015-06-211-1/+1
|
* core/state, core/vm: reworked storage get / set to use common.Hashobscuren2015-06-171-0/+4
|
* core: reduce max allowed queued txs per addressobscuren2015-06-151-0/+11
| | | | | Transactions in the queue are now capped to a maximum of 200 transactions. This number is completely arbitrary.
* fixed windows ipc path issueBas van Kervel2015-06-121-0/+3
|
* added API/IPC commandline flagsBas van Kervel2015-06-111-0/+4
|
* skip sol on new compilerobscuren2015-06-091-2/+2
|
* skipped failing natspec testsobscuren2015-06-041-1/+1
|
* cmd/geth, common/natspec: updating tests (still failing?)obscuren2015-06-041-1/+1
|
* types: block json unmarshal method addedobscuren2015-06-041-4/+4
|
* common, ethdb: removed caching and LastTDobscuren2015-05-281-1/+0
|
* compile solidity contracts with std libraryMarek Kotewicz2015-05-251-0/+2
|
* multiple contract source for solidity compiler: returns contract array if ↵zelig2015-05-202-58/+65
| | | | multiple contracts. fixes #1023
* remove solc flairzelig2015-05-201-1/+2
|
* fix solc tests unskipzelig2015-05-202-14/+18
|
* xeth: set balance max balance to from in call. Closes #951obscuren2015-05-161-0/+1
|
* Change default keystore dirGustav Simonsson2015-05-131-2/+2
|
* Fix natspec test (again x2) typesGustav Simonsson2015-05-121-1/+2
|
* Fix natspec e2e test accounts type (again)Gustav Simonsson2015-05-121-1/+1
|
* Merge pull request #933 from bas-vk/issue928Jeffrey Wilcke2015-05-122-16/+14
|\ | | | | replaced path with platform aware filepath module
| * replaced several path.* with filepath.* which is platform independentBas van Kervel2015-05-122-16/+14
| |
* | sol: skipped source checking stepobscuren2015-05-121-3/+5
|/
* compiler, cli/js: fix solidity compiler tests failing when a different ↵zelig2015-05-122-3/+9
| | | | version of solc installed
* core, eth, miner: improved tx removal & fatal error on db sync errobscuren2015-05-112-20/+0
| | | | | | | | * core: Added GasPriceChange event * eth: When one of the DB flush methods error a fatal error log message is given. Hopefully this will prevent corrupted databases from occuring. * miner: remove transactions with low gas price. Closes #906, #903
* solidity compiler and contract metadocs integrationzelig2015-05-077-369/+641
| | | | | | | | | | | | | * common/compiler: solidity compiler + tests * rpc: eth_compilers, eth_compileSolidity + tests * fix natspec test using keystore API, notice exp dynamically changes addr, cleanup * resolver implements registrars and needs to create reg contract (temp) * xeth: solidity compiler. expose getter Solc() and paths setter SetSolc(solcPath) * ethereumApi: implement compiler related RPC calls using XEth - json struct tests * admin: make use of XEth.SetSolc to allow runtime setting of compiler paths * cli: command line flags solc to set custom solc bin path * js admin api with new features debug and contractInfo modules * wiki is the doc https://github.com/ethereum/go-ethereum/wiki/Contracts-and-Transactions
* Merge pull request #791 from fjl/discover-sha3-distanceJeffrey Wilcke2015-05-071-1/+14
|\ | | | | p2p/discover: sha3-based node distance
| * common: add Hash.GenerateFelix Lange2015-04-301-1/+14
| |
* | xeth, rpc: added nonce setting through RPC and xeth transactobscuren2015-05-071-2/+2
|/
* Remove path separator literalsTaylor Gerring2015-04-291-6/+7
|
* natspec: disabled natspec testobscuren2015-04-241-0/+1
|
* Moved leveldb update loop to eth/backendBas van Kervel2015-04-231-0/+1
| | | | | | change order of block insert and update LastBlock bugfix, wrong hash stored in blockDb
* natspec: fixed test to work with new queued transactionsobscuren2015-04-231-1/+1
|
* common: delete BinaryLengthFelix Lange2015-04-222-25/+0
| | | | | The test is failing the 32bit build and the function is not used anywhere.
* contract addresses include hex prefixzelig2015-04-204-37/+38
| | | | | | | | - simplify resolver and tests - added missing test for KeyToUrl - fix notice error message and its test with !%x(MISSING) - natspec test: insertTx modified - does not prepend 0x to contract address - disable networking in e2e test
* fix end to end test import cyclezelig2015-04-201-3/+1
|
* fixed resolver testzsfelfoldi2015-04-201-2/+6
|
* URLhint support for URLs longer than 32 byteszsfelfoldi2015-04-203-22/+70
|
* added missing source filezsfelfoldi2015-04-201-0/+36
|
* test account is no longer permanently in genesis block, only put there when ↵zsfelfoldi2015-04-201-4/+13
| | | | testing
* NatSpec contracts are now not in the genesis block but added by the testzsfelfoldi2015-04-202-20/+45
|
* utils linked to natspec notice eval, test notice now using utils.toHex()zsfelfoldi2015-04-203-8/+4048
|
* NatSpec cli option, resolver tests passingzsfelfoldi2015-04-202-8/+10
|
* default fallback NatSpec messageszsfelfoldi2015-04-202-14/+49
|
* natspec test bugfixzsfelfoldi2015-04-201-15/+12
|
* NatSpec passing end to end testzsfelfoldi2015-04-204-49/+196
|
* szsfelfoldi2015-04-203-51/+79
|
* NatSpec contracts in genesis block, end to end test (unfinished)zsfelfoldi2015-04-206-58/+174
|
* resolver testszelig2015-04-204-20/+81
| | | | | | - add resolver tests and fix resolver to pass - statereg constructor fixed - comments added to natspec plus docserver integration for natspec userdoc fetching
* reorg:zelig2015-04-205-116/+66
| | | | | - statereg methods move to natspec/resolver/docserver - fix failing test on invalid js input
* add docserver using net/http Transport/Roundtripzelig2015-04-202-0/+131
|
* NatSpec, URL register storage retrievalzsfelfoldi2015-04-203-27/+200
| | | | fixed 2/3 tests
* add common/resolver skeletonzelig2015-04-202-0/+62
|
* new natspeczelig2015-04-202-51/+186
| | | | | | | - constructor takes abidoc, userdoc - json parsing of userdoc - method found by abi data - notice found from method
* common: Added debug reporterobscuren2015-04-151-0/+20
| | | | | | | NOTE: For known, non-consensus, hard to reproduce bugs consider the following method `common.Report("extra", stuff, "you need logged")` will give you a stack trace and a friendly request to submit it as an issue on our issue tracker.
* Queued level db writes and batch writes. Closes #647obscuren2015-04-081-2/+0
|
* Detect non-valid strings for blockheightTaylor Gerring2015-04-021-0/+5
|
* Fix block size output #613Taylor Gerring2015-04-011-0/+4
|
* common: remove WriteFile and ReadAllFile (use ioutil instead)zelig2015-03-272-76/+1
|
* natspec: minor fix in testzelig2015-03-241-2/+2
|
* Merge pull request #547 from tgerring/commoncleanupJeffrey Wilcke2015-03-239-265/+250
|\ | | | | common/common.go cleanup
| * Remove common.goTaylor Gerring2015-03-221-12/+0
| |
| * Move Big* vars to big.goTaylor Gerring2015-03-222-14/+13
| |
| * Move MakeName to pathTaylor Gerring2015-03-222-8/+8
| |
| * Move OS-specific funcs to path.goTaylor Gerring2015-03-224-98/+91
| |
| * Move CurrencyToString to sizeTaylor Gerring2015-03-224-91/+95
| |
| * Move ToHex/FromHex into bytesTaylor Gerring2015-03-224-42/+43
| |
* | Merge pull request #536 from zsfelfoldi/developJeffrey Wilcke2015-03-231-1/+1
|\ \ | |/ |/| using robertkrimen/otto, godeps updated
| * using robertkrimen/otto, godeps updatedzsfelfoldi2015-03-201-1/+1
| |
* | Merge remote-tracking branch 'ethereum/conversion' into conversionFelix Lange2015-03-202-11/+4
|\ \
| * | copy over loopobscuren2015-03-201-9/+2
| | |
| * | Removed more castsobscuren2015-03-201-2/+2
| | |
* | | common: drop accessors for Value.ValFelix Lange2015-03-203-10/+2
| | | | | | | | | | | | I don't see why we would need two different accessors for a public field.
* | | common: drop unused kind field from ValueFelix Lange2015-03-201-5/+1
| | | | | | | | | | | | This makes Value 24 bytes smaller on 64bit systems.
* | | common: make Value encodable with package rlpFelix Lange2015-03-202-28/+55
|/ / | | | | | | | | Value.{Encode,Decode} are gone. It implements rlp.Encoder and rlp.Decoder instead, so Value can be decoded into directly.
* | mergeobscuren2015-03-191-0/+9
|\|
| * DRY up the use of toHex in the project and move it to commonMaran2015-03-161-0/+9
| |
* | prep template for fixed size hashesobscuren2015-03-181-0/+48
| |
* | Added Hex methodsobscuren2015-03-181-0/+2
| |
* | Fixed VM & Tests w/ conversionobscuren2015-03-171-0/+15
| |
* | Merge branch 'develop' into conversionobscuren2015-03-171-7/+2
|\| | | | | | | | | Conflicts: common/types.go
| * tmpobscuren2015-03-161-2/+2
| |
* | updated blockpoolobscuren2015-03-171-0/+3
| |
* | converted vmobscuren2015-03-171-18/+27
| |
* | conversion stateobscuren2015-03-171-3/+5
| |
* | Getters shouldn't need to be pointer receiverobscuren2015-03-161-8/+7
| |
* | compilable trie (tests fail)obscuren2015-03-161-5/+5
| |
* | Added functions to Hash & Addressobscuren2015-03-161-1/+37
| | | | | | | | | | * Set, SetString, SetBytes * StringTo*, BytesTo*
* | Added ToString methodsobscuren2015-03-161-3/+6
| |
* | new type + additional methodsobscuren2015-03-162-1/+37
|/
* Moved ethutil => commonobscuren2015-03-1630-0/+2972