As part of #3821 the publication flow was changed to push body and header separately for the blocks.
Currently, the body is pushed twice (second as part of process) to support the messages that we are passing between L1 and L2. Nevertheless, this will not be the case moving forward, so it should not rely on it for finding the blocks.
Instead, we should be able to fetch the bodies separately. While we are also in the process of implementing the new message model #4492, we can fix at least part of the problem here such that it easily can be fitted in later.
Namely, we need to fetch the body from the the DA, which currently is just from the calldata of the AvailabilityOracle.
The header is still being passed to the current contract Rollup.sol, so the archiver should be able to fetch all bodies and all headers, and use the values from the Header to match it with the right body.
That block (header, body) can then be stored in the block store.
### Tasks
- [ ] Fetch bodies from availability oracle
- [ ] Fetch headers (as now) from rollup and match it with the body
Note that this DO NOT require any contract changes. It is to simply put down the plumbing such that we can more easily remove the unnecessary broadcast later.
As part of #3821 the publication flow was changed to push body and header separately for the blocks.
Currently, the body is pushed twice (second as part of
process) to support the messages that we are passing between L1 and L2. Nevertheless, this will not be the case moving forward, so it should not rely on it for finding the blocks.Instead, we should be able to fetch the bodies separately. While we are also in the process of implementing the new message model #4492, we can fix at least part of the problem here such that it easily can be fitted in later.
Namely, we need to fetch the
bodyfrom the the DA, which currently is just from the calldata of theAvailabilityOracle.The header is still being passed to the current contract
Rollup.sol, so the archiver should be able to fetch all bodies and all headers, and use the values from the Header to match it with the right body.That block (header, body) can then be stored in the block store.
Note that this DO NOT require any contract changes. It is to simply put down the plumbing such that we can more easily remove the unnecessary broadcast later.