1. 05 Nov, 2021 1 commit
    • Sina Mahmoodi's avatar
      eth/tracers: support for golang tracers + add golang callTracer (#23708) · 8d7e6062
      Sina Mahmoodi authored
      * eth/tracers: add basic native loader
      
      * eth/tracers: add GetResult to tracer interface
      
      * eth/tracers: add native call tracer
      
      * eth/tracers: fix call tracer json result
      
      * eth/tracers: minor fix
      
      * eth/tracers: fix
      
      * eth/tracers: fix benchTracer
      
      * eth/tracers: test native call tracer
      
      * eth/tracers: fix
      
      * eth/tracers: rm extra make
      Co-authored-by: 's avatarMartin Holst Swende <martin@swende.se>
      
      * eth/tracers: rm extra make
      
      * eth/tracers: make callFrame private
      
      * eth/tracers: clean-up and comments
      
      * eth/tracers: add license
      
      * eth/tracers: rework the model a bit
      
      * eth/tracers: move tracecall tests to subpackage
      
      * cmd/geth: load native tracers
      
      * eth/tracers: minor fix
      
      * eth/tracers: impl stop
      
      * eth/tracers: add native noop tracer
      
      * renamings
      Co-authored-by: 's avatarMartin Holst Swende <martin@swende.se>
      
      * eth/tracers: more renamings
      
      * eth/tracers: make jstracer non-exported, avoid cast
      
      * eth/tracers, core/vm: rename vm.Tracer to vm.EVMLogger for clarity
      
      * eth/tracers: minor comment fix
      
      * eth/tracers/testing: lint nitpicks
      
      * core,eth: cancel evm on nativecalltracer stop
      
      * Revert "core,eth: cancel evm on nativecalltracer stop"
      
      This reverts commit 01bb908790a369c1bb9d3937df9325c6857bf855.
      
      * eth/tracers: linter nits
      
      * eth/tracers: fix output on err
      Co-authored-by: 's avatarMartin Holst Swende <martin@swende.se>
      8d7e6062
  2. 13 Sep, 2021 1 commit
  3. 06 Jul, 2021 1 commit
  4. 12 May, 2021 1 commit
  5. 25 Nov, 2020 1 commit
  6. 16 Jul, 2020 1 commit
    • Martin Holst Swende's avatar
      core/vm: less allocations for various call variants (#21222) · 29569375
      Martin Holst Swende authored
      * core/vm/runtime/tests: add more benchmarks
      
      * core/vm: initial work on improving alloc count for calls to precompiles
      
      name                                  old time/op    new time/op    delta
      SimpleLoop/identity-precompile-10M-6     117ms ±75%      43ms ± 1%  -63.09%  (p=0.008 n=5+5)
      SimpleLoop/loop-10M-6                   79.6ms ± 4%    70.5ms ± 1%  -11.42%  (p=0.008 n=5+5)
      
      name                                  old alloc/op   new alloc/op   delta
      SimpleLoop/identity-precompile-10M-6    24.4MB ± 0%     4.9MB ± 0%  -79.94%  (p=0.008 n=5+5)
      SimpleLoop/loop-10M-6                   13.2kB ± 0%    13.2kB ± 0%     ~     (p=0.357 n=5+5)
      
      name                                  old allocs/op  new allocs/op  delta
      SimpleLoop/identity-precompile-10M-6      382k ± 0%      153k ± 0%  -59.99%  (p=0.000 n=5+4)
      SimpleLoop/loop-10M-6                     40.0 ± 0%      40.0 ± 0%     ~     (all equal)
      
      * core/vm: don't allocate big.int for touch
      
      name                                  old time/op    new time/op    delta
      SimpleLoop/identity-precompile-10M-6    43.3ms ± 1%    42.4ms ± 7%     ~     (p=0.151 n=5+5)
      SimpleLoop/loop-10M-6                   70.5ms ± 1%    76.7ms ± 1%   +8.67%  (p=0.008 n=5+5)
      
      name                                  old alloc/op   new alloc/op   delta
      SimpleLoop/identity-precompile-10M-6    4.90MB ± 0%    2.46MB ± 0%  -49.83%  (p=0.008 n=5+5)
      SimpleLoop/loop-10M-6                   13.2kB ± 0%    13.2kB ± 1%     ~     (p=0.571 n=5+5)
      
      name                                  old allocs/op  new allocs/op  delta
      SimpleLoop/identity-precompile-10M-6      153k ± 0%       76k ± 0%  -49.98%  (p=0.029 n=4+4)
      SimpleLoop/loop-10M-6                     40.0 ± 0%      40.0 ± 0%     ~     (all equal)
      
      * core/vm: reduce allocs in staticcall
      
      name                                  old time/op    new time/op    delta
      SimpleLoop/identity-precompile-10M-6    42.4ms ± 7%    37.5ms ± 6%  -11.68%  (p=0.008 n=5+5)
      SimpleLoop/loop-10M-6                   76.7ms ± 1%    69.1ms ± 1%   -9.82%  (p=0.008 n=5+5)
      
      name                                  old alloc/op   new alloc/op   delta
      SimpleLoop/identity-precompile-10M-6    2.46MB ± 0%    0.02MB ± 0%  -99.35%  (p=0.008 n=5+5)
      SimpleLoop/loop-10M-6                   13.2kB ± 1%    13.2kB ± 0%     ~     (p=0.143 n=5+5)
      
      name                                  old allocs/op  new allocs/op  delta
      SimpleLoop/identity-precompile-10M-6     76.4k ± 0%      0.1k ± 0%     ~     (p=0.079 n=4+5)
      SimpleLoop/loop-10M-6                     40.0 ± 0%      40.0 ± 0%     ~     (all equal)
      
      * trie: better use of hasher keccakState
      
      * core/state/statedb: reduce allocations in getDeletedStateObject
      
      * core/vm: reduce allocations in all call derivates
      
      * core/vm: reduce allocations in call variants
      
      - Make returnstack `uint32`
      - Use a `sync.Pool` of `stack`s
      
      * core/vm: fix tests
      
      * core/vm: goimports
      
      * core/vm: tracer fix + staticcall gas fix
      
      * core/vm: add back snapshot to staticcall
      
      * core/vm: review concerns + make returnstack pooled + enable returndata in traces
      
      * core/vm: fix some test tracer method signatures
      
      * core/vm: run gencodec, minor comment polish
      Co-authored-by: 's avatarPéter Szilágyi <peterke@gmail.com>
      29569375
  7. 01 Apr, 2020 1 commit
    • Paweł Bylica's avatar
      cmd/evm: Rework execution stats (#20792) · d56dc038
      Paweł Bylica authored
      - Dump stats also for --bench flag.
      - From memory stats only show number and size of allocations. This is what `test -bench` shows. I doubt others like number of GC runs are any useful, but can be added if requested.
      - Now the mem stats are for single execution in case of --bench.
      d56dc038
  8. 25 Feb, 2020 1 commit
  9. 18 Dec, 2019 1 commit
  10. 17 Nov, 2019 1 commit
  11. 28 Oct, 2019 1 commit
  12. 13 Sep, 2019 1 commit
  13. 25 Jun, 2019 1 commit
  14. 24 Jun, 2019 1 commit
  15. 06 Mar, 2019 1 commit
  16. 16 Jan, 2019 1 commit
  17. 10 Dec, 2018 1 commit
  18. 29 Nov, 2018 1 commit
  19. 20 Sep, 2018 1 commit
  20. 01 Aug, 2018 1 commit
  21. 31 Jul, 2018 1 commit
  22. 09 May, 2018 1 commit
  23. 02 May, 2018 1 commit
  24. 10 Apr, 2018 1 commit
    • Felix Lange's avatar
      common: delete StringToAddress, StringToHash (#16436) · c7ab3e55
      Felix Lange authored
      * common: delete StringToAddress, StringToHash
      
      These functions are confusing because they don't parse hex, but use the
      bytes of the string. This change removes them, replacing all uses of
      StringToAddress(s) by BytesToAddress([]byte(s)).
      
      * eth/filters: remove incorrect use of common.BytesToAddress
      c7ab3e55
  25. 06 Apr, 2018 1 commit
  26. 05 Mar, 2018 1 commit
  27. 05 Feb, 2018 1 commit
  28. 23 Aug, 2017 1 commit
  29. 15 Aug, 2017 1 commit
  30. 27 Jun, 2017 1 commit
    • Felix Lange's avatar
      core/state: access trie through Database interface, track errors (#14589) · 9e5f03b6
      Felix Lange authored
      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).
      9e5f03b6
  31. 21 Jun, 2017 1 commit
  32. 07 Jun, 2017 1 commit
  33. 23 May, 2017 1 commit
  34. 01 Mar, 2017 3 commits
  35. 27 Feb, 2017 1 commit
  36. 26 Feb, 2017 1 commit
    • Felix Lange's avatar
      common: move big integer math to common/math (#3699) · 5c8fe28b
      Felix Lange authored
      * 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
      5c8fe28b
  37. 23 Feb, 2017 1 commit
  38. 22 Feb, 2017 1 commit