good morning!!!!

Skip to content
Snippets Groups Projects
  1. Feb 25, 2021
    • 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: default avatarMartin Holst Swende <martin@swende.se>
      Co-authored-by: default avatarFelix Lange <fjl@twurst.com>
      Co-authored-by: default avatarRyan Schneider <ryanleeschneider@gmail.com>
      bbfb1e40
  2. Feb 16, 2021
  3. Feb 08, 2021
    • Gary Rong's avatar
      all: bloom-filter based pruning mechanism (#21724) · f566dd30
      Gary Rong authored
      
      * cmd, core, tests: initial state pruner
      
      core: fix db inspector
      
      cmd/geth: add verify-state
      
      cmd/geth: add verification tool
      
      core/rawdb: implement flatdb
      
      cmd, core: fix rebase
      
      core/state: use new contract code layout
      
      core/state/pruner: avoid deleting genesis state
      
      cmd/geth: add helper function
      
      core, cmd: fix extract genesis
      
      core: minor fixes
      
      contracts: remove useless
      
      core/state/snapshot: plugin stacktrie
      
      core: polish
      
      core/state/snapshot: iterate storage concurrently
      
      core/state/snapshot: fix iteration
      
      core: add comments
      
      core/state/snapshot: polish code
      
      core/state: polish
      
      core/state/snapshot: rebase
      
      core/rawdb: add comments
      
      core/rawdb: fix tests
      
      core/rawdb: improve tests
      
      core/state/snapshot: fix concurrent iteration
      
      core/state: run pruning during the recovery
      
      core, trie: implement martin's idea
      
      core, eth: delete flatdb and polish pruner
      
      trie: fix import
      
      core/state/pruner: add log
      
      core/state/pruner: fix issues
      
      core/state/pruner: don't read back
      
      core/state/pruner: fix contract code write
      
      core/state/pruner: check root node presence
      
      cmd, core: polish log
      
      core/state: use HEAD-127 as the target
      
      core/state/snapshot: improve tests
      
      cmd/geth: fix verification tool
      
      cmd/geth: use HEAD as the verification default target
      
      all: replace the bloomfilter with martin's fork
      
      cmd, core: polish code
      
      core, cmd: forcibly delete state root
      
      core/state/pruner: add hash64
      
      core/state/pruner: fix blacklist
      
      core/state: remove blacklist
      
      cmd, core: delete trie clean cache before pruning
      
      cmd, core: fix lint
      
      cmd, core: fix rebase
      
      core/state: fix the special case for clique networks
      
      core/state/snapshot: remove useless code
      
      core/state/pruner: capping the snapshot after pruning
      
      cmd, core, eth: fixes
      
      core/rawdb: update db inspector
      
      cmd/geth: polish code
      
      core/state/pruner: fsync bloom filter
      
      cmd, core: print warning log
      
      core/state/pruner: adjust the parameters for bloom filter
      
      cmd, core: create the bloom filter by size
      
      core: polish
      
      core/state/pruner: sanitize invalid bloomfilter size
      
      cmd: address comments
      
      cmd/geth: address comments
      
      cmd/geth: address comment
      
      core/state/pruner: address comments
      
      core/state/pruner: rename homedir to datadir
      
      cmd, core: address comments
      
      core/state/pruner: address comment
      
      core/state: address comments
      
      core, cmd, tests: address comments
      
      core: address comments
      
      core/state/pruner: release the iterator after each commit
      
      core/state/pruner: improve pruner
      
      cmd, core: adjust bloom paramters
      
      core/state/pruner: fix lint
      
      core/state/pruner: fix tests
      
      core: fix rebase
      
      core/state/pruner: remove atomic rename
      
      core/state/pruner: address comments
      
      all: run go mod tidy
      
      core/state/pruner: avoid false-positive for the middle state roots
      
      core/state/pruner: add checks for middle roots
      
      cmd/geth: replace crit with error
      
      * core/state/pruner: fix lint
      
      * core: drop legacy bloom filter
      
      * core/state/snapshot: improve pruner
      
      * core/state/snapshot: polish concurrent logs to report ETA vs. hashes
      
      * core/state/pruner: add progress report for pruning and compaction too
      
      * core: fix snapshot test API
      
      * core/state: fix some pruning logs
      
      * core/state/pruner: support recovering from bloom flush fail
      
      Co-authored-by: default avatarPéter Szilágyi <peterke@gmail.com>
      f566dd30
  4. Feb 02, 2021
    • Alex Prut's avatar
      all: remove unneeded parentheses (#21921) · ef84da84
      Alex Prut authored
      * remove uneeded convertion type
      
      * remove redundant type in composite literal
      
      * omit explicit type where implicit
      
      * remove unused redundant parenthesis
      
      * remove redundant import alias duktape
      ef84da84
  5. Jan 22, 2021
  6. Jan 12, 2021
  7. Jan 07, 2021
  8. Dec 14, 2020
  9. Dec 10, 2020
  10. Nov 25, 2020
  11. Nov 19, 2020
  12. Nov 18, 2020
  13. Nov 09, 2020
    • Martin Holst Swende's avatar
      trie, tests/fuzzers: implement a stacktrie fuzzer + stacktrie fixes (#21799) · 81678971
      Martin Holst Swende authored
      * trie: fix error in stacktrie not committing small roots
      
      * fuzzers: make trie-fuzzer use correct returnvalues
      
      * trie: improved tests
      
      * tests/fuzzers: fuzzer for stacktrie vs regular trie
      
      * test/fuzzers: make stacktrie fuzzer use 32-byte keys
      
      * trie: fix error in stacktrie with small nodes
      
      * trie: add (skipped) testcase for stacktrie
      
      * tests/fuzzers: address review comments for stacktrie fuzzer
      
      * trie: fix docs in stacktrie
      81678971
  14. Oct 13, 2020
  15. Oct 12, 2020
  16. Sep 30, 2020
  17. Sep 29, 2020
    • Guillaume Ballet's avatar
      trie: use stacktrie for Derivesha operation (#21407) · 6c8310eb
      Guillaume Ballet authored
      
      core/types: use stacktrie for derivesha
      
      trie: add stacktrie file
      
      trie: fix linter
      
      core/types: use stacktrie for derivesha
      
      rebased: adapt stacktrie to the newer version of DeriveSha
      
      Co-authored-by: default avatarMartin Holst Swende <martin@swende.se>
      
      More linter fixes
      
      review feedback: no key offset for nodes converted to hashes
      
      trie: use EncodeRLP for full nodes
      
      core/types: insert txs in order in derivesha
      
      trie: tests for derivesha with stacktrie
      
      trie: make stacktrie use pooled hashers
      
      trie: make stacktrie reuse tmp slice space
      
      trie: minor polishes on stacktrie
      
      trie/stacktrie: less rlp dancing
      
      core/types: explain the contorsions in DeriveSha
      
      ci: fix goimport errors
      
      trie: clear mem on subtrie hashing
      
      squashme: linter fix
      
      stracktrie: use pooling, less allocs (#3)
      
      trie: in-place hex prefix, reduce allocs and add rawNode.EncodeRLP
      
      Reintroduce the `[]node` method, add the missing `EncodeRLP` implementation for `rawNode` and calculate the hex prefix in place.
      
      Co-authored-by: default avatarMartin Holst Swende <martin@swende.se>
      
      Co-authored-by: default avatarMartin Holst Swende <martin@swende.se>
      6c8310eb
  18. Sep 23, 2020
  19. Sep 02, 2020
  20. Aug 26, 2020
  21. Aug 21, 2020
  22. Aug 20, 2020
    • Péter Szilágyi's avatar
      core: define and test chain rewind corner cases (#21409) · 8cbdc863
      Péter Szilágyi authored
      * core: define and test chain reparation cornercases
      
      * core: write up a variety of set-head tests
      
      * core, eth: unify chain rollbacks, handle all the cases
      
      * core: make linter smile
      
      * core: remove commented out legacy code
      
      * core, eth/downloader: fix review comments
      
      * core: revert a removed recovery mechanism
      8cbdc863
  23. Jul 28, 2020
  24. Jul 16, 2020
    • 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: default avatarPéter Szilágyi <peterke@gmail.com>
      29569375
  25. Jul 15, 2020
  26. Jul 13, 2020
  27. Jun 30, 2020
    • Marius van der Wijden's avatar
      core: types: less allocations when hashing and tx handling (#21265) · ddeea1e0
      Marius van der Wijden authored
      
      * core, crypto: various allocation savings regarding tx handling
      
      * core: reduce allocs for gas price comparison
      
      This change reduces the allocations needed for comparing different transactions to each other.
      A call to `tx.GasPrice()` copies the gas price as it has to be safe against modifications and
      also needs to be threadsafe. For comparing and ordering different transactions we don't need
      these guarantees
      
      * core: added tx.GasPriceIntCmp for comparison without allocation
      
      adds a method to remove unneeded allocation in comparison to tx.gasPrice
      
      * core/types: pool legacykeccak256 objects in rlpHash
      
      rlpHash is by far the most used function in core that allocates a legacyKeccak256 object on each call.
      Since it is so widely used it makes sense to add pooling here so we relieve the GC.
      On my machine these changes result in > 100 MILLION less allocations and > 30 GB less allocated memory.
      
      * reverted some changes
      
      * reverted some changes
      
      * trie: use crypto.KeccakState instead of replicating code
      
      Co-authored-by: default avatarMartin Holst Swende <martin@swende.se>
      ddeea1e0
  28. Jun 24, 2020
  29. May 27, 2020
  30. May 26, 2020
  31. May 25, 2020
  32. May 20, 2020
  33. May 06, 2020
  34. Apr 24, 2020
  35. Apr 15, 2020
Loading