erigon-pulse/cmd
Mark Holt df0699a12b
Added sentry simulator implementation (#9087)
This adds a simulator object with implements the SentryServer api but
takes objects from a pre-existing snapshot file.

If the snapshot is not available locally it will download and index the
.seg file for the header range being asked for.

It is created as follows: 

```go
sim, err := simulator.NewSentry(ctx, "mumbai", dataDir, 1, logger)
```

Where the arguments are:

* ctx - a callable context where cancel will close the simulator torrent
and file connections (it also has a Close method)
* chain - the name of the chain to take the snapshots from
* datadir - a directory potentially containing snapshot .seg files. If
not files exist in this directory they will be downloaded
 *  num peers - the number of peers the simulator should create
 *  logger - the loger to log actions to

It can be attached to a client as follows:

```go
simClient := direct.NewSentryClientDirect(66, sim)
```

At the moment only very basic functionality is implemented:

* get headers will return headers by range or hash (hash assumes a
pre-downloaded .seg as it needs an index
* the header replay semantics need to be confirmed
* eth 65 and 66(+) messaging is supported
* For details see: `simulator_test.go

More advanced peer behavior (e.g. header rewriting) can be added
Bodies/Transactions handling can be added
2023-12-27 14:56:57 +00:00
..
abigen Diag session routing (#8232) 2023-09-25 16:24:17 +01:00
bootnode Discovery zero refresh timer (#8661) 2023-11-07 08:48:58 +00:00
capcli [Grindmas] Added tests to Beacon API, also fixed stuff. (#9074) 2023-12-25 02:34:13 +01:00
caplin [Grindmas] Added tests to Beacon API, also fixed stuff. (#9074) 2023-12-25 02:34:13 +01:00
caplin-regression --txpool.gossip.disable (#8800) 2023-11-23 12:00:41 +07:00
devnet polygon: astrid sync heimdall wrapper (#9017) 2023-12-20 16:48:37 +01:00
downloader "downloader manifest": cmd to produce manifest.txt (#9067) 2023-12-24 07:32:21 +00:00
erigon [caplin/sentinel] config reorganizations (#8844) 2023-11-28 22:45:58 -06:00
erigoncustom erigon backup: v0 of sub-command (#7396) 2023-04-27 10:42:12 +07:00
evm cmd/evm:fix Env struct json tag (#8986) 2023-12-15 07:24:03 +07:00
hack Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
integration print_stages: bor snaps info (#9008) 2023-12-21 08:08:55 +07:00
observer Discovery zero refresh timer (#8661) 2023-11-07 08:48:58 +00:00
p2psim torrent: add --webseeds cli arg (#8176) 2023-09-12 12:18:47 +07:00
pics EthereumExecutionService in MockSentry (#8373) 2023-10-05 18:30:19 +02:00
prometheus grafana board: fix cpu chart (#8733) 2023-11-15 15:00:25 +07:00
release go.mod: minimal go version 1.20 (#8495) 2023-10-17 06:52:28 +07:00
rlpdump rename (#1978) 2021-05-20 19:25:53 +01:00
rpcdaemon Disabled caplin phase2 for Gnosis temporairly. (#9006) 2023-12-19 13:10:34 +01:00
rpctest Add create access list test (#9062) 2023-12-23 21:38:47 +07:00
sentinel Add blocksByRange & blocksByRoot P2P rpc handlers (#8885) 2023-12-23 14:32:00 +01:00
sentry p2p: silkworm sentry (#8527) 2023-11-02 08:35:13 +07:00
silkworm_api Added sentry simulator implementation (#9087) 2023-12-27 14:56:57 +00:00
state evm: remove interpreter interface - step3 (#8842) 2023-11-29 09:29:16 +07:00
tooling Switched Caplin snapshot format to ZSTD blinded blocks (#9058) 2023-12-23 15:56:35 +01:00
txpool --txpool.gossip.disable (#8800) 2023-11-23 12:00:41 +07:00
utils Caplin: Parallel historical states reconstruction (#8817) 2023-12-06 10:48:36 +01:00
verkle Adds flags to enable/disable backfilling and enable full historical beacon node (#8813) 2023-11-22 13:24:35 +01:00