-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exchange meta signatures during initial replication #2876
Comments
@roman-khimov, @cthulhu-rider, about the message to sign: I see three main questions here:
I have considered some options and taking all 3 restrictions made me hope our ordered JSON should be the best one. It is already maintained and used by us, so it is kinda controllable evil (TBH, usual (non-forked, RFC-specified) JSON with an array of objects like However, none of my suggestions (the ordered JSON not an exception) practically explains how we can satisfy the inevitable |
You're correct for the requirements side, JSON came as an obvious idea of a simpler-than-protobuf format that is also available to NeoVM, but ordered JSON is almost like an ordered protobuf --- very inconvenient to deal with. At the same time:
I don't expect a lot of changes to the format and message versioning can be tied to contracts or network configuration. So overall maybe using serialized VM stack items is not that bad of an idea. It's easy to have an array (inherently ordered) that'd be tied to some structure with known fields. Order preserved, compatible with any contracts. Downsides: yeah, it's very Neo-specific. But node inherently has to work with contracts for requests of various kind, so maybe it's not an issue. |
@roman-khimov, something like this? (serialization format question only for now) |
Well, you can have a proper |
Initial replication requires nodes to sign object's main meta information and respond with it. Meta information is not sent on wire and treated as a fixed ordered NEO's map. Signatures are verified, not stored/send anywhere yet. It follows recent API extension: nspcc-dev/neofs-api#299. Closes #2876. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Initial replication requires nodes to sign object's main meta information and respond with it. Meta information is not sent on wire and treated as a fixed ordered NEO's map. Signatures are verified, not stored/send anywhere yet. It follows the recent API extension: nspcc-dev/neofs-api#299. Further, this extension is planned to have a contract adoption: nspcc-dev/neofs-contract#413 and nspcc-dev/neofs-contract#414. Closes #2876. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Initial replication requires nodes to sign object's main meta information and respond with it. Meta information is not sent on wire and treated as a fixed ordered NEO's map. Signatures are verified, not stored/send anywhere yet. It follows the recent API extension: nspcc-dev/neofs-api#299. Further, this extension is planned to have a contract adoption: nspcc-dev/neofs-contract#413 and nspcc-dev/neofs-contract#414. Closes #2876. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Is your feature request related to a problem? Please describe.
I'm always frustrated when object metadata is not signed properly.
Describe the solution you'd like
Once nspcc-dev/neofs-sdk-go#589 is in we can exchange signatures of payloads like:
Exact format to be discussed.
The text was updated successfully, but these errors were encountered: