Context
UserMailbox is currently persisted as one SCALE-encoded CAS blob:
UserMailbox(BTreeMap<MessageId, Expiring<MailboxMessage>>)
- fast sync requests this blob through Bitswap when walking
Mailbox
- the new Bitswap path currently caps blockstore responses at 1 MiB
UserMailbox has no hard encoded-size limit. It is bounded only indirectly by mailbox expiry and outgoing-message soft limits, so a valid mailbox blob can exceed 1 MiB before expiry.
Proposal
Store UserMailbox as a Merkle/CAS-backed tree instead of one monolithic blob.
This should let fast sync fetch mailbox state in bounded chunks and avoid rejecting otherwise valid chain state because one user mailbox blob grew too large.
Tasks
Context
UserMailboxis currently persisted as one SCALE-encoded CAS blob:UserMailbox(BTreeMap<MessageId, Expiring<MailboxMessage>>)MailboxUserMailboxhas no hard encoded-size limit. It is bounded only indirectly by mailbox expiry and outgoing-message soft limits, so a valid mailbox blob can exceed 1 MiB before expiry.Proposal
Store
UserMailboxas a Merkle/CAS-backed tree instead of one monolithic blob.This should let fast sync fetch mailbox state in bounded chunks and avoid rejecting otherwise valid chain state because one user mailbox blob grew too large.
Tasks
UserMailbox