-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
letter-coded sync modes instead of full, archive etc. #119
Comments
@AlexeyAkhunov I'm not sure about using |
@mandrigin Yes, I think the idea is to use |
Merged
Closed
cffls
pushed a commit
to cffls/erigon
that referenced
this issue
Feb 14, 2024
* more counters and some streamlining on creation contract handling * last of the opcode zk counters implemented * slightly nicer handling of process tx for counters * correctly handling bytecodesize and inputsize in zk counters * counters handling nonce bytes and isCreate vs isDeploy logic fixed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some database buckets are mandatory for successful sync and block processing. For example,
AT
(current state of accounts),ST
(current state of contract storage),SUFFIX
(changesets used for rewinding). Other buckets are optional and only add value for certain users. We would like users to have flexibility to pick and choose those buckets in any combination. Users may specify the mode of operation as a combination of one-letter flags (similar to unix tar command). Here are suggested flags:r
Transaction receipts. Currently turned off by default. If turned on, receipts are written to a special bucket, which is then used to servergetTransactionReceipt
andgetLogs
RPC commands. Inblockchain.go
this is set byEnableReceipts(true)
h
History of state. These are bucketshAT
(history of state of accounts) andhST
(history of state of contract storage). Although these buckets contain the same information as theSUFFIX
(change-set) bucket, it is organised for quick access usingaddressHash | blockNr
composite key for accounts, andaddressHash | incarnation | blockNr
composite key for contract storage. BucketSUFFIX
is organised for quick access for composite keys"hAT" | blockNr
and"hST" | blockNr
. History of state is used for answering various RPC queries related to account balances, contract storage contents at some point in the past.t
Index allowing to look up block number and transaction index given a transaction hash. It is used by RPC requests such asgetTransaction
, because it allows retrieving the body of the transaction from the bucket with blocksp
preimages for address hashes and storage key hashes. This information is needed by RPC queries such asgetModifiedAccounts
andgetStorageRangeAt
.Some examples of which modes might be useful for different use-cases:
p
) and history (h
) to be able to watch for deposits. If they use logs (events) to figure out token transfers, they might also want to turn on receipts (r
) for better performancer
) for better scanning of the logs (lots of dapp use logs as a substitute for storage).The text was updated successfully, but these errors were encountered: