Only commit removed ipld block once and statically define its CID and mh_key #116

Merged
telackey merged 4 commits from only_commit_removed_ipld_once into v1.10.8-statediff 2021-09-22 13:46:42 +00:00
Member

Closes #114

And some additional minor cleanup/optimization.

Introduces a new CLI flag: "statediff.db.init" which should be set to true the first time the service is ran on a database, it tells the service to write an IPLD block for a "Removed" node to the public.blocks table at initialization. Rather than requiring a new CLI configuration flag, it just write the "Removed" node block whenever the service is first started- it's okay if we duplicate this effort once at initialization. This block is then referenced by the constant defined CIDs/mh_key for all "Removed" type nodes so that we don't attempt to write an IPLD block to the DB and derive its CID/mh_key for every "Removed" node type.

Closes #114 And some additional minor cleanup/optimization. <s>Introduces a new CLI flag: "statediff.db.init" which should be set to true the first time the service is ran on a database, it tells the service to write an IPLD block for a "Removed" node to the public.blocks table at initialization.</s> Rather than requiring a new CLI configuration flag, it just write the "Removed" node block whenever the service is first started- it's okay if we duplicate this effort once at initialization. This block is then referenced by the constant defined CIDs/mh_key for all "Removed" type nodes so that we don't attempt to write an IPLD block to the DB and derive its CID/mh_key for every "Removed" node type.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/go-ethereum#116
No description provided.