Skip to content

Sync fork #1

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 10,000 commits into
base: master
Choose a base branch
from
Open

Sync fork #1

wants to merge 10,000 commits into from

Conversation

Kay-Zee
Copy link

@Kay-Zee Kay-Zee commented Aug 23, 2023

No description provided.

@Kay-Zee Kay-Zee requested a review from gomisha as a code owner August 23, 2023 17:23
@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2024

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

janezpodhostnik and others added 28 commits April 16, 2025 08:51
…in-memory-storage

Add in-memory collection storage
Co-authored-by: Peter Argue <89119817+peterargue@users.noreply.github.com>
…tion-action-name

[Access] change list_subscription to list_subscriptions
zhangchiqing and others added 30 commits May 6, 2025 19:19
Update to and enable EVM Pectra hard-fork
…fore-indexed-sealed

[Access] Allow small gap between streaming start and indexed height
add test case for directly and deeply nested fields for this case.
…kets

[Access] Update websockets events and account status reponses to use json-cdc encoding
This speeds up key creation by ~372x and eliminates all memory allocs
(used by key creation) for some stores. It also optimizes the cache
key format to be smaller.

Previously, memory cache key format for transaction results was
inefficient and creates needless allocations by encoding to hex.
Same issue exists for transaction result index cache and block cache.
Light transaction results used by AN also use the same cache key format.

This commit optimizes cache key format for multiple stores:
- cache key format:
  - old: hex(blockID) + hex(txID)
  - new: blockID+txID
- index cache key format:
  - old hex(blockID) + hex(txIndex)
  - new blockID+txIndex
- block cache key format:
  - old hex(blockID)
  - new blockID

Updated stores include:
- TransactionResults
- TransactionResultErrorMessages
- LightTransactionResults

Since cache keys are created for every read or insert of transaction
results, etc., it is good to reduce memory allocs when it doesn't
sacrifice speed.

Benchmark stats for creating cache key:
                                               │    old.log    │               new.log               │
                                               │    sec/op     │   sec/op     vs base                │
TransactionResultCacheKey/_create_cache_key-12   882.000n ± 8%   2.368n ± 0%  -99.73% (p=0.000 n=10)

                                               │  old.log   │              new.log              │
                                               │    B/op    │   B/op    vs base                 │
TransactionResultCacheKey/_create_cache_key-12   576.0 ± 0%   0.0 ± 0%  -100.00% (p=0.000 n=10)

                                               │  old.log   │               new.log               │
                                               │ allocs/op  │ allocs/op   vs base                 │
TransactionResultCacheKey/_create_cache_key-12   9.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
…tate-machine

[DataAvailability] Implement processing pipeline state machine
Currently, import statements are using different versions
of msgpack:
- github.com/vmihailenco/msgpack
- github.com/vmihailenco/msgpack/v4

They cause go.mod to import different versions of msgpack:
- msgpack     (v4.0.4)
- msgpack/v4  (v4.3.12)

This commit replaces import statements using "msgpack" with
import statements using "msgpack/v4".  This change specifies
a specific major version number and prevents different versions
of msgpack being used by mistake.
Currently, docs for ReaderBatchWriter.Set() promises it is safe
to modify the key and value after Set() returns.  However, BadgerDB's
WriteBatch.Set() says users must not modify key and value until the
end of transaction.

This bug hasn't surfaced yet because of the way the functions are
currently used and leaving it as-is risks future problems.

This commit modifies ReaderBatchWriter.Set() & ReaderBatchWriter.Delete()
to allow the caller to modify the key and value as promised by our docs.
…ected

Fix bug where protected types appear as fields in unprotected types
[Util] Refactor the flags for reading datadir and pebble-dir
This commit adds tests for storage Batch.Set() and Batch.Delete()
to ensure that arguments to these functions are safe to be modified
after functions return (before batch is committed).

This commit also adds test to show that BadgerDB's WriteBatch.Set()
argument are NOT safe to be modified before batch is committed.
…ibility

[Access] Fix version compatibility list
…values

[Storage] Fix Writer.Set() & Writer.Delete() args not being safe to modify (BadgerDB)
[Storage] Optimize memory cache key creation and key format for some stores
Fix multiple versions of msgpack being used
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.