Skip to content
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

SIP-44: Multi-Address Object Usage in Transactions #44

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Sceat
Copy link

@Sceat Sceat commented Nov 21, 2024

Enable transactions to use objects owned by multiple addresses with appropriate signatures

@Sceat Sceat marked this pull request as ready for review November 22, 2024 08:55
@RandyPen
Copy link
Contributor

What if share object contains legit sender addresses

public struct SomeObject has key, store {
    id: UID,
    allow: vector<address>,
}

@Sceat
Copy link
Author

Sceat commented Nov 24, 2024

On that game called Dofus, there was a feature where you as an artisan could lend your skills to craft an item for someone if he provides the ingredients.

Translating that to Sui, the SIP would allow

server -> create transaction (and potentially provide his approval through an adminCap if we want to include web2 checks)
server -> send to userA & userB

userA (artisan) -> provide skill/job object
userB (client) -> provide ingredients & payment

server <- receive both signature & execute transaction

userA <- receive payment
userB <- receive crafted Item

With shared objects the artisan would just "publish his workshop" for anyone to craft, that would be fundamentally different since removing the isolation, bot prevention, and social factor.

-> Shared objects are public elements anyone can use
-> Owned objects concerns only their owner or involved parties

While it's probably possible to work around those systems through shared object, you have a clear advantage for

  • atomicity
  • authorization
  • separation of concerns (which is a core point of Sui's dag)

What if share object contains legit sender addresses

That would be a 2-step workaround to a more straightforward concept, like here in the signing idea from your tutorial https://x.com/Sceat_/status/1860368579318976994 this is currently the only one way solution but quite verbose and uncomfortable

@mystenmark
Copy link

Thanks for the proposal! This is something we've considered adding for some time. The main stumbling block is this: When there are multiple senders, all senders have to trust all other senders not to equivocate on any of their objects. Equivocation by one sender on one of their own objects could result in all objects referenced by the transaction being locked for the duration of the epoch. This would create a potential attack vector.

The solution to this is some form of "fast unlock". There was a design for adding fast unlock to the current consistent-broadcast based system, but it was quite complicated and we didn't have time to implement it.

Fortunately, as we move to mysticeti fast path (described in section IV of https://arxiv.org/pdf/2310.14821) we will have the opportunity to create a much simpler fast-unlock system. Once we have that, we will definitely consider adding true multi-agent transactions.

@Sceat
Copy link
Author

Sceat commented Nov 26, 2024

Maybe it would make sense that there is still a single sender, others signers would just delegate their objects the same way a gas sponsor does it 🤔

That attack vector is a good point, I could imagine players using their objects concurrently just to lock others, this would be a functionality to use between servers and users only (like a gas-station), before fast-unlock is a thing

@Sceat
Copy link
Author

Sceat commented Dec 2, 2024

@mystenmark would you have any idea of timeline for that mysticeti fast path/fast unlock draft ? Is there any capacity in Mysten's teams ? Could we expect such a feature to land next year ?

An alternative for server secured transactions would be #16

@wriches wriches added the new Ideas that have been submitted but not yet formally adopted into the SIP process. label Dec 5, 2024
@wriches wriches changed the title SIP-44: Multi-Address Object Usage in Transactions SIP: Multi-Address Object Usage in Transactions Dec 5, 2024
@wriches wriches changed the title SIP: Multi-Address Object Usage in Transactions SIP-44: Multi-Address Object Usage in Transactions Dec 17, 2024
@wriches wriches added active Active SIPs that are either in Draft, Review, Fast Track or Last Call status. and removed new Ideas that have been submitted but not yet formally adopted into the SIP process. labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
active Active SIPs that are either in Draft, Review, Fast Track or Last Call status.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants