erigon-pulse/eth
Mark Holt bd9896bf4b
added bor tx indexing with tests (#7826)
This request implements the insertion of Bor ephemeral transactions into
snapshot indexes.

I does this by taking the block hash from the header index and passing
it to the transaction indexer to add an additional index entry per block
into the transaction hash -> block index.

The passed entries are currently contained in an in memory array which
is (32 * number of blocks / sprint size) bytes.

In addition to the functional code there is also an update to the
`dump_test.go` so that it runs `DumpBlocks` to exercise the indexing
code. To facilitate this the `InsertChain` method in `mock_sentry` has
been modified so that it can process >128 blocks.

The code in this request also includes additional bor/consensus code
with the following functions:

`CalculateSprint`
`CalculateSprintCount`

The first function is a modification of the code in erigon-lib so that
the sprints are numerically rather than lexically ordered. This code
should be migrated to erigon-lib and should have its sprint set
calculated once from its underlying map rather than this process being
repeated every calculation.

---------

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
Co-authored-by: ledgerwatch <akhounov@gmail.com>
Co-authored-by: Enrique Jose  Avila Asapche <eavilaasapche@gmail.com>
Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2023-07-12 23:31:38 +01:00
..
calltracer Convert *vm.EVM to vm.VMInterface in Tracers (#6590) 2023-01-16 22:28:50 +00:00
ethconfig Enforce blockReader interface (#7737) 2023-06-15 13:11:51 +07:00
ethconsensusconfig More log fixes for bor devnet (#7857) 2023-07-08 14:36:08 +01:00
ethutils reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
filters reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
gasprice moved cmd/rpcdaemon/commands -> turbo/jsonrpc (#7858) 2023-07-08 19:01:26 +02:00
integrity go 1.19 atomics (#7164) 2023-03-23 05:11:28 +00:00
protocols/eth e3: release chain maker changes (#7787) 2023-06-23 10:07:42 +07:00
stagedsync added bor tx indexing with tests (#7826) 2023-07-12 23:31:38 +01:00
tracers Base BlobTx on DynamicFeeTransaction (#7736) 2023-06-15 10:57:27 +02:00
api_backend.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
api.go Embed rpcdaemon: prepared direct clients (#3492) 2022-02-12 19:47:19 +07:00
backend.go added bor tx indexing with tests (#7826) 2023-07-12 23:31:38 +01:00
bloombits.go remove database field from Ethereum object (#1750) 2021-04-19 14:56:44 +07:00
discovery.go rename (#1978) 2021-05-20 19:25:53 +01:00