filecoin-project / venus

Filecoin Full Node Implementation in Go
https://venus.filecoin.io
Other
2.06k stars 459 forks source link

Separate messages and receipts from block header #3103

Closed anorth closed 5 years ago

anorth commented 5 years ago

Description

Messages and their receipts are intended to be separated from the block header (which is all the block data except for those items) and represented in a merkle tree (see spec). This opens up many network efficiencies, light-client functionality etc. In particular, this will make it reasonable to store a fairly long chain of headers in RAM, leaving the messages/receipts in storage most of the time. Memory pressure is a big operational problem for node operators right now (#2031 #2506 #2987).

As a first step, break the messages and receipts each out into a structure that just contains a flat array. See #1324 which follows on with an merkle tree structure for the messages receipts. Immediate benefits to RAM needs may be gained by just extracting them to an array first.

We'll likely want a FullBlock structure that carries the three together for internal convenience.

Acceptance criteria

Risks + pitfalls

Where to begin

anorth commented 5 years ago

Done in #3185