1. 03 Jan, 2023 5 commits
  2. 29 Dec, 2022 1 commit
  3. 28 Dec, 2022 2 commits
  4. 27 Dec, 2022 1 commit
  5. 21 Dec, 2022 1 commit
  6. 20 Dec, 2022 1 commit
    • Martin Holst Swende's avatar
      tests: update tests (#26314) · b818e73e
      Martin Holst Swende authored
      This PR builds on #26299, but also updates the tests to the most recent version, which includes tests regarding TheMerge.
      
      This change adds checks to the beacon consensus engine, making it more strict in validating the pre- and post-headers, and not relying on the caller to have already correctly sanitized the headers/blocks. 
      b818e73e
  7. 19 Dec, 2022 2 commits
    • rjl493456442's avatar
      core/rawdb: implement resettable freezer (#26324) · 79a478bb
      rjl493456442 authored
      This PR implements resettable freezer by adding a ResettableFreezer wrapper.
      
      The resettable freezer wraps the original freezer in a way that makes it possible to ensure atomic resets. Implementation wise, it relies on the os.Rename and os.RemoveAll to atomically delete the original freezer data and re-create a new one from scratch. 
      79a478bb
    • rjl493456442's avatar
      trie: wrap deletion in case trie.root is nil (#26365) · d3411b9f
      rjl493456442 authored
      This PR fixes an error in trie commit. If the trie.root is nil, it can be two possible scenarios:
      
      -  The trie was empty, and no change happens
      -  The trie was non-empty and all nodes are dropped
      
      For the latter one, we should collect the deletions and apply them into database(e.g. in PBSS).
      d3411b9f
  8. 15 Dec, 2022 1 commit
  9. 14 Dec, 2022 2 commits
  10. 13 Dec, 2022 3 commits
  11. 10 Dec, 2022 1 commit
  12. 09 Dec, 2022 3 commits
    • Felix Lange's avatar
      event: add FeedOf[T] (#26310) · 3775e198
      Felix Lange authored
      This PR adds a new type event.FeedOf[T], which is like event.Feed but parameterized
      over the channel element type. Performance is unchanged, and it still uses reflect. But
      unlike Feed, the generic version doesn't need to type-check interface{} arguments.
      All panic cases are gone from the API.
      3775e198
    • Felix Lange's avatar
      core: pass block into collectLogs (#26335) · 3315bad2
      Felix Lange authored
      While investigating another issue, I found that all callers of collectLogs have the
      complete block available. rawdb.ReadReceipts loads the block from the database,
      so it is better to use ReadRawReceipts here, and derive the receipt information using
      the block which is already in memory.
      3315bad2
    • Sina Mahmoodi's avatar
      core,eth: add `debug_setTrieFlushInterval` to change trie flush frequency (#24785) · 711afbc7
      Sina Mahmoodi authored
      This PR makes it possible to modify the flush interval time via RPC. On one extreme, `0s`, it would act as an archive node. If set to `1h`, means that after one hour of effective block processing time, the trie would be flushed. If one block takes 200ms, this means that a flush would occur every `5*3600=18000`  blocks -- however, if the memory size of the cached states grows too large, it will flush sooner. 
      
      Essentially, this makes it possible to configure the node to be more or less "archive:ish", and without restarting the node while reconfiguring it.  
      711afbc7
  13. 08 Dec, 2022 1 commit
    • rjl493456442's avatar
      eth, cmd: remove syncTarget from eth config (#26330) · 890e2efc
      rjl493456442 authored
      --syncTarget is a feature for development purpose in post-merge world. Previously
      it's added into eth.Config. But it turns out that's a stupid idea.
      
      - syncTarget is a block object, which is hard to be put in config file(large)
      - syncTarget is just a dev feature, doesn't make too much sense to add it in config file
      
      So I remove it from the eth config object. And it also fixes the #26328
      890e2efc
  14. 07 Dec, 2022 4 commits
    • zhiqiangxu's avatar
      p2p/discover: improve nodesByDistance.push code (#26019) · a9dfac03
      zhiqiangxu authored
      This improves readability of function 'push'.
      
      sort.Search(N, ...) will at most return N when no match, so ix should be compared
      with N. The previous version would compare ix with N+1 in case an additional item
      was appended. No bug resulted from this comparison, but it's not easy to understand
      why.
      Co-authored-by: 's avatarFelix Lange <fjl@twurst.com>
      a9dfac03
    • Sina Mahmoodi's avatar
      core: fix state flushing for catalyst mode (#26319) · 68912887
      Sina Mahmoodi authored
      The gcproc field tracks the amount of time spent processing blocks,
      and is used to trigger a state flush to disk when a certain threshold is
      reached. After the merge, single block insertion by CL is the most
      common source of block processing time, but this time was not added
      into gcproc.
      68912887
    • Seungbae Yu's avatar
    • Sina Mahmoodi's avatar
      graphql, node, rpc: improve HTTP write timeout handling (#25457) · f20eba42
      Sina Mahmoodi authored
      Here we add special handling for sending an error response when the write timeout of the
      HTTP server is just about to expire. This is surprisingly difficult to get right, since is
      must be ensured that all output is fully flushed in time, which needs support from
      multiple levels of the RPC handler stack:
      
      The timeout response can't use chunked transfer-encoding because there is no way to write
      the final terminating chunk. net/http writes it when the topmost handler returns, but the
      timeout will already be over by the time that happens. We decided to disable chunked
      encoding by setting content-length explicitly.
      
      Gzip compression must also be disabled for timeout responses because we don't know the
      true content-length before compressing all output, i.e. compression would reintroduce
      chunked transfer-encoding.
      f20eba42
  15. 06 Dec, 2022 1 commit
    • Felix Lange's avatar
      cmd/devp2p: add --extaddr flag (#26312) · b44abf56
      Felix Lange authored
      The new flag allows configuring an explicit endpoint which is to be
      announced in the DHT. This feature was originally developed for the
      discv5 wormhole experiment (#25798), but it's useful in other contexts
      as well.
      b44abf56
  16. 05 Dec, 2022 4 commits
  17. 03 Dec, 2022 1 commit
    • Sina Mahmoodi's avatar
      core: drop legacy receipt types (#26225) · 10347c6b
      Sina Mahmoodi authored
      This PR drops the legacy receipt types, the freezer-migrate command and the startup check. The previous attempt #22852 at this failed because there were users who still had legacy receipts in their db, so it had to be reverted #23247. Since then we added a command to migrate legacy dbs #24028.
      
      As of the last hardforks all users either must have done the migration, or used the --ignore-legacy-receipts flag which will stop working now.
      10347c6b
  18. 02 Dec, 2022 1 commit
  19. 30 Nov, 2022 1 commit
  20. 28 Nov, 2022 4 commits