erigon-pulse/consensus/bor
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
..
abi Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
clerk Move hexutil.Bytes to erigon-lib (#7305) 2023-04-13 11:19:02 +00:00
contract Revert "Remove excessive logging in bor (#7690)" (#7777) 2023-06-21 14:16:21 +01:00
heimdall [devnet] Always select first node, fix configuration mess up between nodes (#7863) 2023-07-10 11:37:55 +01:00
heimdallgrpc Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
statefull State sync transactions added to debug_traceBlockByNumber call (#6830) 2023-02-20 08:04:11 +00:00
valset [devnet] Always select first node, fix configuration mess up between nodes (#7863) 2023-07-10 11:37:55 +01:00
api.go lru lib version up (#7695) 2023-06-09 13:46:58 +07:00
bor.go added bor tx indexing with tests (#7826) 2023-07-12 23:31:38 +01:00
errors.go Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
fake.go added bor tx indexing with tests (#7826) 2023-07-12 23:31:38 +01:00
genesis_contract_mock.go Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
genesis.go Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
heimall.go Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
merkle.go Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
snapshot_test.go lru lib version up (#7695) 2023-06-09 13:46:58 +07:00
snapshot.go [bor] Desambiguate the term checkpoint (#7698) 2023-06-09 22:19:24 +01:00
span_mock.go consensus/bor: use current producers for extra data validation (#7564) 2023-05-24 12:57:31 +07:00
span.go consensus/bor: use current producers for extra data validation (#7564) 2023-05-24 12:57:31 +07:00