Jordan Hrycaj dd888deadb
Fc module various base tree admin updates (#2895)
* Cosmetics, update log and exception messages

* Update `FC` base tree updater `updateBase()`

why:
  Correct `forkJunction` of canonical cursor head record. When moving
  the `base`, this field would be below `base` unless updated.

* Fix `FC` chain selector `findCanonicalHead()`

why:
  Given a sample ref `hash` the function searched for the unique chain
  containing the block header referenced by `hash`.

  Unfortunately, when searching down the ancestry lineage, the function
  did not necessarily stop an the end of the sub-chain. Rather it
  continued with the parent chain without noticing. So returning the
  wrong result.

* When calculating new a base it must reside on cursor arc (or leg.)

why:
  The finalised block argument (that will eventually be the new base)
  might be moved further down the cursor arc if it is too close to the
  cursor head (typically smaller than 128 blocks.)

  So the finalised block selection is shifted down he cursor arc. And
  it might happen that the cursor arc itself is too small and one would
  end up at a parent cursor arc. This is rejected.

* Not starting a new cursor arc with a block already on another arc

why:
  This leads to an inconsistent set of cursor arcs which are supposed to
  be mutually disjunct.

* Tighten condition: A block that is not on the base tree must be on the DB

* One less TODO item
2024-12-02 08:25:58 +00:00

1.6 KiB

General TODO items

  • Update/resolve code fragments which are tagged FIXME

Open issues

1. Weird behaviour of the RPC/engine API

See issue #2816

2. Mem overflow possible on small breasted systems

Running the exe client, a 1.5G response message was opbserved (on my 8G test system this kills the program as it has already 80% mem load. It happens while syncing holesky at around block #184160 and is reproducible on the 8G system but not yet on the an 80G system.)

	[..]
	DBG 2024-11-20 16:16:18.871+00:00 Processing JSON-RPC request  file=router.nim:135 id=178 name=eth_getLogs
	DBG 2024-11-20 16:16:18.915+00:00 Returning JSON-RPC response  file=router.nim:137 id=178 name=eth_getLogs len=201631
	TRC 2024-11-20 16:16:18.951+00:00 <<< find_node from           topics="eth p2p discovery" file=discovery.nim:248 node=Node[94.16.123.192:30303]
	TRC 2024-11-20 16:16:18.951+00:00 Neighbours to                topics="eth p2p discovery" file=discovery.nim:161 node=Node[94.16.123.192:30303] nodes=[..]
	TRC 2024-11-20 16:16:18.951+00:00 Neighbours to                topics="eth p2p discovery" file=discovery.nim:161 node=Node[94.16.123.192:30303] nodes=[..]
	DBG 2024-11-20 16:16:19.027+00:00 Received JSON-RPC request    topics="JSONRPC-HTTP-SERVER" file=httpserver.nim:52 address=127.0.0.1:49746 len=239
	DBG 2024-11-20 16:16:19.027+00:00 Processing JSON-RPC request  file=router.nim:135 id=179 name=eth_getLogs
	DBG 2024-11-20 16:20:23.664+00:00 Returning JSON-RPC response  file=router.nim:137 id=179 name=eth_getLogs len=1630240149