good morning!!!!

Skip to content
Snippets Groups Projects
  1. Aug 07, 2020
    • Péter Szilágyi's avatar
    • Péter Szilágyi's avatar
      core/vm: use pointers to operations vs. copy by value · 4701dcb5
      Péter Szilágyi authored
      # Conflicts:
      #	core/vm/interpreter.go
      4701dcb5
    • Nikola Madjarevic's avatar
      core: raise gas limit in --dev mode, seed blake precompile (#21323) · c0a26827
      Nikola Madjarevic authored
      * Set gasLimit in --dev mode to be 9m.
      
      * core: Set gasLimit to 11.5 milion and add 1 wei allocation for BLAKE2b
      c0a26827
    • Martin Holst Swende's avatar
      core/vm: less allocations for various call variants (#21222) · a4b70f9e
      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>
      # Conflicts:
      #	core/state/statedb.go
      #	core/vm/contracts_test.go
      #	core/vm/evm.go
      #	core/vm/instructions.go
      #	core/vm/interpreter.go
      #	core/vm/logger.go
      #	core/vm/logger_json.go
      #	core/vm/logger_test.go
      #	core/vm/runtime/runtime_test.go
      #	core/vm/stack/stack.go
      #	eth/tracers/tracer.go
      #	eth/tracers/tracer_test.go
      #	trie/secure_trie.go
      a4b70f9e
    • Guillaume Ballet's avatar
      trie: quell linter in commiter.go (#21329) · 9d85e7f2
      Guillaume Ballet authored
      # Conflicts:
      #	trie/committer.go
      9d85e7f2
    • Martin Holst Swende's avatar
      core: transaction pool optimizations (#21328) · 64565f4b
      Martin Holst Swende authored
      
      * core: added local tx pool test case
      
      * core, crypto: various allocation savings regarding tx handling
      
      * core/txlist, txpool: save a reheap operation, avoid some bigint allocs
      
      Co-authored-by: default avatarMarius van der Wijden <m.vanderwijden@live.de>
      64565f4b
    • rene's avatar
      cmd/clef: change --rpcport to --http.port and update flags in docs (#21318) · 3f477027
      rene authored
      # Conflicts:
      #	cmd/abigen/main.go
      #	cmd/checkpoint-admin/main.go
      #	cmd/clef/main.go
      #	cmd/ethkey/main.go
      #	cmd/evm/main.go
      #	cmd/geth/main.go
      #	cmd/geth/usage.go
      #	cmd/utils/flags.go
      3f477027
    • Felix Lange's avatar
      p2p/discover: require table nodes to have an IP (#21330) · 8218dc2a
      Felix Lange authored
      This fixes a corner case in discv5. The issue cannot happen in discv4
      because it performs IP checks on all incoming node information.
      8218dc2a
    • gary rong's avatar
      core/rawdb: better log messages for ancient failure (#21327) · 75102cfe
      gary rong authored
      # Conflicts:
      #	core/rawdb/database.go
      75102cfe
    • rene's avatar
      .github: Change Code Owners (#21326) · 6a3c02f9
      rene authored
      * modify code owners
      
      * add marius
      6a3c02f9
    • gary rong's avatar
    • Tien's avatar
      README.md: point Go API reference link to pkg.go.dev (#21321) · 77d9be48
      Tien authored
      # Conflicts:
      #	README.md
      77d9be48
    • libotony's avatar
      4713451b
    • Felix Lange's avatar
      light: goimports -w (#21325) · 03205d42
      Felix Lange authored
      # Conflicts:
      #	light/postprocess.go
      03205d42
    • gary rong's avatar
      les: historical data garbage collection (#19570) · 8738c902
      gary rong authored
      This change introduces garbage collection for the light client. Historical
      chain data is deleted periodically. If you want to disable the GC, use
      the --light.nopruning flag.
      # Conflicts:
      #	cmd/geth/main.go
      #	cmd/utils/flags.go
      #	core/blockchain.go
      #	core/chain_indexer.go
      #	core/chain_indexer_test.go
      #	core/chain_makers.go
      #	core/dao_test.go
      #	core/genesis.go
      #	core/rawdb/accessors_chain_test.go
      #	core/rawdb/accessors_indexes_test.go
      #	core/rawdb/freezer.go
      #	core/state/statedb_test.go
      #	eth/downloader/downloader.go
      #	eth/downloader/downloader_test.go
      #	eth/downloader/testchain_test.go
      #	eth/gen_config.go
      #	internal/ethapi/api.go
      #	internal/ethapi/backend.go
      #	les/api_backend.go
      #	les/client.go
      #	les/odr_requests.go
      #	les/odr_test.go
      #	les/request_test.go
      #	les/server.go
      #	les/sync_test.go
      #	les/test_helper.go
      #	les/ulc_test.go
      #	light/lightchain.go
      #	light/odr.go
      #	light/odr_util.go
      #	light/postprocess.go
      #	trie/database.go
      #	trie/iterator_test.go
      #	trie/trie_test.go
      8738c902
    • gary rong's avatar
      accounts/external: remove dependency on internal/ethapi (#21319) · 0cc4a219
      gary rong authored
      
      Fixes #20535
      
      Co-authored-by: default avatarFelix Lange <fjl@twurst.com>
      # Conflicts:
      #	accounts/external/backend.go
      0cc4a219
    • rene's avatar
      cmd/geth, cmd/puppeth: replace deprecated rpc and ws flags in tests and docs (#21317) · d7b893f9
      rene authored
      # Conflicts:
      #	README.md
      d7b893f9
    • Felix Lange's avatar
      common/math: use math/bits intrinsics for Safe* (#21316) · 8396d954
      Felix Lange authored
      This is a resubmit of ledgerwatch/turbo-geth#556. The performance
      benefit of this change is negligible, but it does remove a TODO.
      8396d954
    • Felix Lange's avatar
      Revert "core, txpool: less allocations when handling transactions (#21232)" · e38c354c
      Felix Lange authored
      Reverting because this change started handling account balances as
      uint64 in the transaction pool, which is incorrect.
      
      This reverts commit af5c97ae.
      
      # Conflicts:
      #	core/types/transaction.go
      e38c354c
    • Martin Holst Swende's avatar
      eth/downloader: fix peer idleness tracking when restarting state sync (#21260) · 0d23ff42
      Martin Holst Swende authored
      
      This fixes two issues with state sync restarts:
      
      When sync restarts with a new root, some peers can have in-flight requests.
      Since all peers with active requests were marked idle when exiting sync,
      the new sync would schedule more requests for those peers. When the
      response for the earlier request arrived, the new sync would reject it and
      mark the peer idle again, rendering the peer useless until it disconnected.
      
      The other issue was that peers would not be marked idle when they had
      delivered a response, but the response hadn't been processed before
      restarting the state sync. This also made the peer useless because it
      would be permanently marked busy.
      
      Co-authored-by: default avatarFelix Lange <fjl@twurst.com>
      # Conflicts:
      #	eth/downloader/downloader.go
      #	eth/downloader/statesync.go
      0d23ff42
    • ucwong's avatar
      go.mod: upgrade to github.com/golang/snappy with arm64 asm (#21304) · 38318495
      ucwong authored
      # Conflicts:
      #	go.mod
      #	go.sum
      38318495
    • Martin Holst Swende's avatar
    • chris-j-h's avatar
    • Adam Schmideg's avatar
      cmd/devp2p: add discv4 test suite (#21163) · a8123ea3
      Adam Schmideg authored
      
      This adds a test suite for discovery v4. The test suite is a port of the Hive suite for
      discovery, and will replace the current suite on Hive soon-ish. The tests can be
      run locally with this command:
      
          devp2p discv4 test -remote enode//...
      
      Co-authored-by: default avatarFelix Lange <fjl@twurst.com>
      # Conflicts:
      #	cmd/devp2p/discv4cmd.go
      #	go.sum
      a8123ea3
    • chris-j-h's avatar
      cmd/clef: Update README with external v6.0.0 & internal v7.0.1 APIs (#21298) · ca1e296e
      chris-j-h authored
      Changes include:
      * Updates response docs for `account_new`, `account_list`, `account_signTransaction`
      * Removes `account_import`, `account_export` docs
      * Adds `account_version` docs
      * Updates request docs for `ui_approveListing`, `ui_approveSignData`, `ui_showInfo`, `ui_showError`, `ui_onApprovedTx`
      * Adds `ui_approveNewAccount`, `ui_onInputRequired` docs
      ca1e296e
    • gary rong's avatar
      cmd, node: dump empty value config (#21296) · 478da39c
      gary rong authored
      478da39c
    • Felix Lange's avatar
      rlp: reduce allocations for big.Int and byte array encoding (#21291) · 483618a4
      Felix Lange authored
      This change further improves the performance of RLP encoding by removing
      allocations for big.Int and [...]byte types. I have added a new benchmark
      that measures RLP encoding of types.Block to verify that performance is
      improved.
      # Conflicts:
      #	core/types/block_test.go
      #	rlp/encode.go
      #	rlp/encode_test.go
      483618a4
    • Martin Holst Swende's avatar
      build/ci: handle split up listing (#21293) · 0b81b3f2
      Martin Holst Swende authored
      # Conflicts:
      #	build/ci.go
      0b81b3f2
    • meowsbits's avatar
      cmd/geth: allow configuring metrics HTTP server on separate endpoint (#21290) · 396937a2
      meowsbits authored
      Exposing /debug/metrics and /debug/metrics/prometheus was dependent
      on --pprof, which also exposes other HTTP APIs. This change makes it possible
      to run the metrics server on an independent endpoint without enabling pprof.
      # Conflicts:
      #	cmd/utils/flags.go
      #	internal/debug/flags.go
      #	metrics/exp/exp.go
      #	mobile/geth.go
      396937a2
    • gary rong's avatar
      eth/gasprice: lighter gas price oracle for light client (#20409) · 1a99c547
      gary rong authored
      This PR reduces the bandwidth used by the light client to compute the
      recommended gas price. The current mechanism for suggesting the price is:
      
      - retrieve recent 20 blocks
      - get the lowest gas price of these blocks
      - sort the price array and return the middle(60%) one
      
      This works for full nodes, which have all blocks available locally.
      However, this is very expensive for the light client because the light
      client needs to retrieve block bodies from the network.
      
      The PR changes the default options for light client. With the new config,
      the light client only retrieves the two latest blocks, but in order to
      collect more sample transactions, the 3 lowest prices are collected from
      each block.
      
      This PR also changes the behavior for empty blocks. If the block is empty,
      the lastest price is reused for sampling.
      
      # Conflicts:
      #	eth/gasprice/gasprice.go
      1a99c547
    • Martin Holst Swende's avatar
      les/checkpointoracle: don't lookup checkpoint more than once per minute (#21285) · 444a056f
      Martin Holst Swende authored
      * les/checkpointoracle: don't lookup checkpoint more than once per second
      
      * les/checkpoint/oracle: change oracle checktime to 1 minute
      # Conflicts:
      #	les/checkpointoracle/oracle.go
      444a056f
    • Martin Holst Swende's avatar
      ethapi: don't crash when keystore-specific methods are called but external signer used (#21279) · 5fb5d149
      Martin Holst Swende authored
      * console: prevent importRawKey from getting into CLI history
      
      * internal/ethapi: error on keystore-methods when no keystore is present
      5fb5d149
    • Martin Holst Swende's avatar
    • Martin Holst Swende's avatar
      rpc, internal/ethapi: default rpc gascap at 25M + better error message (#21229) · 5d0b4ca3
      Martin Holst Swende authored
      * rpc, internal/ethapi: default rpc gascap at 50M + better error message
      
      * eth,internal: make globalgascap uint64
      
      * core/tests: fix compilation failure
      
      * eth/config: gascap at 25M + minor review concerns
      # Conflicts:
      #	core/tx_pool_test.go
      #	internal/ethapi/api.go
      #	les/api_backend.go
      5d0b4ca3
    • Marius van der Wijden's avatar
      core, txpool: less allocations when handling transactions (#21232) · 84f3ed1b
      Marius van der Wijden authored
      
      * core: use uint64 for total tx costs instead of big.Int
      
      * core: added local tx pool test case
      
      * core, crypto: various allocation savings regarding tx handling
      
      * Update core/tx_list.go
      
      * core: added tx.GasPriceIntCmp for comparison without allocation
      
      adds a method to remove unneeded allocation in comparison to tx.gasPrice
      
      * core: handle pools full of locals better
      
      * core/tests: benchmark for tx_list
      
      * core/txlist, txpool: save a reheap operation, avoid some bigint allocs
      
      Co-authored-by: default avatarMartin Holst Swende <martin@swende.se>
      # Conflicts:
      #	common/math/integer.go
      #	core/tx_list.go
      #	core/tx_pool.go
      #	core/types/transaction.go
      84f3ed1b
    • Marius van der Wijden's avatar
      rlp: avoid list header allocation in encoder (#21274) · 6eaa9d34
      Marius van der Wijden authored
      
      List headers made up 11% of all allocations during sync. This change
      removes most of those allocations by keeping the list header values
      cached in the encoder buffer instead. Since encoder buffers are pooled,
      list headers are no longer allocated in the common case where an
      encoder buffer is available for reuse.
      
      Co-authored-by: default avatarFelix Lange <fjl@twurst.com>
      # Conflicts:
      #	rlp/encode.go
      6eaa9d34
    • Adam Schmideg's avatar
      cmd/geth: LES priority client test (#20719) · d6f7b4b9
      Adam Schmideg authored
      This adds a regression test for the LES priority client API.
      d6f7b4b9
    • Marius van der Wijden's avatar
      eth/downloader: fixes data race between synchronize and other methods (#21201) · 12de9c3f
      Marius van der Wijden authored
      * eth/downloaded: fixed datarace between synchronize and Progress
      
      There was a race condition between `downloader.synchronize()` and `Progress` `syncWithPeer` `fetchHeight` `findAncestors` and `processHeaders`
      This PR changes the behavior of the downloader a bit.
      Previously the functions `Progress` `syncWithPeer` `fetchHeight` `findAncestors` and `processHeaders` read the syncMode anew within their loops. Now they read the syncMode at the start of their function and don't change it during their runtime.
      
      * eth/downloaded: comment
      
      * eth/downloader: added comment
      # Conflicts:
      #	eth/downloader/downloader.go
      12de9c3f
    • Marius van der Wijden's avatar
      core: types: less allocations when hashing and tx handling (#21265) · 9de56002
      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>
      # Conflicts:
      #	core/tx_list.go
      #	core/tx_pool.go
      #	core/types/block.go
      #	core/types/transaction.go
      #	trie/committer.go
      #	trie/hasher.go
      9de56002
    • Martin Holst Swende's avatar
      cmd/evm: add state transition tool for testing (#20958) · 14e3fda7
      Martin Holst Swende authored
      
      This PR implements the EVM state transition tool, which is intended
      to be the replacement for our retesteth client implementation.
      Documentation is present in the cmd/evm/README.md file.
      
      Co-authored-by: default avatarFelix Lange <fjl@twurst.com>
      # Conflicts:
      #	cmd/evm/main.go
      #	core/state/dump.go
      #	core/state/state_test.go
      #	tests/state_test_util.go
      14e3fda7
Loading