nimbus-eth1/nimbus
Jordan Hrycaj ba940a5ce7
Snap sync simplify object inheritance (#1098)
* Reorg SnapPeerBase descriptor, notably start/stop flags

details:
  Instead of using three boolean flags startedFetch, stopped, and
  stopThisState a single enum type is used with values SyncRunningOk,
  SyncStopRequest, and SyncStopped.

* Restricting snap to eth66 and later

why:
  Id-tracked request/response wire protocol can handle overlapped
  responses when requests are sent in row.

* Align function names with source code file names

why:
  Easier to reconcile when following the implemented logic.

* Update trace logging (want file locations)

why:
  The macros previously used hid the relevant file location (when
  `chroniclesLineNumbers` turned on.) It rather printed the file
  location of the template that was wrapping `trace`.

* Use KeyedQueue table instead of sequence

why:
  Quick access, easy configuration as LRU or FIFO with max entries
  (currently LRU.)

* Dissolve `SnapPeerEx` object extension into `SnapPeer`

why;
  It is logically cleaner and more obvious not to inherit from
  `SnapPeerBase` but to specify opaque field object references of the
  merged `SnapPeer` object. These can then be locally inherited.

* Dissolve `SnapSyncEx` object extension into `SnapSync`

why;
  It is logically cleaner and more obvious not to inherit from
  `SnapSyncEx` but to specify opaque field object references of
  the `SnapPeer` object. These can then be locally inherited.

  Also, in the re-factored code here the interface descriptor
  `SnapSyncCtx` inherited `SnapSyncEx` which was sub-optimal (OO
  inheritance makes it easier to work with call back functions.)
2022-05-23 17:53:19 +01:00
..
accounts Initial implementation of the merge spec 2022-01-24 09:44:39 +02:00
db modify hive simulators to run in CI 2022-04-21 12:01:18 +07:00
docs.static Kludge for 'make docs' to produce pretty nim manuals 2022-01-22 08:26:57 +02:00
graphql first step into styleCheck fixes 2022-04-14 08:39:50 +07:00
merge first step into styleCheck fixes 2022-04-14 08:39:50 +07:00
p2p Normalise sync handler prototypes (#1087) 2022-05-13 17:30:10 +01:00
rpc Cleanup some imports and fix some warnings in the process (#1096) 2022-05-22 22:44:15 +02:00
sync Snap sync simplify object inheritance (#1098) 2022-05-23 17:53:19 +01:00
transaction Squashed snap-sync-preview patch (#1076) 2022-05-09 15:04:48 +01:00
utils first step into styleCheck fixes 2022-04-14 08:39:50 +07:00
vm first step into styleCheck fixes 2022-04-14 08:39:50 +07:00
vm2 first step into styleCheck fixes 2022-04-14 08:39:50 +07:00
block_types.nim reduce compiler warnings 2019-11-13 21:49:39 +07:00
chain_config.nim Squashed snap-sync-preview patch (#1076) 2022-05-09 15:04:48 +01:00
conf_utils.nim modify hive simulators to run in CI 2022-04-21 12:01:18 +07:00
config.nim Normalise sync handler prototypes (#1087) 2022-05-13 17:30:10 +01:00
constants.nim first step into styleCheck fixes 2022-04-14 08:39:50 +07:00
context.nim config: remove global rng from NimbusConfiguration 2021-09-07 22:02:29 +07:00
debug.nim fix header.extraData printer in debug.nim 2022-03-25 14:00:44 +07:00
errors.nim Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00:00
forks.nim fix EIP-4399 'random' opcode 2022-02-08 20:23:40 +07:00
genesis.nim first step into styleCheck fixes 2022-04-14 08:39:50 +07:00
genesis_alloc.nim add goerli testnet genesis data[skip ci] 2020-04-09 19:13:17 +03:00
launcher.nim Premix-related changes 2019-01-28 12:38:23 +02:00
lightchain_shell.nim Some renames 2018-05-28 13:22:28 +03:00
makefile Kludge for 'make docs' to produce pretty nim manuals 2022-01-22 08:26:57 +02:00
nim.cfg NAT port mapping 2019-04-17 03:56:28 +02:00
nimbus.nim Snap sync simplify object inheritance (#1098) 2022-05-23 17:53:19 +01:00
sealer.nim Squashed snap-sync-preview patch (#1076) 2022-05-09 15:04:48 +01:00
tracer.nim first step into styleCheck fixes 2022-04-14 08:39:50 +07:00
transaction.nim Cleanup some imports and fix some warnings in the process (#1096) 2022-05-22 22:44:15 +02:00
utils.nim first step into styleCheck fixes 2022-04-14 08:39:50 +07:00
validation.nim first step into styleCheck fixes 2022-04-14 08:39:50 +07:00
version.nim dist: precompiled binaries and Docker images (#1015) 2022-03-27 13:21:15 +02:00
vm_compile_info.nim first step into styleCheck fixes 2022-04-14 08:39:50 +07:00
vm_computation.nim EVM: Apply EIP-6 in the code (affects both vm and vm2) 2021-06-08 15:36:30 +01:00
vm_gas_costs.nim EIP-3529: Replace SSTORE_CLEARS_SCHEDULE 2021-06-29 07:37:17 +07:00
vm_internals.nim EIP 4399 changes: random -> prevRandao 2022-02-27 14:37:35 +07:00
vm_precompiles.nim re-named some v2*.nim sources to its original name *.nim (without the v2) 2021-04-28 15:24:14 +03:00
vm_state.nim Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00:00
vm_state_transactions.nim Transaction: Prepare txRefundGas to support txCallEvm 2021-05-03 19:51:20 +01:00
vm_types.nim cleanup: remove unused accessLogs code from vm_state 2021-10-28 11:30:18 +07:00