aboutsummaryrefslogtreecommitdiffstats
path: root/accounts
Commit message (Collapse)AuthorAgeFilesLines
* accounts/abi: allow abi: tags when unpacking structsGuillaume Ballet2018-05-143-35/+194
| | | | | | Go code users can now tag event struct members with `abi:` to specify in what fields the event will be de-serialized. See PR #16648 for details.
* all: get rid of error when creating memory database (#16716)gary rong2018-05-091-1/+1
| | | | | | | | * all: get rid of error when create mdb * core: clean up variables definition * all: inline mdb definition
* core/rawdb: separate raw database access to own package (#16666)Péter Szilágyi2018-05-071-3/+12
|
* accounts: changed if-else blocks to conform with golint (#16654)GagziW2018-05-032-4/+2
|
* accounts: golint updates for this or self warning (#16627)kiel barry2018-05-021-4/+4
|
* build: enable goimports and varcheck linters (#16446)thomasmodeneis2018-04-181-2/+0
|
* cmd/clef, signer: initial poc of the standalone signer (#16154)Martin Holst Swende2018-04-163-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* accounts/abi: improve test coverage (#16044)Ricardo Domingos2018-04-045-62/+82
|
* Merge pull request #16256 from epiclabs-io/unpack_one_arg_eventMartin Holst Swende2018-03-213-19/+62
|\ | | | | Fix issue unmarshaling single parameter events from abigen generated go code #16208
| * accounts/abi: Modified unpackAtomic to accept struct lvaluesJavier Peletier2018-03-053-19/+49
| |
| * accounts/abi: Add one-parameter event test case from ↵Javier Peletier2018-03-059-139/+435
| |\ | | | | | | | | | enriquefynn/unpack_one_arg_event
| * | accounts/abi: use unpackTuple to unpack event argumentsFynn2018-02-162-2/+15
| | | | | | | | | | | | Events with just 1 argument fail before this change
* | | Merge pull request #15990 from markya0616/sim_backend_block_hashMartin Holst Swende2018-03-191-2/+2
|\ \ \ | | | | | | | | accounts/abi, core: add AddTxWithChain in BlockGen for simulation
| * | | accounts/abi, core: add AddTxWithChain in BlockGen for simulationmark.lin2018-01-291-2/+2
| | | |
* | | | accounts/abi: normalize method name to a camel-case string (#15976)Mark2018-03-072-10/+45
| |_|/ |/| |
* | | accounts/abi: Abi binding support for nested arrays, fixes #15648, including ↵protolambda2018-03-056-79/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nested array unpack fix (#15676) * accounts/abi/bind: support for multi-dim arrays Also: - reduce usage of regexes a bit. - fix minor Java syntax problems Fixes #15648 * accounts/abi/bind: Add some more documentation * accounts/abi/bind: Improve code readability * accounts/abi: bugfix for unpacking nested arrays The code previously assumed the arrays/slices were always 1 level deep. While the packing supports nested arrays (!!!). The current code for unpacking doesn't return the "consumed" length, so this fix had to work around that by calculating it (i.e. packing and getting resulting length) after the unpacking of the array element. It's far from ideal, but unpacking behaviour is fixed now. * accounts/abi: Fix unpacking of nested arrays Removed the temporary workaround of packing to calculate size, which was incorrect for slice-like types anyway. Full size of nested arrays is used now. * accounts/abi: deeply nested array unpack test Test unpacking of an array nested more than one level. * accounts/abi: Add deeply nested array pack test Same as the deep nested array unpack test, but the other way around. * accounts/abi/bind: deeply nested arrays bind test Test the usage of bindings that were generated for methods with multi-dimensional (and not just a single extra dimension, like foo[2][3]) array arguments and returns. edit: trigger rebuild, CI failed to fetch linter module. * accounts/abi/bind: improve array binding wrapArray uses a regex now, and arrayBindingJava is improved. * accounts/abi: Improve naming of element size func The full step size for unpacking an array is now retrieved with "getFullElemSize". * accounts/abi: support nested nested array args Previously, the code only considered the outer-size of the array, ignoring the size of the contents. This was fine for most types, but nested arrays are packed directly into it, and count towards the total size. This resulted in arguments following a nested array to replicate some of the binary contents of the array. The fix: for arrays, calculate their complete contents size: count the arg.Type.Elem.Size when Elem is an Array, and repeat when their child is an array too, etc. The count is the number of 32 byte elements, similar to how it previously counted, but nested. * accounts/abi: Test deep nested arr multi-arguments Arguments with a deeply nested array should not cause the next arguments to be read from the wrong position.
* | | eth, les, light: filter on logs only, derive receipts on demandPéter Szilágyi2018-02-231-0/+13
| | |
* | | abi: fix missing method on go 1.7/1.8Martin Holst Swende2018-02-211-13/+23
| | |
* | | accounts/abi: harden unpacking against malicious inputMartin Holst Swende2018-02-212-4/+83
| | |
* | | accounts/abi: address review concernsMartin Holst Swende2018-02-214-352/+5
| | |
* | | accounts/abi: Deduplicate code in unpackerMartin Holst Swende2018-02-214-53/+33
| | |
* | | accounts/abi: add another unpack interfaceMartin Holst Swende2018-02-215-14/+395
| |/ |/|
* | all: update license information (#16089)Felix Lange2018-02-143-3/+3
| |
* | core, trie: intermediate mempool between trie and database (#15857)Péter Szilágyi2018-02-061-4/+10
| | | | | | This commit reduces database I/O by not writing every state trie to disk.
* | accounts: fix comment typo (#15977)Miguel Mota2018-01-261-1/+1
| |
* | accounts/abi/bind: support event filtering in abigenPéter Szilágyi2018-01-249-34/+914
|/
* all: update generated code (#15808)Felix Lange2018-01-083-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-036-22/+21
|
* various: remove redundant parentheses (#15793)Furkan KAMACI2018-01-031-1/+1
|
* accounts/abi: handle named ouputs prefixed with underscores (#15766)Péter Szilágyi2017-12-304-4/+153
| | | | | | | | * accounts/abi: handle named ouputs prefixed with underscores * accounts/abi: handle collinding outputs for struct unpacks * accounts: handle purely underscore output names
* Merge pull request #15731 from holiman/revamp_abiMartin Holst Swende2017-12-2311-379/+666
|\ | | | | accounts/abi refactor
| * accounts/abi: merging of https://github.com/ethereum/go-ethereum/pull/15452 ↵Martin Holst Swende2017-12-235-47/+128
| | | | | | | | + lookup by id
| * acounts/abi: refactor abi, generalize abi pack/unpack to ArgumentsMartin Holst Swende2017-12-237-251/+260
| |
| * accounts/abi: add unpack into array testRobert Zaremba2017-12-213-2/+17
| |
| * accounts/abi: add Method Unpack testsRobert Zaremba2017-12-211-36/+59
| | | | | | | | | | + Reworked Method Unpack tests into more readable components + Added Method Unpack into slice test
| * accounts/abi: satisfy most of the linter warningsRobert Zaremba2017-12-217-95/+87
| | | | | | | | | | | | | | + adding missing comments + small cleanups which won't significantly change function body. + unify Method receiver name
| * accounts/abi: fix event unpack into sliceRobert Zaremba2017-12-215-23/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | + The event slice unpacker doesn't correctly extract element from the slice. The indexed arguments are not ignored as they should be (the data offset should not include the indexed arguments). + The `Elem()` call in the slice unpack doesn't work. The Slice related tests fails because of that. + the check in the loop are suboptimal and have been extracted out of the loop. + extracted common code from event and method tupleUnpack
| * accounts/abi: fix event tupleUnpackRobert Zaremba2017-12-211-7/+7
| | | | | | | | | | Event.tupleUnpack doesn't handle correctly Indexed arguments, hence it can't unpack an event with indexed arguments.
| * accounts/abi: adding event unpacker testsRobert Zaremba2017-12-211-0/+154
| |
* | accounts, consensus, core, eth: make chain maker consensus agnostic (#15497)gary rong2017-12-221-3/+3
|/ | | | | | | | | | * accounts, consensus, core, eth: make chain maker consensus agnostic * consensus, core: move CalcDifficulty to Engine interface * consensus: add docs for calcDifficulty function * consensus, core: minor comment fixups
* Merge pull request #15285 from yondonfu/abi-offset-fixed-arraysMartin Holst Swende2017-12-212-1/+194
|\ | | | | accounts/abi: include fixed array size in offset for dynamic type
| * accounts/abi: update array type check in method.go. Add more packing testsYondon Fu2017-12-192-6/+138
| |
| * Merge branch 'master' into abi-offset-fixed-arraysYondon Fu2017-12-1923-958/+1086
| |\
| * | accounts/abi: include fixed array size in offset for dynamic typeYondon Fu2017-10-122-1/+62
| | |
* | | accounts/abi: remove check for len%32==0 when unpacking events (#15670)Bob Glickstein2017-12-213-13/+47
| | | | | | | | | | | | | | | | | | This change inlines the logic of bytesAreProper at its sole callsite, ABI.Unpack, and applies the multiple-of-32 test only in the case of unpacking methods. Event data is not required to be a multiple of 32 bytes long.
* | | accounts/abi: update array length after parsing array (#15618)Dmitry Shulyak2017-12-204-26/+78
| |/ |/| | | Fixes #15617
* | accounts/keystore: Improved error messageArmin2017-12-181-0/+3
| | | | | | | | * Fix for #15668
* | all: use gometalinter.v2, fix new gosimple issues (#15650)Zach2017-12-132-3/+3
| |
* | Merge pull request #15498 from nonsense/account_cache_modtime_test_fixPéter Szilágyi2017-11-241-1/+11
|\ \ | | | | | | accounts/keystore: change modtime for test case files to be bigger than 1sec.
| * | accounts/keystore: comments above time.SleepAnton Evangelatov2017-11-161-0/+3
| | |
| * | accounts/keystore: change modtime for test cases to be bigger than 1sec.Anton Evangelatov2017-11-161-1/+8
| | |
* | | cmd/geth: make geth account new faster with many keys (#15529)Martin Holst Swende2017-11-211-0/+7
| | |
* | | accounts/keystore: Ignore initial trigger of rescan-eventMartin Holst Swende2017-11-201-1/+5
| | |
* | | accounts/keystore: lock file cache during scan, minor polishPéter Szilágyi2017-11-202-91/+124
| | |
* | | accounts: list, then subscribe (sub requires active reader)Péter Szilágyi2017-11-201-5/+5
|/ /
* | accounts, internal: fail if no suitable estimated gas found (#15477)gary rong2017-11-151-11/+26
| | | | | | | | | | | | * accounts, internal: return an error if no suitable estimated gas found * accounts, internal: minor polishes on the gas estimator
* | build: enable unconvert linter (#15456)ferhat elmas2017-11-111-1/+1
| | | | | | | | | | | | | | | | | | * build: enable unconvert linter - fixes #15453 - update code base for failing cases * cmd/puppeth: replace syscall.Stdin with os.Stdin.Fd() for unconvert linter
* | all: gofmt -w -s (#15419)ferhat elmas2017-11-082-2/+2
| |
* | cmd, consensus, core, miner: instatx clique for --dev (#15323)Péter Szilágyi2017-10-241-1/+1
| | | | | | | | | | | | | | | | * cmd, consensus, core, miner: instatx clique for --dev * cmd, consensus, clique: support configurable --dev block times * cmd, core: allow --dev to use persistent storage too
* | accounts/abi: improve type handling, add event support (#14743)RJ Catalano2017-10-1715-847/+903
|/
* accounts/keystore: scan key directory without locks held (#15171)Martin Holst Swende2017-10-094-102/+297
| | | | | | The accountCache contains a file cache, and remembers from scan to scan what files were present earlier. Thus, whenever there's a change, the scan phase only bothers processing new and removed files.
* accounts/usbwallet: handle bad interface number on macOSPéter Szilágyi2017-10-031-4/+8
|
* internal, accounts, eth: utilize vm failed flag to help gas estimationrjl4934564422017-10-021-11/+13
|
* accounts/abi/backends: add AdjustTime (#15077)Dave Appleton2017-09-151-0/+17
|
* accounts/abi/bind: pass non-empty directory when calling goimports (#15070)nkbai2017-09-082-2/+2
|
* core: implement Metropolis EIP 658, receipt status byterjl4934564422017-08-221-1/+2
|
* core, light: send chain events using event.Feed (#14865)Miya Chen2017-08-181-2/+1
|
* accounts: refactor API for generalized USB walletsPéter Szilágyi2017-08-0911-1960/+1436
|
* accounts, console, internal: support trezor hardware walletPéter Szilágyi2017-08-0915-29/+6662
|
* accounts: fix megacheck warnings (#14903)Egon Elbre2017-08-073-15/+6
| | | | | | * accounts: fix megacheck warnings * accounts: don't modify abi in favor of full cleanup
* cmd/abigen: update generated go file header text (#14845)Leo Shklovskii2017-07-241-2/+2
| | | | As per https://golang.org/s/generatedcode. This will allow other tools such as golint to properly ignore the files.
* core: remove redundant storage of transactions and receipts (#14801)Péter Szilágyi2017-07-151-1/+2
| | | | | | | | | | | | | | * core: remove redundant storage of transactions and receipts * core, eth, internal: new transaction schema usage polishes * eth: implement upgrade mechanism for db deduplication * core, eth: drop old sequential key db upgrader * eth: close last iterator on successful db upgrage * core: prefix the lookup entries to make their purpose clearer
* tests: update tests and implement general state tests (#14734)Felix Lange2017-07-111-4/+17
| | | | | | | | | | | | | | Tests are now included as a submodule. This should make updating easier and removes ~60MB of JSON data from the working copy. State tests are replaced by General State Tests, which run the same test with multiple fork configurations. With the new test runner, consensus tests are run as subtests by walking json files. Many hex issues have been fixed upstream since the last update and most custom parsing code is replaced by existing JSON hex types. Tests can now be marked as 'expected failures', ensuring that fixes for those tests will trigger an update to test configuration. The new test runner also supports parallel execution and the -short flag.
* core/state: access trie through Database interface, track errors (#14589)Felix Lange2017-06-271-2/+2
| | | | | | | | | With this commit, core/state's access to the underlying key/value database is mediated through an interface. Database errors are tracked in StateDB and returned by CommitTo or the new Error method. Motivation for this change: We can remove the light client's duplicated copy of core/state. The light client now supports node iteration, so tracing and storage enumeration can work with the light client (not implemented in this commit).
* accounts/abi: reorganizing package with small fixes (#14610)RJ Catalano2017-06-2713-1085/+1487
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * accounts/abi: reorganizing package and some notes and a quick correction of name. Signed-off-by: RJ Catalano <rj@monax.io> get rid of some imports Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: move file names Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: fix boolean decode function Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: fix for the array set and for creating a bool Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: be very very very correct Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: fix up error message and variable names Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: take out unnecessary argument in pack method Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: add bool unpack test and add a panic to readBool function Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: fix panic message Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: change from panic to basic error Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: fix nil to false Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: fill out type regex tests and fill with the correct type for integers Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: move packNumbers into pack.go. Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: separation of the testing suite into appropriately named files. Signed-off-by: RJ Catalano <rj@monax.io> * account/abi: change to hex string tests. Signed-off-by: RJ Catalano <rj@monax.io> * account/abi: fix up rest of tests to hex Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: declare bool at the package level Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: use errors package in the error file. Signed-off-by: RJ Catalano <rj@monax.io> * accounts/abi: fix ugly hack and fix error type declaration. Signed-off-by: RJ Catalano <rj@monax.io>
* accounts: fix spelling error (#14567)FaceHo2017-06-061-1/+1
|
* accounts/keystore, crypto: don't enforce key checks on existing keyfilesPéter Szilágyi2017-06-012-8/+4
|
* accounts/keystore, crypto: enforce 256 bit keys on importPéter Szilágyi2017-05-235-7/+11
|
* all: update license informationFelix Lange2017-04-144-4/+4
|
* consensus, core, ethstats: use engine specific block beneficiary (#14318)Péter Szilágyi2017-04-121-1/+1
| | | | | | * consensus, core, ethstats: use engine specific block beneficiary * core, eth, les, miner: use explicit beneficiary during mining
* core, consensus: pluggable consensus engines (#3817)Péter Szilágyi2017-04-051-2/+2
| | | | | This commit adds pluggable consensus engines to go-ethereum. In short, it introduces a generic consensus interface, and refactors the entire codebase to use this interface.
* Merge pull request #3801 from karalabe/ledger-linux-confirmPéter Szilágyi2017-03-282-13/+49
|\ | | | | accounts/usbwallet: fix Ledger hidapi/libusb protocol violation
| * accounts/usbwallet: if a confirmation is pending, skip refreshPéter Szilágyi2017-03-232-3/+16
| |
| * accounts/usbwallet: fix Ledger hidapi/libusb protocol violationPéter Szilágyi2017-03-232-13/+36
| |
* | core: refactor genesis handlingFelix Lange2017-03-233-22/+19
|/ | | | | | | | | | | | | | | | | | | | | | | | This commit solves several issues concerning the genesis block: * Genesis/ChainConfig loading was handled by cmd/geth code. This left library users in the cold. They could specify a JSON-encoded string and overwrite the config, but didn't get any of the additional checks performed by geth. * Decoding and writing of genesis JSON was conflated in WriteGenesisBlock. This made it a lot harder to embed the genesis block into the forthcoming config file loader. This commit changes things so there is a single Genesis type that represents genesis blocks. All uses of Write*Genesis* are changed to use the new type instead. * If the chain config supplied by the user was incompatible with the current chain (i.e. the chain had already advanced beyond a scheduled fork), it got overwritten. This is not an issue in practice because previous forks have always had the highest total difficulty. It might matter in the future though. The new code reverts the local chain to the point of the fork when upgrading configuration. The change to genesis block data removes compression library dependencies from package core.
* all: import "context" instead of "golang.org/x/net/context"Felix Lange2017-03-236-6/+6
| | | | | | | | | | There is no need to depend on the old context package now that the minimum Go version is 1.7. The move to "context" eliminates our weird vendoring setup. Some vendored code still uses golang.org/x/net/context and it is now vendored in the normal way. This change triggered new vet checks around context.WithTimeout which didn't fire with golang.org/x/net/context.
* accounts/abi/bind: allow client to specify sender address for call (#3782)bas-vk2017-03-162-2/+42
|
* all: swap out the C++ ethash to the pure Go one (mining todo)Péter Szilágyi2017-03-091-1/+2
|
* Logger updates 3 (#3730)Péter Szilágyi2017-03-021-0/+9
| | | | | | | | * accounts, cmd, eth, ethdb: port logs over to new system * ethdb: drop concept of cache distribution between dbs * eth: fix some log nitpicks to make them nicer
* Merge pull request #3723 from karalabe/logger-updates-2Péter Szilágyi2017-02-284-16/+16
|\ | | | | Logger updates
| * all: next batch of log polishes to contextual versionsPéter Szilágyi2017-02-284-16/+16
| |
* | all: unify big.Int zero checks, use common/math in more places (#3716)Felix Lange2017-02-285-7/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/math: optimize PaddedBigBytes, use it more name old time/op new time/op delta PaddedBigBytes-8 71.1ns ± 5% 46.1ns ± 1% -35.15% (p=0.000 n=20+19) name old alloc/op new alloc/op delta PaddedBigBytes-8 48.0B ± 0% 32.0B ± 0% -33.33% (p=0.000 n=20+20) * all: unify big.Int zero checks Various checks were in use. This commit replaces them all with Int.Sign, which is cheaper and less code. eg templates: func before(x *big.Int) bool { return x.BitLen() == 0 } func after(x *big.Int) bool { return x.Sign() == 0 } func before(x *big.Int) bool { return x.BitLen() > 0 } func after(x *big.Int) bool { return x.Sign() != 0 } func before(x *big.Int) int { return x.Cmp(common.Big0) } func after(x *big.Int) int { return x.Sign() } * common/math, crypto/secp256k1: make ReadBits public in package math
* accounts, eth/downloader: use "err" instead of "error" in logsPéter Szilágyi2017-02-274-10/+10
|
* common: move big integer math to common/math (#3699)Felix Lange2017-02-273-57/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common: remove CurrencyToString Move denomination values to params instead. * common: delete dead code * common: move big integer operations to common/math This commit consolidates all big integer operations into common/math and adds tests and documentation. There should be no change in semantics for BigPow, BigMin, BigMax, S256, U256, Exp and their behaviour is now locked in by tests. The BigD, BytesToBig and Bytes2Big functions don't provide additional value, all uses are replaced by new(big.Int).SetBytes(). BigToBytes is now called PaddedBigBytes, its minimum output size parameter is now specified as the number of bytes instead of bits. The single use of this function is in the EVM's MSTORE instruction. Big and String2Big are replaced by ParseBig, which is slightly stricter. It previously accepted leading zeros for hexadecimal inputs but treated decimal inputs as octal if a leading zero digit was present. ParseUint64 is used in places where String2Big was used to decode a uint64. The new functions MustParseBig and MustParseUint64 are now used in many places where parsing errors were previously ignored. * common: delete unused big integer variables * accounts/abi: replace uses of BytesToBig with use of encoding/binary * common: remove BytesToBig * common: remove Bytes2Big * common: remove BigTrue * cmd/utils: add BigFlag and use it for error-checked integer flags While here, remove environment variable processing for DirectoryFlag because we don't use it. * core: add missing error checks in genesis block parser * common: remove String2Big * cmd/evm: use utils.BigFlag * common/math: check for 256 bit overflow in ParseBig This is supposed to prevent silent overflow/truncation of values in the genesis block JSON. Without this check, a genesis block that set a balance larger than 256 bits would lead to weird behaviour in the VM. * cmd/utils: fixup import
* accounts, cmd: port packages over to the new logging systemPéter Szilágyi2017-02-235-29/+36
|
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-234-36/+30
|
* Merge pull request #3681 from karalabe/usb-hidapiNick Johnson2017-02-204-150/+38
|\ | | | | accounts/usbwallet: swap karalabe/gousb to karalabe/hid
| * accounts/usbwallet, vendor: use hidapi instead of libusb directlyPéter Szilágyi2017-02-174-150/+38
| |
* | crypto: add btcec fallback for sign/recover without cgo (#3680)Felix Lange2017-02-181-3/+2
|/ | | | | | | | | | | * vendor: add github.com/btcsuite/btcd/btcec * crypto: add btcec fallback for sign/recover without cgo This commit adds a non-cgo fallback implementation of secp256k1 operations. * crypto, core/vm: remove wrappers for sha256, ripemd160
* accounts: ledger and HD review fixesPéter Szilágyi2017-02-134-59/+37
| | | | | | | | | - Handle a data race where a Ledger drops between list and open - Prolong Ledger tx confirmation window to 30 days from 1 minute - Simplify Ledger chainid-signature calculation and validation - Simplify Ledger USB APDU request chunking algorithm - Silence keystore account cache notifications for manual actions - Only enable self derivations if wallet open succeeds
* accounts/usbwallet: detect and report in Ledger is in browser modePéter Szilágyi2017-02-131-4/+17
|
* accounts/usbwallet: make wallet responsive while Ledger is busyPéter Szilágyi2017-02-131-151/+309
|
* accounts/usbwallet: Ledger teardown on health-check failurePéter Szilágyi2017-02-132-8/+33
|
* accounts, cmd, internal, node: implement HD wallet self-derivationPéter Szilágyi2017-02-136-115/+347
|
* accounts, cmd, internal, mobile, node: canonical account URLsPéter Szilágyi2017-02-1313-93/+174
|
* accounts, cmd, eth, internal, miner, node: wallets and HD APIsPéter Szilágyi2017-02-1313-565/+1339
|
* accounts/usbwallet: two phase Ledger refreshes to avoid Windows bugPéter Szilágyi2017-02-131-25/+24
|
* accounts/usbwallet: support Ledger app version <1.0.2Péter Szilágyi2017-02-131-1/+5
|
* accounts/usbwallet: skip support on iOS altogetherPéter Szilágyi2017-02-134-0/+44
|
* accounts/usbwallet: initial support for Ledger walletsPéter Szilágyi2017-02-133-0/+750
|
* accounts, cmd, eth, internal, mobile, node: split account backendsPéter Szilágyi2017-02-1334-526/+851
|
* accounts/abi, internal/jsre/deps: gofmt -w -s (#3636)Diego Siqueira2017-02-031-2/+2
| | | Signed-off-by: DiSiqueira <dieg0@live.com>
* accounts/abi/bind, internal/ethapi: binary search gas estimation (#3587)Péter Szilágyi2017-01-212-7/+72
| | | | | | | | | | | | | Gas estimation currently mostly works, but can underestimate for more funky refunds. This is because various ops (e.g. CALL) need more gas to run than they actually consume (e.g. 2300 stipend that is refunded if not used). With more intricate contract interplays, it becomes almost impossible to return a proper value to the user. This commit swaps out the simplistic gas estimation to a binary search approach, honing in on the correct gas use. This does mean that gas estimation needs to rerun the transaction log(max-price) times to measure whether it fails or not, but it's a price paid by the transaction issuer, and it should be worth it to support proper estimates.
* Merge pull request #3581 from karalabe/accounts-polishPéter Szilágyi2017-01-172-7/+7
|\ | | | | accounts, mobile: make account manager API a bit more uniform
| * accounts, mobile: make account manager API a bit more uniformPéter Szilágyi2017-01-172-7/+7
| |
* | cmd/geth, core: add support for recording SHA3 preimages (#3543)Nick Johnson2017-01-171-1/+1
|/
* accounts/abi: fix comment spelling errorPéter Szilágyi2017-01-131-1/+1
|
* all: fix ineffectual assignments and remove uses of crypto.Sha3Felix Lange2017-01-093-1/+11
| | | | | go get github.com/gordonklaus/ineffassign ineffassign .
* accounts/abi: fixed broken types slice testcasesThomas Bocek2017-01-092-14/+19
| | | | | Check for slice in type as well and adapted test case as arrays also store its types.
* accounts/abi: fixed commentsJeffrey Wilcke2017-01-092-5/+5
|
* accounts/abi: added testcase to unpack []uint32tbocek2017-01-091-0/+24
|
* accounts/abi: support custom int slice typesThomas Bocek2017-01-092-4/+51
| | | | | | | | | | | | | | On solidity contract I have "uint32 []" type, when abigen creates Go bindings - they are also "[]uint32" type on Go side. Even though it looks like it should work - the actual type of the data coming from the chain is of type " []*big.Int". When executing contract function from Go side - getting unmarshal error: abi: cannot unmarshal []*big.Int in to []uint32 The fix is to create array with the correct type This fixed the issue reported in: https://github.com/ethereum/go-ethereum/issues/2802
* all: fix issues reported by honnef.co/go/simple/cmd/gosimpleFelix Lange2017-01-072-11/+11
|
* all: gofmt -w -sFelix Lange2017-01-061-14/+14
|
* Merge pull request #3516 from fjl/types-drop-sign-ecdsaPéter Szilágyi2017-01-061-1/+1
|\ | | | | core/types: remove redundant SignECDSA wrappers, rename to SignTx
| * core/types: remove redundant SignECDSA wrappers, rename to SignTxFelix Lange2017-01-051-1/+1
| |
* | Merge pull request #3518 from fjl/ethclient-dependency-cleanupPéter Szilágyi2017-01-061-2/+2
|\ \ | | | | | | core/types: dependency cleanup
| * | core/vm: move Log to core/typesFelix Lange2017-01-061-2/+2
| |/ | | | | | | | | | | | | | | 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-052-4/+4
|/
* core/vm: improved EVM run loop & instruction calling (#3378)Jeffrey Wilcke2017-01-051-1/+1
| | | | | | | | | | | | | | | The run loop, which previously contained custom opcode executes have been removed and has been simplified to a few checks. Each operation consists of 4 elements: execution function, gas cost function, stack validation function and memory size function. The execution function implements the operation's runtime behaviour, the gas cost function implements the operation gas costs function and greatly depends on the memory and stack, the stack validation function validates the stack and makes sure that enough items can be popped off and pushed on and the memory size function calculates the memory required for the operation and returns it. This commit also allows the EVM to go unmetered. This is helpful for offline operations such as contract calls.
* accounts/abi: add support for function types (#3405)RJ2017-01-054-4/+24
|
* accounts, core, crypto, internal: use normalised V during signature handling ↵Péter Szilágyi2017-01-052-21/+8
| | | | | | | | | (#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.
* accounts/abi: add support for "anonymous" and "indexed" for events (#3464)bas-vk2016-12-224-20/+61
|
* Merge pull request #3403 from VoR0220/fixedPointsAbiPéter Szilágyi2016-12-192-7/+85
|\ | | | | accounts/abi: prepare ABI to handle fixed point types
| * accounts/abi: clean up PR and add type parsing testsPéter Szilágyi2016-12-192-5/+82
| |
| * accounts/abi: prepare ABI to handle fixed point typesVoR02202016-12-191-5/+6
| | | | | | | | Signed-off-by: VoR0220 <rj@erisindustries.com>
* | core, core/vm: implemented a generic environment (#3348)Jeffrey Wilcke2016-12-061-1/+5
|/ | | | | | | | Environment is now a struct (not an interface). This reduces a lot of tech-debt throughout the codebase where a virtual machine environment had to be implemented in order to test or run it. The new environment is suitable to be used en the json tests, core consensus and light client.
* accounts: don't use common.Address for address fieldFelix Lange2016-11-281-4/+5
| | | | | common.Address JSON encoding now enforces the 0x prefix, but key files don't have the prefix.
* accounts: disable file system watcher on windowsFelix Lange2016-11-282-2/+2
| | | | | The watcher is unreliable and causes test failures on Windows. Disable it until we have a better solution.
* accounts/abi/bind, mobile: review fixes and android testsPéter Szilágyi2016-11-152-8/+12
|
* mobile: initial wrappers for mobile supportPéter Szilágyi2016-11-144-14/+276
|
* core/types, params: EIP#155Jeffrey Wilcke2016-11-134-16/+15
|
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-3/+6
| | | | | | | | | | | | | | | This commit implements EIP158 part 1, 2, 3 & 4 1. If an account is empty it's no longer written to the trie. An empty account is defined as (balance=0, nonce=0, storage=0, code=0). 2. Delete an empty account if it's touched 3. An empty account is redefined as either non-existent or empty. 4. Zero value calls and zero value suicides no longer consume the 25k reation costs. params: moved core/config to params Signed-off-by: Jeffrey Wilcke <jeffrey@ethereum.org>
* accounts: add Find methodFelix Lange2016-11-111-1/+7
|
* all: update license informationFelix Lange2016-11-093-3/+3
|
* accounts/abi: differentiate between static and dynamic arrays (#3121)RJ2016-11-044-26/+64
| | | | | solves #3119 Signed-off-by: VoR0220 <rj@erisindustries.com>
* internal/ethapi: add personal_sign and fix eth_sign to hash message (#2940)bas-vk2016-10-292-6/+21
| | | | | | | | | | | | | | | | | | | | This commit includes several API changes: - The behavior of eth_sign is changed. It now accepts an arbitrary message, prepends the well-known string \x19Ethereum Signed Message:\n<length of message> hashes the result using keccak256 and calculates the signature of the hash. This breaks backwards compatability! - personal_sign(hash, address [, password]) is added. It has the same semantics as eth_sign but also accepts a password. The private key used to sign the hash is temporarily unlocked in the scope of the request. - personal_recover(message, signature) is added and returns the address for the account that created a signature.
* core/state: implement reverts by journaling all changesFelix Lange2016-10-061-2/+4
| | | | | | | | | | This commit replaces the deep-copy based state revert mechanism with a linear complexity journal. This commit also hides several internal StateDB methods to limit the number of ways in which calling code can use the journal incorrectly. As usual consultation and bug fixes to the initial implementation were provided by @karalabe, @obscuren and @Arachnid. Thank you!
* accounts: left pad keybytes-to-encrypt, add 30/31 byte keys testsGustav Simonsson2016-09-283-1/+62
|
* accounts/abi: fix typo in the comment (dummy commit)Péter Szilágyi2016-09-261-1/+1
|
* core/state: track all accounts in canon stateFelix Lange2016-09-261-5/+2
| | | | | This change introduces a global, per-state cache that keeps account data in the canon state. Thanks to @karalabe for lots of fixes.
* accounts/abi/bind: add utilities for waiting on transactionsFelix Lange2016-08-234-15/+267
| | | | | | | | | The need for these functions comes up in code that actually deploys and uses contracts. As of this commit, they can be used with both SimulatedBackend and ethclient. SimulatedBackend gains some additional methods in the process and is now safe for concurrent use.
* accounts/abi/bind: use ethereum interfacesFelix Lange2016-08-223-175/+157
| | | | | | | | | | | | | | | | | | | | | | | | | In this commit, contract bindings and their backend start using the Ethereum Go API interfaces offered by ethclient. This makes ethclient a suitable replacement for the old remote backend and gets us one step closer to the final stable Go API that is planned for go-ethereum 1.5. The changes in detail: * Pending state is optional for read only contract bindings. BoundContract attempts to discover the Pending* methods via an interface assertion. There are a couple of advantages to this: ContractCaller is just two methods and can be implemented on top of pretty much anything that provides Ethereum data. Since the backend interfaces are now disjoint, ContractBackend can simply be declared as a union of the reader and writer side. * Caching of HasCode is removed. The caching could go wrong in case of chain reorganisations and removing it simplifies the code a lot. We'll figure out a performant way of providing ErrNoCode before the 1.5 release. * BoundContract now ensures that the backend receives a non-nil context with every call.
* accounts/abi/bind/backends: remove nil and remote backendsFelix Lange2016-08-214-203/+10
| | | | | | | | | | | | The remote backend is superseded by ethclient. The nil backend's stated purpose was to enable testing of accounts/abi/bind. None of its methods actually worked. A much simpler way to get a crashing backend is to simply pass nil as the backend. With a one-line change to the generator (removing two explicit interface assertions), passing nil actually works. Removing these backends means that less changes are required later.
* cmd/utils, node: create account manager in package nodeFelix Lange2016-08-171-22/+0
| | | | | | | | | | | | | | | The account manager was previously created by packge cmd/utils as part of flag processing and then passed down into eth.Ethereum through its config struct. Since we are starting to create nodes which do not have eth.Ethereum as a registered service, the code was rearranged to register the account manager as its own service. Making it a service is ugly though and it doesn't really fix the root cause: creating nodes without eth.Ethereum requires duplicating lots of code. This commit splits utils.MakeSystemNode into three functions, making creation of other node/service configurations easier. It also moves the account manager into Node so it can be used by those configurations without requiring package eth.
* rpc: add new client, use it everywhereFelix Lange2016-07-231-142/+18
| | | | | | The new client implementation supports concurrent requests, subscriptions and replaces the various ad hoc RPC clients throughout go-ethereum.
* accounts, core, eth: pass chain config for chain maker to test DAOPéter Szilágyi2016-07-151-2/+2
|
* core: added CheckNonce() to Message interfacezsfelfoldi2016-07-111-1/+2
|
* Merge pull request #2159 from zsfelfoldi/light-backendPéter Szilágyi2016-06-306-48/+99
|\ | | | | eth: separate common and full node-specific API and backend service
| * eth: separate common and full node-specific API and backend servicezsfelfoldi2016-06-166-48/+99
| |
* | accounts/abi: fix uint64 upper range encoding.Péter Szilágyi2016-06-102-21/+33
|/
* accounts/abi: Negative numbers not properly converted in ABI encodingThomas Bocek2016-06-064-64/+10
| | | | | | | | | | | | | | | When converting a negative number e.g., -2, the resulting ABI encoding should look as follows: fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe. However, since the check of the type is for an uint instead of an int, it results in the following ABI encoding: 0101010101010101010101010101010101010101010101010101010101010102. The Ethereum ABI (https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) says, that signed integers are stored in two's complement which should be of the form ffffff.... and not 01010101..... for e.g. -1. Thus, I removed the type check in numbers.go as well as the function S256 as I don't think they are correct. Or maybe I'm missing something?
* Merge pull request #2564 from bas-vk/submit-txJeffrey Wilcke2016-05-232-2/+42
|\ | | | | eth: add new RPC method (personal.) SignAndSendTransaction
| * eth: add new RPC method (personal.) SignAndSendTransactionBas van Kervel2016-05-202-2/+42
| |
* | accounts/abi/bind, eth: rely on getCode for sanity checks, not estimate and callPéter Szilágyi2016-05-205-6/+101
|/
* accounts/abi: fix abi test for go vet...Péter Szilágyi2016-05-121-2/+2
|
* accounts/abi/bind: fix multi-value anonymous unmarshallingPéter Szilágyi2016-05-122-3/+37
|
* accounts/abi: fixed unpacking in to already slice interfacesJeffrey Wilcke2016-05-113-31/+94
| | | | | | | | | | | | | | | | Previously it was assumed that wheneven type `[]interface{}` was given that the interface was empty. The abigen rightfully assumed that interface slices which already have pre-allocated variable sets to be assigned. This PR fixes that by checking that the given `[]interface{}` is larger than zero and assigns each value using the generic `set` function (this function has also been moved to abi/reflect.go) and checks whether the assignment was possible. The generic assignment function `set` now also deals with pointers (useful for interface slice mentioned above) by dereferencing the pointer until it finds a setable type.
* release, all: integrate the release service into gethPéter Szilágyi2016-05-021-2/+3
|
* Merge pull request #2493 from almindor/developFelix Lange2016-04-301-1/+6
|\ | | | | eth: add personal_importRawKey
| * eth: add personal_importRawKey for runtime private key importAles Katona2016-04-281-1/+6
| |
* | Merge pull request #2435 from obscuren/abi-array-fixesPéter Szilágyi2016-04-288-362/+733
|\ \ | | | | | | accounts/abi: refactored ABI package
| * | accounts/abi: fixed string and fixed size bytes packingJeffrey Wilcke2016-04-286-85/+137
| | |
| * | accounts/abi: added unpacking "anything" in to interface{}Jeffrey Wilcke2016-04-282-0/+11
| | |
| * | accounts/abi: fixed strict go-like unpackingJeffrey Wilcke2016-04-282-27/+158
| | |
| * | accouns/abi: refactored ABI packageJeffrey Wilcke2016-04-208-314/+491
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactored the abi package parsing and type handling. Relying mostly on package reflect as opposed to most of our own type reflection. Our own type reflection is still used however for cases such as Bytes and FixedBytes (abi: bytes•). This also inclused several fixes for slice handling of arbitrary and fixed size for all supported types. This also further removes implicit type casting such as assigning, for example `[2]T{} = []T{1}` will fail, however `[2]T{} == []T{1, 2}` (notice assigning *slice* to fixed size *array*). Assigning arrays to slices will always succeed if they are of the same element type. Incidentally also fixes #2379
* | accounts/abi/bind, eth: add contract non-existent errorPéter Szilágyi2016-04-274-4/+60
| |
* | accounts: disable file system watch on linux/arm64Felix Lange2016-04-252-2/+2
|/
* accounts/abi/bind/backends: estimate needed gas, not usedPéter Szilágyi2016-04-151-1/+1
|
* all: fix go vet warningsFelix Lange2016-04-151-5/+5
|
* all: update license informationFelix Lange2016-04-152-1/+17
|
* accounts: disable filesystem notifications on iosPéter Szilágyi2016-04-132-2/+2
|
* accounts: ensure TimedUnlock does not override indefinite unlock timeoutFelix Lange2016-04-122-10/+16
|
* accounts: improve API and add documentationFelix Lange2016-04-123-48/+84
| | | | | - Sign takes common.Address, not Account - Import/Export methods work with encrypted JSON keys
* cmd/geth: add recovery procedure for AmbiguousAddrErrorFelix Lange2016-04-123-0/+3
|
* accounts: add ErrDecryptFelix Lange2016-04-124-7/+6
|
* accounts: cache key addressesFelix Lange2016-04-1216-360/+1040
| | | | | | | | | | | | | | | In order to avoid disk thrashing for Accounts and HasAccount, address->key file mappings are now cached in memory. This makes it no longer necessary to keep the key address in the file name. The address of each key is derived from file content instead. There are minor user-visible changes: - "geth account list" now reports key file paths alongside the address. - If multiple keys are present for an address, unlocking by address is not possible. Users are directed to remove the duplicate files instead. Unlocking by index is still possible. - Key files are overwritten written in place when updating the password.
* cmd/geth: add tests for account commandsFelix Lange2016-04-1210-0/+28
|
* accounts: streamline APIFelix Lange2016-04-122-38/+29
| | | | | | - Manager.Accounts no longer returns an error. - Manager methods take Account instead of common.Address. - All uses of Account with unkeyed fields are converted.
* accounts: fix go vet warningsFelix Lange2016-04-123-5/+5
|
* accounts, crypto: move keystore to package accountsFelix Lange2016-04-1213-52/+1242
| | | | | | | | | | The account management API was originally implemented as a thin layer around crypto.KeyStore, on the grounds that several kinds of key stores would be implemented later on. It turns out that this won't happen so KeyStore is a superflous abstraction. In this commit crypto.KeyStore and everything related to it moves to package accounts and is unexported.
* accounts/abi/bind: support generating bindings for various arraysPéter Szilágyi2016-04-052-16/+67
|
* abi: removed implicit type casting & refactored type parsingJeffrey Wilcke2016-04-053-53/+80
|
* abi: accept output slices of all supported typesJeffrey Wilcke2016-04-053-5/+143
|
* abi: accept input slices of all supported typesJeffrey Wilcke2016-04-055-145/+106
|
* Merge pull request #2405 from karalabe/abigen-default-methodsJeffrey Wilcke2016-04-013-5/+102
|\ | | | | accounts/abi/bind: surface raw wrappers to access low level ops
| * accounts/abi/bind: surface raw wrappers to access low level opsPéter Szilágyi2016-04-013-5/+102
| |
* | accounts/a/b/backends, core: chain maker homestead block set to 0Jeffrey Wilcke2016-04-011-2/+1
| | | | | | | | | | | | | | The chain maker and the simulated backend now run with a homestead phase beginning at block 0 (i.e. there's no frontier). This commit also fixes up #2388
* | core: added basic chain configurationJeffrey Wilcke2016-04-011-3/+8
|/ | | | | | | | | Added chain configuration options and write out during genesis database insertion. If no "config" was found, nothing is written to the database. Configurations are written on a per genesis base. This means that any chain (which is identified by it's genesis hash) can have their own chain settings.
* accounts/abi/bind: support account slices, drop hash typePéter Szilágyi2016-03-311-2/+2
|
* accounts/abi/bind: merge all tests into a single suitePéter Szilágyi2016-03-311-22/+22
|
* accounts/abi/bind: use anonymous ephemeral call result structsPéter Szilágyi2016-03-311-15/+10
|
* accounts/abi/bind, cmd/abigen: dedup structs, exclude patternsPéter Szilágyi2016-03-261-6/+6
|
* accounts/abi/bind: fix double pointer in generated codePéter Szilágyi2016-03-252-4/+36
|
* accounts/abi/bind, cmd/abigen: port to templates, bind to solidityPéter Szilágyi2016-03-249-428/+530
|
* accounts/abi/bind: constructor, auth utils and various backendsPéter Szilágyi2016-03-249-263/+723
|
* accounts/abi/bind, cmd/abigen: Go API generator around an EVM ABIPéter Szilágyi2016-03-246-41/+855
|
* Merge pull request #2348 from obscuren/abi-variable-inputPéter Szilágyi2016-03-174-31/+193
|\ | | | | accounts/abi: Fixed bytes input accept []byte and variable input support
| * accounts/abi: Fixed bytes input accept []byte and variable input supportJeffrey Wilcke2016-03-154-31/+193
| | | | | | | | | | | | | | | | | | Fixed up `[]byte` slice support such that `function print(bytes input)` accepts `[]byte` as input and treats it as 1 element rather than a slice of multiple elements. Added support for variable length input parameters like `bytes` and `strings`.
* | accounts/abi: handle the "constant" modifier for functionsPéter Szilágyi2016-03-162-9/+12
|/
* all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}()Ricardo Catalinas Jiménez2016-02-224-9/+9
| | | | As we aren't really using the standarized SHA-3
* accounts/abi: support for typed arrayJeffrey Wilcke2016-02-152-43/+114
| | | | | Added support for fixed size and arbitrary length byte arrays to be marshallable in fixed size (typed) byte slices.
* accounts/abi: fixed return tuple and string, bytes return type parsingJeffrey Wilcke2016-02-113-30/+363
| | | | | | | | | | | | | Removed old unmarshalling of return types: `abi.Call(...).([]byte)`. This is now replaced by a new syntax: ``` var a []byte err := abi.Call(&a, ...) ``` It also addresses a few issues with Bytes and Strings and can also handle both fixed and arbitrary sized byte slices, including strings.
* account/abi: implements event parsingJeffrey Wilcke2016-02-026-31/+174
| | | | | | Implementation of basic event parsing and its input types. This separates methods and events and fixes an issue with go type parsing and validation.
* rpc: migrated the RPC insterface to a new reflection based RPC layerBas van Kervel2016-01-261-1/+1
|
* Merge pull request #2035 from bas-vk/rcp-v2-rebaseFelix Lange2015-12-151-0/+15
|\ | | | | rpc: new RPC implementation with pub/sub support
| * rpc: new RPC implementation with pub/sub supportBas van Kervel2015-12-141-0/+15
| |
* | Merge pull request #2003 from obscuren/abi-callingFelix Lange2015-12-086-88/+243
|\ \ | |/ |/| accounts/abi: added output parsing & added call mechanism
| * accounts/abi: added output parsing & added call mechanismJeffrey Wilcke2015-11-256-88/+243
| | | | | | | | Added calling mechanism and return value parsing
* | accounts: increase re-lock timeout to account for slow CI serversPéter Szilágyi2015-12-011-1/+1
|/
* accounts/abi: ABI fixes & added typesJeffrey Wilcke2015-10-303-21/+80
| | | | | | | Changed field `input` to new `inputs`. Addad Hash and Address as input types. Added bytes[N] and N validation
* Merge pull request #1548 from fjl/accounts-test-deflakeJeffrey Wilcke2015-08-031-1/+2
|\ | | | | accounts: bump timeout in TestSignRace
| * accounts: bump timeout and spin less in TestSignRaceFelix Lange2015-08-021-1/+2
| | | | | | | | This should fix the flakeyness.
* | all: fix license headers one more timeFelix Lange2015-07-248-8/+8
|/ | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
* all: update license headers to distiguish GPL/LGPLFelix Lange2015-07-238-32/+32
| | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library".
* accounts: fix data race when key is locked after the unlock timeoutFelix Lange2015-07-212-20/+45
| | | | | | While here, also improve the docs and speed up the tests. The tests used the scrypt keystore with ridiculous settins and took 20s each.
* fix wallet key duplicate write - how did it get there? mystery. fixes #1411zelig2015-07-091-3/+0
|
* all: add some godoc synopsis commentsFelix Lange2015-07-071-10/+6
|
* all: remove @author commentsFelix Lange2015-07-071-6/+0
|
* all: update license informationFelix Lange2015-07-078-15/+127
|
* account update: migrate or change passwordzelig2015-07-031-0/+28
| | | | | | * account.Update * KeyStore.Cleanup * fix dir rm for old format deleteKey
* fix account orderingzelig2015-07-032-5/+6
| | | | | | | | * chronological order of creation * new naming scheme keystore/UTC--<created_at UTC ISO8601>-<address hex> * KeyStore2 -> KeyStore * backward compatibility * refactor keyStore methods
* unlock multiple passes and obsolete primaryzelig2015-07-032-14/+1
| | | | | | | * multiple passwords allowed in password file * split on "\n", sideeffect: chop trailing slashes. fixes common mistake <(echo 'pass') * remove accounts.Primary method * do not fall back to primary account for mining
* simplify account unlockingzelig2015-07-032-56/+85
|
* Introduced default unlock duration when an account is unlocked from the consoleBas van Kervel2015-05-141-0/+5
|
* Use common.Address type for accounts.AddressGustav Simonsson2015-05-121-21/+21
|
* settable etherbasezelig2015-03-271-7/+1
| | | | | | | | - etherbase flag for block reward destination - coinbase => etherbase - CLI- eth Config -> eth, xeth -> RPC / Miner - use primary instead of coinbase as the unlock magic wildcard - accounts: firstAddr/Coinbase -> Primary
* max paranoia mode to UNsupport unencrypted keys entirelyzelig2015-03-271-0/+2
| | | | | | | - remove account export functionality from CLI - remove accountExport method, - remove unencrypted-keys flag from everywhere - improve documentation
* unlocking coinbase without knowing addresszelig2015-03-271-15/+3
| | | | | - accounts: remove Manager.getKey - cli: for -unlock coinbase, use account manager Coinbase()
* cli: implement ethereum presale wallet import via clizelig2015-03-271-0/+12
|
* unlocking coinbasezelig2015-03-271-2/+13
| | | | | - extract accounts.getKey method - if given empty address it retrieves coinbase (first account) - cli -unlock coinbase will unlock coinbase
* import/export accountszelig2015-03-271-0/+20
| | | | | | | | | | | - cli: add passwordfile flag - cli: change unlock flag only takes account - cli: with unlock you are prompted for password or use passfile with password flag - cli: unlockAccount used in normal client start (run) and accountExport - cli: getPassword used in accountCreate and accountImport - accounts: Manager.Import, Manager.Export - crypto: SaveECDSA (to complement LoadECDSA) to save to file - crypto: NewKeyFromECDSA added (used in accountImport and New = generated constructor)
* Moved ethutil => commonobscuren2015-03-162-10/+10
|
* accounts: return ErrNoKeys if key directory does not existFelix Lange2015-03-101-2/+7
|
* accounts: add {Timed,}Unlock, remove SignLockedFelix Lange2015-03-102-55/+55
|
* Merge ethereum/poc-9 into accounts-integrationFelix Lange2015-03-101-106/+0
|\ | | | | | | | | | | | | | | | | | | Conflicts: cmd/utils/cmd.go cmd/utils/flags.go core/manager.go eth/backend.go rpc/http/server.go xeth/xeth.go
| * removedobscuren2015-03-081-106/+0
| |
* | accounts: add Manager.HasAccount, delete Manager.DefaultFelix Lange2015-03-101-9/+11
| |
* | accounts: don't store address in unlocked and add commentaryFelix Lange2015-03-081-8/+10
| | | | | | | | This was suggested during review.
* | accounts: AccountManager -> ManagerFelix Lange2015-03-082-15/+15
| |