1. 09 12月, 2020 1 次提交
    • L
      common: improve printing of Hash and Address (#21834) · bd848aad
      Li, Cheng 提交于
      Both Hash and Address have a String method, which returns the value as
      hex with 0x prefix. They also had a Format method which tried to print
      the value using printf of []byte. The way Format worked was at odds with
      String though, leading to a situation where fmt.Sprintf("%v", hash)
      returned the decimal notation and hash.String() returned a hex string.
      
      This commit makes it consistent again. Both types now support the %v,
      %s, %q format verbs for 0x-prefixed hex output. %x, %X creates
      unprefixed hex output. %d is also supported and returns the decimal
      notation "[1 2 3...]".
      
      For Address, the case of hex characters in %v, %s, %q output is
      determined using the EIP-55 checksum. Using %x, %X with Address
      disables checksumming.
      Co-authored-by: NFelix Lange <fjl@twurst.com>
      bd848aad
  2. 12 3月, 2019 1 次提交
    • M
      core/vm: 64 bit memory and gas calculations (#19210) · 7504dbd6
      Martin Holst Swende 提交于
      * core/vm: remove function call for stack validation from evm runloop
      
      * core/vm: separate gas  calc into static + dynamic
      
      * core/vm: optimize push1
      
      * core/vm: reuse pooled bigints for ADDRESS, ORIGIN and CALLER
      
      * core/vm: use generic error message for jump/jumpi, to avoid string interpolation
      
      * testdata: fix tests for new error message
      
      * core/vm: use 64-bit memory calculations
      
      * core/vm: fix error in memory calculation
      
      * core/vm: address review concerns
      
      * core/vm: avoid unnecessary use of big.Int:BitLen()
      7504dbd6
  3. 24 7月, 2018 1 次提交
  4. 16 4月, 2018 1 次提交
    • M
      cmd/clef, signer: initial poc of the standalone signer (#16154) · ec3db0f5
      Martin Holst Swende 提交于
      * 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
      ec3db0f5
  5. 05 12月, 2017 1 次提交
  6. 16 7月, 2017 1 次提交
  7. 27 6月, 2017 1 次提交
    • F
      common/hexutil: wrap errors in json.UnmarshalTypeError · 4a741df7
      Felix Lange 提交于
      This adds type and struct field context to error messages.
      Instead of "hex string of odd length" users will now see "json: cannot
      unmarshal hex string of odd length into Go struct field SendTxArgs.from
      of type common.Address".
      4a741df7
  8. 02 3月, 2017 1 次提交
    • F
      common/hexutil: implement TextMarshaler, TextUnmarshaler · d304da38
      Felix Lange 提交于
      This commit makes the wrapper types more generally applicable.
      encoding.TextMarshaler is supported by most codec implementations (e.g.
      for yaml).
      
      The tests now ensure that package json actually recognizes the custom
      marshaler implementation irrespective of how it is implemented.
      
      The Uint type has new tests, too. These are tricky because uint size
      depends on the CPU word size. Turns out that there was one incorrect
      case where decoding returned ErrUint64Range instead of ErrUintRange.
      d304da38
  9. 28 11月, 2016 1 次提交
  10. 26 4月, 2016 1 次提交
  11. 01 4月, 2016 1 次提交
  12. 24 7月, 2015 1 次提交
  13. 23 7月, 2015 1 次提交
  14. 07 7月, 2015 1 次提交
  15. 17 3月, 2015 1 次提交