Don't write IPLD blocks for every "Removed" type nodes #114

Closed
opened 2021-09-06 19:05:09 +00:00 by i-norden · 1 comment
Member

We should not be generating and writing an IPLD block to the database every time we see a "Removed" type node, since it is always an IPLD block for empty []byte{}

Here: https://github.com/vulcanize/go-ethereum/blob/statediff/statediff/indexer/indexer.go#L435

And here: https://github.com/vulcanize/go-ethereum/blob/statediff/statediff/indexer/indexer.go#L477

We only need to write an IPLD block in the database for empty []byte{} once, and we can define the CID and mh_key that reference this as constants in the code that we don't need to recalculate.

We should not be generating and writing an IPLD block to the database every time we see a "Removed" type node, since it is always an IPLD block for empty `[]byte{}` Here: https://github.com/vulcanize/go-ethereum/blob/statediff/statediff/indexer/indexer.go#L435 And here: https://github.com/vulcanize/go-ethereum/blob/statediff/statediff/indexer/indexer.go#L477 We only need to write an IPLD block in the database for empty `[]byte{}` once, and we can define the CID and mh_key that reference this as constants in the code that we don't need to recalculate.
Author
Member

Closed in #116

Closed in #116
Sign in to join this conversation.
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#114
No description provided.