aboutsummaryrefslogtreecommitdiffstats
path: root/accounts
Commit message (Collapse)AuthorAgeFilesLines
* crypto: add SignatureLength constant and use it everywhere (#19996)Felix Lange2019-08-221-1/+2
| | | Original change by @jpeletier
* all: replace passPHRASE with passWORD in user interactions (#19932)SjonHortensius2019-08-125-7/+7
| | | | | | | | | * Ref #19906 - replace passPHRASE with passWORD in any user interactions this skips doccomments and variablenames to minimize impact. It does however include a rename of the `ethkey` `changepassphrase` parameter * console: fix JavaScript error capitalization
* accounts, internal/ethapi: use common Accounts method (#18428)Roc Yu2019-08-081-0/+15
| | | | | | | | * accounts/mananger, internal/ethapi/api: Add new function AllAccounts on account manager to remove the duplication code on getting all wallets accounts * Rename to Accounts * Rename to AllAccounts
* accounts/abi, signer/fourbyte: fix incorrect signature (#19881)gary rong2019-08-0210-56/+203
| | | | | The abi package already supports function overload by adding a suffix to the overloaded function name, but it uses the function name with suffix to calculate signature(both for the event and method). This PR fixes it by adding a new field named RawName, which can be used to calcuate all signatures but use Name to distinguish different overloaded function.
* accounts/abi/bind: support closing a simulated backendPéter Szilágyi2019-07-314-7/+41
|
* all: update author list and licensesPéter Szilágyi2019-07-226-13/+13
|
* all: replace t.Log(); t.FailNow() with t.Fatal() (#19849)Felix Lange2019-07-181-16/+8
|
* signer/core: fix reference issue in key derivation (#19827)Guillaume Ballet2019-07-181-1/+2
| | | | | | * signer/core: fix reference issue in key derivation * Review feedback
* accounts/abi/bind: link dependent libs in deploy (#19718)Guillaume Ballet2019-07-083-60/+218
| | | | | | | | | | | | | | | | | | | | | * accounts, abigen: link dependent libs in deploy * abigen: add java generation * bind: Fix unit tests * abigen: add unit test * Fix CI * Post-rebase fixes * Fix rebase issue * accounts/abi: Gary's review feedback * accounts/abi: More Gary feedback * accounts/abi: minor fixes
* accounts/abi/bind: fix typo in comments (#19791)Guillaume Ballet2019-07-041-2/+2
|
* accounts, cmd, contracts, les: integrate clef for transaction signing (#19783)gary rong2019-07-042-4/+22
| | | | | | * accounts, cmd, contracts, les: integrate clef for transaction signing * accounts, cmd/checkpoint-admin, signer/core: minor fixups
* accounts/abi: enable struct golang binding generation (#18491)gary rong2019-07-038-81/+467
| | | | | | | | | | | | | | | | * accounts/abi, cmd/abigen: support tuple accounts/abi/bind, cmd/abigen: add objc back accounts/abi/bind: use byte[24] as function indicator accounts/abi/bind: resolve struct slice or array accounts/abi/bind: remove sort logic accounts: fix issues in abi * accounts/abi: address comment
* accounts/abi/bind: Accept function ptr parameter (#19755)Guillaume Ballet2019-07-023-9/+90
| | | | | | | | | | | | * accounts/abi/bind: Accept function ptr parameter They are translated as [24]byte * Add Java template version * accounts/abi/bind: fix merge issue * Fix CI
* accounts/abi: Fix method overwritten by same name methods. (#17099)zer0to0ne2019-07-013-33/+58
| | | | | | | | | * accounts/abi: Fix method overwritten by same name methods. * accounts/abi: Fix method overwritten by same name methods. * accounts/abi: avoid possible name conflict Co-authored-by: Guillaume Ballet <gballet@gmail.com>
* all: on-chain oracle checkpoint syncing (#19543)gary rong2019-06-284-8/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * all: implement simple checkpoint syncing cmd, les, node: remove callback mechanism cmd, node: remove callback definition les: simplify the registrar les: expose checkpoint rpc services in the light client les, light: don't store untrusted receipt cmd, contracts, les: discard stale checkpoint cmd, contracts/registrar: loose restriction of registeration cmd, contracts: add replay-protection all: off-chain multi-signature contract params: deploy checkpoint contract for rinkeby cmd/registrar: add raw signing mode for registrar cmd/registrar, contracts/registrar, les: fixed messages * cmd/registrar, contracts/registrar: fix lints * accounts/abi/bind, les: address comments * cmd, contracts, les, light, params: minor checkpoint sync cleanups * cmd, eth, les, light: move checkpoint config to config file * cmd, eth, les, params: address comments * eth, les, params: address comments * cmd: polish up the checkpoint admin CLI * cmd, contracts, params: deploy new version contract * cmd/checkpoint-admin: add another flag for clef mode signing * cmd, contracts, les: rename and regen checkpoint oracle with abigen
* mobile: fix mobile interface (#19180)gary rong2019-06-273-201/+550
| | | | | | | | | | | | * mobile: fix mobile interface * mobile, accounts: generate correct java binding * accounts: fix java type binding * mobile: support integer slice * accounts/abi/bind, cmd/abigen: implement java binding tests
* abi: adding the method EventByID and its test (#19359)salanfe2019-06-242-0/+81
| | | | | | | This function searches for an event+parameters in the ABI and returns it if found. Co-authored-by: Victor Tran <vu.tran54@gmail.com> Co-authored-by: Guillaume Ballet <gballet@gmail.com>
* accounts/abi/bind/backends: use EIP155 on the simulated chainPéter Szilágyi2019-06-181-1/+1
|
* accounts/keystore: fix #19707, avoid keyword as variable nameMartin Holst Swende2019-06-181-3/+3
|
* accounts/abi/bind: rename NewKeystoreTransactor (#19703)Marius van der Wijden2019-06-121-2/+2
| | | | renamed NewKeyStoreFromTransactor to NewKeystoreTransactor fixed godoc
* accounts: added transactorFromKeyStore (#19685)Marius van der Wijden2019-06-081-0/+19
|
* account/usbwallet: abort usb enumeration after failuresMartin Holst Swende2019-06-051-1/+11
|
* accounts/usbwallet, vendor: switch from HID to generic USB libPéter Szilágyi2019-06-043-18/+16
|
* accounts/usbwallet: recreate Trezor protocol, support old and newPéter Szilágyi2019-06-0312-5476/+4762
|
* accounts/usbwallet: support webusb for Trezor walletsGuillaume Ballet2019-06-033-4/+22
|
* accounts/scwallet: flag to specify path to smartcard daemon (#19439)Guillaume Ballet2019-05-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * accounts/scwallet: Add a switch to enable smartcard support * accounts: change the meaning of the switch * disable card support in windows until tested * only activate account if pcscd socket file is present * the switch is now the path to the socket file * accounts/scwallet: holiman's review feedback * accounts/scwallet: send the path to go-pcsclite * accounts/scwallet: add default, per platform path * accounts/scwallet: fix error log warning * accounts/scwallet: update pcsc lib to latest * accounts/scwallet: use default path from pcsclite * scwallet: forgot to change switch name * cmd: minor style cleanups (error handling first, then happy path)
* accounts/scwallet: change sc url scheme to keycard (#19632)Guillaume Ballet2019-05-292-11/+11
|
* accounts/scwallet: fix public key confirmation regressionPéter Szilágyi2019-05-271-8/+6
|
* accounts/scwallet: display PUK retry count, validate PIN/PUK lengthGuillaume Ballet2019-05-271-1/+12
|
* accounts/keystore: enable fallback for darwin,!cgo (#19614)Jeremy Schlatter2019-05-272-2/+2
| | | | Without this, accounts/keystore fails to build for Darwin with CGO_ENABLED=0.
* accounts/usbwallet: enable the Nano X and upcoming Ledger IDs (#19623)Péter Szilágyi2019-05-261-1/+14
|
* accounts, p2p, rpc: make CGO_ENABLED=0 build again (#19593)Martin Holst Swende2019-05-261-17/+8
| | | | | | | | | | * p2p: remove direct import of cgo-library * accounts, rpc: more nocgo alternatives * rpc: move unix path constant into separate file * accounts/scwallet: address review concerns, remove copy-pasta
* accounts/abi: fix TestUnpackMethodIntoMap (#19484)manlio2019-05-171-1/+1
|
* accounts,signer: better support for EIP-191 intended validator (#19523)Martin Holst Swende2019-05-161-1/+1
|
* accounts/abi: fix documentation (#19568)Jeremy Schlatter2019-05-141-2/+2
|
* accounts/usbwallet: fix a comment typo in trezor driver (#19535)Guillaume Ballet2019-05-081-1/+1
|
* accounts, cmd, internal, signer: add note about backing up the keystore (#19432)Kurkó Mihály2019-05-071-2/+3
| | | | | | | | | | | | * accounts: add note about backing up the keystore * cmd, accounts: move the printout to accountCreate * internal, signer: add info when new account is created via rpc * cmd, internal, signer: split logs * cmd/geth: make account new output a bit more verbose
* Merge pull request #19438 from karalabe/ledger-new-derivation-pathPéter Szilágyi2019-04-256-129/+159
|\ | | | | accounts: switch Ledger derivation path to canonical one
| * accounts: switch Ledger derivation path to canonical onePéter Szilágyi2019-04-106-122/+155
| |
| * Revert "Can now specify the number of empty accounts to derive"Péter Szilágyi2019-04-101-10/+7
| | | | | | | | This reverts commit 5b30aa59d63fcb7ef8111ec89a6f06509b5ce687.
* | core, eth, les, light: scope receipt functionality a bit cleanerPéter Szilágyi2019-04-151-3/+3
| |
* | accounts/scwallet: fix card pairing instruction message (#19436)Guillaume Ballet2019-04-101-1/+1
|/
* accounts/scwallet: Update README for v2.2.1 support (#19425)Guillaume Ballet2019-04-101-15/+48
| | | | Update the app download link to the latest version, as requested in #19418
* Can now specify the number of empty accounts to deriveGuillaume Ballet2019-04-081-7/+10
|
* More review feedbackGuillaume Ballet2019-04-081-0/+5
|
* more review feedbackGuillaume Ballet2019-04-082-11/+10
|
* fix a serialization errorGuillaume Ballet2019-04-081-1/+3
|
* Apply suggestions from code reviewMartin Holst Swende2019-04-081-3/+6
| | | Co-Authored-By: gballet <gballet@gmail.com>
* 'sanitize' JSON inputMartin Holst Swende2019-04-081-1/+1
| | | Co-Authored-By: gballet <gballet@gmail.com>
* Update the card preparation instructions based on review feedbackGuillaume Ballet2019-04-081-0/+9
|
* refresh the account list when initializing the cardGuillaume Ballet2019-04-081-0/+1
|
* refuse to overwrite the master key of a previously initialized cardGuillaume Ballet2019-04-081-3/+15
|
* fix unnecessary condition linter warningGuillaume Ballet2019-04-081-1/+1
|
* Upgrade to keycard app v2.1.1Guillaume Ballet2019-04-082-24/+16
|
* Fix linter issuesGuillaume Ballet2019-04-082-17/+13
|
* PK derivation has to be supported by the cardGuillaume Ballet2019-04-081-11/+7
|
* Add instructions on how to install the cardGuillaume Ballet2019-04-081-0/+19
|
* Formatting fixesGuillaume Ballet2019-04-081-11/+16
|
* Update a comment to reflect the workings of the updated systemGuillaume Ballet2019-04-082-3/+3
|
* Add some documentationGuillaume Ballet2019-04-081-0/+30
|
* Fix key derivationGuillaume Ballet2019-04-081-66/+33
|
* fix wallet status updateGuillaume Ballet2019-04-081-21/+24
| | | | | | This is a temporary fix, better checks need to be performed once the whole process has been validated.
* Temporary fix to the ADBU status callGuillaume Ballet2019-04-081-3/+24
|
* Remove the direct dependency on libpcscliteGuillaume Ballet2019-04-083-34/+39
| | | | | | | Instead, use a go library that communicates with pcscd over a socket. Also update the changes introduced by @gravityblast since this PR's inception
* Fix some linter issuesGuillaume Ballet2019-04-082-7/+3
|
* accounts/scwallet: rebase and updateGuillaume Ballet2019-04-081-7/+36
|
* accounts/scwallet: fix crypto API changePéter Szilágyi2019-04-081-1/+5
|
* accounts, console: frendly card errors, support pin unblockPéter Szilágyi2019-04-085-112/+151
|
* accounts/scwallet: ordered wallets, tighter events, derivation logsPéter Szilágyi2019-04-082-63/+81
|
* accounts/scwallet, console: user friendly card openingPéter Szilágyi2019-04-081-29/+43
|
* accounts, internal: Changes in response to reviewNick Johnson2019-04-085-118/+135
|
* accounts, core, internal, node: Add support for smartcard walletsNick Johnson2019-04-085-0/+1741
|
* accounts, cmd, internal: disable unlock account on open HTTP (#17037)gary rong2019-04-041-1/+16
| | | | | | | | | | * cmd, accounts, internal, node, rpc, signer: insecure unlock protect * all: strict unlock API by rpc * cmd/geth: check before printing warning log * accounts, cmd/geth, internal: tiny polishes
* accounts/abi: generic unpacking of event logs into map[string]interface{} ↵Ian Norden2019-04-017-10/+596
| | | | | (#18440) Add methods that allow for the unpacking of event logs into maps (allows for agnostic unpacking of logs)
* accounts/abi: Add the original name as json-structtag for tuples.Mats Julian Olsen2019-03-282-1/+8
|
* accounts/abi/bind: simulated test case for fixed bytes logsPéter Szilágyi2019-03-142-5/+40
|
* bind: Static byte arrays should be right-paddedJeremy McNevin2019-03-142-2/+109
| | | | | Per https://solidity.readthedocs.io/en/v0.5.3/abi-spec.html: "bytes<M>: enc(X) is the sequence of bytes in X padded with trailing zero-bytes to a length of 32 bytes"
* usbwallet: check error returned by driver close (#18057)Corey Lin2019-03-071-3/+1
| | | | Although current two implementations(ledgerDriver, trezorDriver) of interface driver.Close do not actually return any error. Instead, they only return nil. But since the declaration of Close function returns error, it is better to check the returned error in case in future some new implementation of Close function returns error and we may forget to modify the function which invokes Close function at that time.
* all: clean up and proerly abstract database accessPéter Szilágyi2019-03-061-1/+1
|
* accounts: prefer nil slices over zero-length slices (#19079)Matthew Halpern2019-03-062-4/+8
|
* accounts/abi: mutex lock in TransactionByHash and code cleanup (#19133)Dan Kinsley2019-02-203-4/+36
|
* accounts/abi: fix error message format (#19122)Hsien-Tang Kao2019-02-191-1/+1
|
* accounts: fix typos from the `SignData` merge (#19119)Guillaume Ballet2019-02-192-3/+3
|
* accounts/abi/bind/backends: add TransactionByHash to SimulatedBackend (#19026)Dan Kinsley2019-02-132-0/+85
|
* clef: external signing fixes + signing data (#19003)Martin Holst Swende2019-02-121-17/+22
| | | | | | | | | | | | | | | | | | | | | | * signer/clef: make use of json-rpc notification * signer: tidy up output of OnApprovedTx * accounts/external, signer: implement remote signing of text, make accounts_sign take hexdata * clef: added basic testscript * signer, external, api: add clique signing test to debug rpc, fix clique signing in clef * signer: fix clique interoperability between geth and clef * clef: rename networkid switch to chainid * clef: enable chainid flag * clef, signer: minor changes from review * clef: more tests for signer
* signer, clef: implement EIP191/712 (#17789)Paul Berg2019-02-064-28/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Named functions and defined a basic EIP191 content type list * Written basic content type functions * Added ecRecover method in the clef api * Updated the extapi changelog and addded indications in the README * Changed the version of the external API * Added tests for 0x45 * Implementing UnmarshalJSON() for TypedData * Working on TypedData * Solved the auditlog issue * Changed method to signTypedData * Changed mimes and implemented the 'encodeType' function for EIP-712 * Polished docstrings, ran goimports and swapped fmt.Errorf with errors.New where possible * Drafted recursive encodeData * Ran goimports and gofmt * Drafted first version of EIP-712, including tests * Temporarily switched to using common.Address in tests * Drafted text/validator and and rewritten []byte as hexutil.Bytes * Solved stringified address encoding issue * Changed the property type required by signData from bytes to interface{} * Fixed bugs in 'data/typed' signs * Brought legal warning back after temporarily disabling it for development * Added example RPC calls for account_signData and account_signTypedData * Named functions and defined a basic EIP191 content type list * Written basic content type functions * Added ecRecover method in the clef api * Updated the extapi changelog and addded indications in the README * Added tests for 0x45 * Implementing UnmarshalJSON() for TypedData * Working on TypedData * Solved the auditlog issue * Changed method to signTypedData * Changed mimes and implemented the 'encodeType' function for EIP-712 * Polished docstrings, ran goimports and swapped fmt.Errorf with errors.New where possible * Drafted recursive encodeData * Ran goimports and gofmt * Drafted first version of EIP-712, including tests * Temporarily switched to using common.Address in tests * Drafted text/validator and and rewritten []byte as hexutil.Bytes * Solved stringified address encoding issue * Changed the property type required by signData from bytes to interface{} * Fixed bugs in 'data/typed' signs * Brought legal warning back after temporarily disabling it for development * Added example RPC calls for account_signData and account_signTypedData * Polished and fixed PR * Polished and fixed PR * Solved malformed data panics and also wrote tests * Solved malformed data panics and also wrote tests * Added alphabetical sorting to type dependencies * Added alphabetical sorting to type dependencies * Added pretty print to data/typed UI * Added pretty print to data/typed UI * signer: more tests for typed data * signer: more tests for typed data * Fixed TestMalformedData4 errors and renamed IsValid to Validate * Fixed TestMalformedData4 errors and renamed IsValid to Validate * Fixed more new failing tests and deanonymised some functions * Fixed more new failing tests and deanonymised some functions * Added types to EIP712 output in cliui * Added types to EIP712 output in cliui * Fixed regexp issues * Fixed regexp issues * Added pseudo-failing test * Added pseudo-failing test * Fixed false positive test * Fixed false positive test * Added PrettyPrint method * Added PrettyPrint method * signer: refactor formatting and UI * signer: make ui use new message format for signing * Fixed breaking changes * Fixed rules_test failing test * Added extra regexp for reference types * signer: more hard types * Fixed failing test, formatted files * signer: use golang/x keccak * Fixed goimports error * clef, signer: address some review concerns * Implemented latest recommendations * Fixed comments and uintint256 issue * accounts, signer: fix mimetypes, add interface to sign data with passphrase * signer, accounts: remove duplicated code, pass hash preimages to signing * signer: prevent panic in type assertions, make cliui print rawdata as quotable-safe * signer: linter fixes, remove deprecated crypto dependency * accounts: fix goimport
* accounts, eth, clique, signer: support for external signer API (#18079)Martin Holst Swende2019-02-055-12/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | * accounts, eth, clique: implement external backend + move sighash calc to backend * signer: implement account_Version on external API * accounts/external: enable ipc, add copyright * accounts, internal, signer: formatting * node: go fmt * flags: disallow --dev in combo with --externalsigner * accounts: remove clique-specific signing method, replace with more generic * accounts, consensus: formatting + fix error in tests * signer/core: remove (test-) import cycle * clique: remove unused import * accounts: remove CliqueHash and avoid dependency on package crypto * consensus/clique: unduplicate header encoding
* accounts/usbwallet/trezor: expose protobuf package (#17980)benma2019-01-266-1/+1
| | | | | | | | | | When some of the same messages are redefined anywhere in a Go project, the protobuf package panics (see https://github.com/golang/protobuf/issues/178). Since this package is internal, there is no way to work around it, as one cannot use it directly, but also cannot define the same messages. There is no downside in making the package accessible.
* accounts/usbwallet: support trezor passphrases (#16503)Nimrod Gutman2019-01-241-19/+45
| | | | | | | When opening the wallet, ask for passphrase as well as for the PIN and return the relevant error (PIN/passphrase required). Open must then be called again with either PIN or passphrase to advance the process. This also updates the console bridge to support passphrase authentication.
* accounts/abi: allow interface as the destination (#18490)gary rong2019-01-232-1/+16
|
* accounts/abi: Add tests for reflection ahead of refactor (#18434)Guillaume Ballet2019-01-151-0/+191
|
* accounts/abi: Extra slice tests (#18424)Guillaume Ballet2019-01-101-0/+15
| | | Co-authored-by: weimumu <934657014@qq.com>
* accounts/abi: tuple support (#18406)gary rong2019-01-109-393/+1003
|
* accounts/keystore: small code simplification (#18394)Jeremy Schlatter2019-01-071-16/+4
|
* accounts/keystore: fix comment typo (#18395)Jeremy Schlatter2019-01-061-2/+2
|
* accounts/abi/bind: add optional block number for calls (#17942)Dragan Milic2019-01-032-6/+70
|
* accounts/abi: fix case of generated java functions (#18372)Guillaume Ballet2019-01-021-4/+6
|
* accounts/abi: change unpacking of abi fields w/ underscores (#16513)Matt K2018-12-294-47/+60
| | | | | | | | | | | | | | * accounts/abi: fix name styling when unpacking abi fields w/ underscores ABI fields with underscores that are being unpacked into structs expect structs with following form: int_one -> Int_one whereas in abigen the generated structs are camelcased int_one -> IntOne so updated the unpack method to expect camelcased structs as well.
* fix string array unpack bug in accounts/abi (#18364)weimumu2018-12-283-1/+69
|
* accounts/abi: Brings out the msg defined at require statement in SC function ↵Jeff Prestes2018-12-221-1/+1
| | | | (#17328)
* accounts/abi: add support for unpacking returned bytesN arrays (#15242)bas-vk2018-12-222-0/+64
|
* fix slice unpack bug in accounts/abi (#18321)weimumu2018-12-172-1/+6
| | | | * fix slice unpack bug in accounts/abi
* accounts/abi: argument type and name were reversed (#17947)tzapu2018-12-134-10/+104
| | | argument type and name were reversed
* usbwallet: check returned error when decoding hexstr (#18056)Corey Lin2018-12-131-1/+3
| | | | | | | | | | * usbwallet: check returned error when decoding hexstr * Update accounts/usbwallet/ledger.go Co-Authored-By: CoreyLin <514971757@qq.com> * usbwallet: check hex decode error
* Add packing for dynamic array and slice types (#18051)Vedhavyas Singareddi2018-12-043-22/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * added tests for new abi encoding features (#4) * added tests from bytes32[][] and string[] * added offset to other types * formatting * Abi/dynamic types (#5) * Revert "Abi/dynamic types (#5)" (#6) This reverts commit dabca31d797623d43bd780721fc0ad461d24be53. * Abi/dynamic types (#7) * some cleanup * Apply suggestions from code review apply suggestions Co-Authored-By: vedhavyas <vedhavyas.singareddi@gmail.com> * added better formatting (#8) * review chnages * better comments
* accounts/keystore: delete the redundant keystore in filename (#17930)Wenbiao Zheng2018-11-298-4/+18
| | | | | | * accounts/keystore: reduce file name length * accounts/keystore: reduce code line width
* accounts: wallet derivation path comment is mistaken (#17934)Wenbiao Zheng2018-10-191-2/+2
|
* accounts/usbwallet: simplify code using -= operator (#17904)Evgeny2018-10-162-2/+2
|
* cmd/clef: encrypt the master seed on disk (#17704)Martin Holst Swende2018-10-092-34/+46
| | | | | | | | | | | | | | * cmd/clef: encrypt master seed of clef Signed-off-by: YaoZengzeng <yaozengzeng@zju.edu.cn> * keystore: refactor for external use of encryption * clef: utilize keystore encryption, check flags correctly * clef: validate master password * clef: add json wrapping around encrypted master seed
* accounts/abi/bind: stop using goimports in the binding generator (#17768)Jeremy Schlatter2018-10-063-19/+153
|
* accounts/abi: fix panic in MethodById lookup. Fixes #17797 (#17798)Martin Holst Swende2018-10-012-1/+13
|
* accounts/abi/bind/backends: fix typo (#17749)CDsigma2018-09-291-1/+1
|
* all: protect self-mined block during reorg (#17656)gary rong2018-09-201-1/+1
|
* accounts/keystore: double-check keystore file after creation (#17348)Martin Holst Swende2018-09-204-10/+41
|
* abi, signer: fix nil dereference in #17633 (#17653) Martin Holst Swende2018-09-191-1/+6
| | | | | | * abi,signer: fix nil dereference in #17633 * signer/core: tiny typo fix in test error message
* accounts/abi: fix unpacking of negative int256 (#17583)Diep Pham2018-09-042-3/+30
|
* all: remove the duplicate 'the' in annotations (#17509)Wenbiao Zheng2018-08-271-2/+2
|
* accounts: fixed typo (#17421)Sasuke19642018-08-171-1/+1
|
* backends: configurable gas limit to allow testing large contracts (#17358)Jeff Prestes2018-08-153-17/+19
| | | | | | | | * backends: increase gaslimit in order to allow tests of large contracts * backends: increase gaslimit in order to allow tests of large contracts * backends: increase gaslimit in order to allow tests of large contracts
* accounts/keystore: rename skipKeyFile to nonKeyFile to better reveal the ↵Roc Yu2018-08-031-4/+4
| | | | function purpose (#17290)
* crypto/secp256k1: remove external LGPL dependencies (#17239)Péter Szilágyi2018-07-261-5/+12
|
* Merge pull request #16734 from reductionista/eip234Péter Szilágyi2018-07-241-11/+21
|\ | | | | eth/filters, interfaces: EIP-234 Add blockHash option to eth_getLogs
| * accounts, eth, les: blockhash based filtering on all code pathsPéter Szilágyi2018-07-121-11/+21
| |
* | accounts/abi: refactor Method#Sig() to use index in range iterator directly ↵Roc Yu2018-07-191-3/+1
| | | | | | | | (#17198)
* | accounts: add unit tests for URL (#17182)Roc Yu2018-07-182-3/+99
| |
* | all: switch out defunct set library to different one (#16873)Ralph Caraveo III2018-07-162-15/+15
|/ | | | | | * keystore, ethash, eth, miner, rpc, whisperv6: tech debt with now defunct set. * whisperv5: swap out gopkg.in/fatih/set.v0 with supported set
* accounts: remove deadcode isSigned (#16990)Wenbiao Zheng2018-06-202-26/+0
|
* accounts/usbwallet: correct comment typo (#16998)Husam Ibrahim2018-06-191-1/+1
|
* accounts/usbwallet: correct comment typo (#17008)Husam Ibrahim2018-06-191-1/+1
|
* accounts/keystore: assign schema as const instead of var (#16985)Wenbiao Zheng2018-06-141-1/+1
|
* core, eth: minor txpool event cleanupsPéter Szilágyi2018-05-181-1/+1
|
* all: collate new transaction events togetherrjl4934564422018-05-181-1/+1
|
* 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 .