1. 17 May, 2021 1 commit
  2. 21 Apr, 2021 2 commits
  3. 07 Apr, 2021 1 commit
    • Marius van der Wijden's avatar
      core, eth, internal/ethapi: create access list RPC API (#22550) · 9d10856e
      Marius van der Wijden authored
      * core/vm: implement AccessListTracer
      
      * eth: implement debug.createAccessList
      
      * core/vm: fixed nil panics in accessListTracer
      
      * eth: better error messages for createAccessList
      
      * eth: some fixes on CreateAccessList
      
      * eth: allow for provided accesslists
      
      * eth: pass accesslist by value
      
      * eth: remove created acocunt from accesslist
      
      * core/vm: simplify access list tracer
      
      * core/vm: unexport accessListTracer
      
      * eth: return best guess if al iteration times out
      
      * eth: return best guess if al iteration times out
      
      * core: docstring, unexport methods
      
      * eth: typo
      
      * internal/ethapi: move createAccessList to eth package
      
      * internal/ethapi: remove reexec from createAccessList
      
      * internal/ethapi: break if al is equal to last run, not if gas is equal
      
      * internal/web3ext: fixed arguments
      
      * core/types: fixed equality check for accesslist
      
      * core/types: no hardcoded vals
      
      * core, internal: simplify access list generation, make it precise
      
      * core/vm: fix typo
      Co-authored-by: 's avatarMartin Holst Swende <martin@swende.se>
      Co-authored-by: 's avatarPéter Szilágyi <peterke@gmail.com>
      9d10856e
  4. 06 Apr, 2021 1 commit
  5. 25 Feb, 2021 1 commit
    • lightclient's avatar
      all: add support for EIP-2718, EIP-2930 transactions (#21502) · bbfb1e40
      lightclient authored
      This adds support for EIP-2718 typed transactions as well as EIP-2930
      access list transactions (tx type 1). These EIPs are scheduled for the
      Berlin fork.
      
      There very few changes to existing APIs in core/types, and several new APIs
      to deal with access list transactions. In particular, there are two new
      constructor functions for transactions: types.NewTx and types.SignNewTx.
      Since the canonical encoding of typed transactions is not RLP-compatible,
      Transaction now has new methods for encoding and decoding: MarshalBinary
      and UnmarshalBinary.
      
      The existing EIP-155 signer does not support the new transaction types.
      All code dealing with transaction signatures should be updated to use the
      newer EIP-2930 signer. To make this easier for future updates, we have
      added new constructor functions for types.Signer: types.LatestSigner and
      types.LatestSignerForChainID. 
      
      This change also adds support for the YoloV3 testnet.
      Co-authored-by: 's avatarMartin Holst Swende <martin@swende.se>
      Co-authored-by: 's avatarFelix Lange <fjl@twurst.com>
      Co-authored-by: 's avatarRyan Schneider <ryanleeschneider@gmail.com>
      bbfb1e40
  6. 23 Feb, 2021 1 commit
  7. 05 Feb, 2021 2 commits
  8. 26 Jan, 2021 1 commit
  9. 23 Dec, 2020 1 commit
  10. 14 Dec, 2020 1 commit
  11. 25 Nov, 2020 1 commit
  12. 04 Nov, 2020 1 commit
    • Marius van der Wijden's avatar
      common: remove ToHex and ToHexArray (#21610) · 3eebf340
      Marius van der Wijden authored
      ToHex was deprecated a couple years ago. The last remaining use
      was in ToHexArray, which itself only had a single call site.
      
      This just moves ToHexArray near its only remaining call site and
      implements it using hexutil.Encode. This changes the default behaviour
      of ToHexArray and with it the behaviour of eth_getProof. Previously we
      encoded an empty slice as 0, now the empty slice is encoded as 0x.
      3eebf340
  13. 23 Sep, 2020 2 commits
  14. 20 Jul, 2020 1 commit
  15. 13 Jul, 2020 2 commits
  16. 02 Jul, 2020 2 commits
  17. 01 Jul, 2020 1 commit
  18. 17 Jun, 2020 1 commit
  19. 10 Jun, 2020 1 commit
  20. 08 Jun, 2020 1 commit
    • Marius van der Wijden's avatar
      internal/ethapi: return revert reason for eth_call (#21083) · 0b3f3be2
      Marius van der Wijden authored
      * internal/ethapi: return revert reason for eth_call
      
      * internal/ethapi: moved revert reason logic to doCall
      
      * accounts/abi/bind/backends: added revert reason logic to simulated backend
      
      * internal/ethapi: fixed linting error
      
      * internal/ethapi: check if require reason can be unpacked
      
      * internal/ethapi: better error logic
      
      * internal/ethapi: simplify logic
      
      * internal/ethapi: return vmError()
      
      * internal/ethapi: move handling of revert out of docall
      
      * graphql: removed revert logic until spec change
      
      * rpc: internal/ethapi: added custom error types
      
      * graphql: use returndata instead of return
      
      Return() checks if there is an error. If an error is found, we return nil.
      For most use cases it can be beneficial to return the output even if there
      was an error. This code should be changed anyway once the spec supports
      error reasons in graphql responses
      
      * accounts/abi/bind/backends: added tests for revert reason
      
      * internal/ethapi: add errorCode to revert error
      
      * internal/ethapi: add errorCode of 3 to revertError
      
      * internal/ethapi: unified estimateGasErrors, simplified logic
      
      * internal/ethapi: unified handling of errors in DoEstimateGas
      
      * rpc: print error data field
      
      * accounts/abi/bind/backends: unify simulatedBackend and RPC
      
      * internal/ethapi: added binary data to revertError data
      
      * internal/ethapi: refactored unpacking logic into newRevertError
      
      * accounts/abi/bind/backends: fix EstimateGas
      
      * accounts, console, internal, rpc: minor error interface cleanups
      
      * Revert "accounts, console, internal, rpc: minor error interface cleanups"
      
      This reverts commit 2d3ef53c5304e429a04983210a417c1f4e0dafb7.
      
      * re-apply the good parts of 2d3ef53c53
      
      * rpc: add test for returning server error data from client
      Co-authored-by: 's avatarrjl493456442 <garyrong0905@gmail.com>
      Co-authored-by: 's avatarPéter Szilágyi <peterke@gmail.com>
      Co-authored-by: 's avatarFelix Lange <fjl@twurst.com>
      0b3f3be2
  21. 25 May, 2020 1 commit
  22. 11 May, 2020 1 commit
  23. 22 Apr, 2020 1 commit
    • gary rong's avatar
      all: seperate consensus error and evm internal error (#20830) · b9df7ecd
      gary rong authored
      * all: seperate consensus error and evm internal error
      
      There are actually two types of error will be returned when
      a tranaction/message call is executed: (a) consensus error
      (b) evm internal error. The former should be converted to
      a consensus issue, e.g. The sender doesn't enough asset to
      purchase the gas it specifies. The latter is allowed since
      evm itself is a blackbox and internal error is allowed to happen.
      
      This PR emphasizes the difference by introducing a executionResult
      structure. The evm error is embedded inside. So if any error
      returned, it indicates consensus issue happens.
      
      And also this PR improve the `EstimateGas` API to return the concrete
      revert reason if the transaction always fails
      
      * all: polish
      
      * accounts/abi/bind/backends: add tests
      
      * accounts/abi/bind/backends, internal: cleanup error message
      
      * all: address comments
      
      * core: fix lint
      
      * accounts, core, eth, internal: address comments
      
      * accounts, internal: resolve revert reason if possible
      
      * accounts, internal: address comments
      b9df7ecd
  24. 03 Apr, 2020 1 commit
    • William Morriss's avatar
      internal/ethapi: add CallArgs.ToMessage method (#20854) · 3cf7d2e9
      William Morriss authored
      ToMessage is used to convert between ethapi.CallArgs and types.Message.
      It reduces the length of the DoCall method by about half by abstracting out
      the conversion between the CallArgs and the Message. This should improve the
      code's maintainability and reusability.
      3cf7d2e9
  25. 23 Mar, 2020 1 commit
    • Martin Holst Swende's avatar
      internal/ethapi: don't set sender-balance to maxuint, fixes #16999 (#20783) · 39f50232
      Martin Holst Swende authored
      Prior to this change, eth_call changed the balance of the sender account in the
      EVM environment to 2^256 wei to cover the gas cost of the call execution.
      We've had this behavior for a long time even though it's super confusing.
      
      This commit sets the default call gasprice to zero instead of updating the balance,
      which is better because it makes eth_call semantics less surprising. Removing
      the built-in balance assignment also makes balance overrides work as expected.
      39f50232
  26. 25 Feb, 2020 1 commit
  27. 07 Feb, 2020 1 commit
  28. 06 Jan, 2020 1 commit
  29. 29 Nov, 2019 1 commit
  30. 17 Nov, 2019 1 commit
  31. 26 Sep, 2019 1 commit
  32. 22 Aug, 2019 1 commit
  33. 08 Aug, 2019 3 commits