Skip to content

SIP-37: Exposing ProgrammableTransaction data in TxContext in Move#37

Open
thounyy wants to merge 2 commits intosui-foundation:mainfrom
thounyy:main
Open

SIP-37: Exposing ProgrammableTransaction data in TxContext in Move#37
thounyy wants to merge 2 commits intosui-foundation:mainfrom
thounyy:main

Conversation

@thounyy
Copy link

@thounyy thounyy commented Jul 30, 2024

No description provided.

@wriches wriches changed the title Exposing ProgrammableTransaction data in TxContext in Move SIP-37: Exposing ProgrammableTransaction data in TxContext in Move Aug 7, 2024
@wriches wriches added the active Active SIPs that are either in Draft, Review, Fast Track or Last Call status. label Aug 7, 2024
@sblackshear
Copy link
Contributor

Thanks for writing this up! One question, would adding a function to TxContext returning a hash that commits to:

  • Commands
  • Non-gas input object ID's

also satisfy the requirement? This (of course) wouldn't give you the PTB itself on-chain--you'd have to post it elsewhere. But it would expose a lot less of the internal structure of PTBs, which is desirable for a number of reasons (more flexibility to extend/change, smaller protocol footprint, less invitation to write fragile Move code).

@thounyy
Copy link
Author

thounyy commented Aug 8, 2024

Yes for sure that's an option, only the pure arguments would be missing but I don't think it is a big issue. It also removes the goal of making the proposal human readable but it's not a primary requirement.

@sblackshear
Copy link
Contributor

Ah, I think we can (and probably should) include pure arguments in the hash as well

@thounyy
Copy link
Author

thounyy commented Aug 16, 2024

bcs serialized then hashed or you're thinking of something else?

@tnowacki
Copy link

bcs serialized then hashed or you're thinking of something else?

Pure arguments are simply a series of bytes with no type information, so we would use the bytes as is.
We would likely also just use the Object IDs, but we might maintain some of the object information in the hash, i.e. all of the information present in the argument structure (object ref, shared immutable, shared mutable, etc)

@92GC
Copy link

92GC commented Feb 9, 2025

Hello, are there any updates on this? This is a priority for us at @govexdotai. We are building a futarchy as a service protocol on Sui

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.

5 participants