Skip to content

Design & implement combo 712 signature method for dataSetCreated & piecesAdded #442

@rvagg

Description

@rvagg

The combination signCreateDataSetAndAddPieces operation we do in Synapse needs two separate 712 signed blobs that we pass, concatenated, to Curio when we need to make a data set and add pieces in a single operation (first one for a new data set) to pass through PDPVerifier which splits them into two before passing them down into FWSS: https://github.com/FilOzone/pdp/blob/f7487d50a81dd76e6301dfa7770820bcfbd36d97/src/PDPVerifier.sol#L666

FWSS only sees the two separate operations, as if they came in separately. This is nice because PDPVerifier can support both split and combined operations and FWSS doesn't need to care. But it also sucks because the user needs to sign two separate things before proceeding; which means two wallet operations, which means for 2-copy durability with new data sets, a new user has to perform four separate signing operations. There's even potential for it to be worse if one of the SPs fails and we need to retry with another, you could have some multiple of 2 higher than 4 signing operations.

There's two levels of things that we could explore here, and these are separate.

First the important one for this ticket: A way to support dataSetCreated and piecesAdded receiving the same signature but validating them according to their operation's requirements. I think this might mean attempting to decode as a (bytes, bytes) first to see if it's two sigs, then splitting if it is and proceeding with the first sig if it's a dataSetCreated and the second if it's a piecesAdded; then PDPVerifier can pass it straight through without splitting.

Secondly, more research oriented, but if an easy way presents itself then we could consider just going to this: can we come up with a way to perform a single 712 to support multiple storage providers, so we hand the same one to both SPs and they both validate as successful. Perhaps array fields, and you get told which array index you are validating against. Potentially getting down to a single signing operation for onboarding a first piece to multiple SPs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🐱 Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions