Open segfault-magnet opened 1 month ago
I have some reservations about this that I've been discussing with @hal3e.
I don't fully understand the use case for NoSignatures
. We are essentially putting another abstraction over how witness indexes are handled but from my perspective it seems leaky in this case. It might absolve the user from handling the witness indexes directly but it still requires them to be somewhat aware of what is happening behind the scenes.
Since we are in the process of re-examining our interfaces for v1.0, I would suggest we hold off on this change for now until we have better picture of how we want to support transaction building and what we want the final interface to look like.
At the very least, I would hold off until @segfault-magnet can chime in on the discussion.
I have some reservations about this that I've been discussing with @hal3e.
I don't fully understand the use case for
NoSignatures
. We are essentially putting another abstraction over how witness indexes are handled but from my perspective it seems leaky in this case. It might absolve the user from handling the witness indexes directly but it still requires them to be somewhat aware of what is happening behind the scenes. Since we are in the process of re-examining our interfaces for v1.0, I would suggest we hold off on this change for now until we have better picture of how we want to support transaction building and what we want the final interface to look like. At the very least, I would hold off until @segfault-magnet can chime in on the discussion.
NoSignatures is already there in master, called build_without_signatures. Whatever its reason for existence, the leakyness is there. This is a cosmetic change wrt.
If we know we will allocate time for 1.0 redesign and if this feature (and all others that break the public api) can wait for the redesign then I vote for waiting.
Then again 1.0 will break everything so why not break this as well? We could get some feedback in the meantime if there are edge cases to the approach.
I have some reservations about this that I've been discussing with @hal3e. I don't fully understand the use case for
NoSignatures
. We are essentially putting another abstraction over how witness indexes are handled but from my perspective it seems leaky in this case. It might absolve the user from handling the witness indexes directly but it still requires them to be somewhat aware of what is happening behind the scenes. Since we are in the process of re-examining our interfaces for v1.0, I would suggest we hold off on this change for now until we have better picture of how we want to support transaction building and what we want the final interface to look like. At the very least, I would hold off until @segfault-magnet can chime in on the discussion.NoSignatures is already there in master, called build_without_signatures. Whatever its reason for existence, the leakyness is there. This is a cosmetic change wrt.
If we know we will allocate time for 1.0 redesign and if this feature (and all others that break the public api) can wait for the redesign then I vote for waiting.
Then again 1.0 will break everything so why not break this as well? We could get some feedback in the meantime if there are edge cases to the approach.
Yeah. Let's release this feature now; our users visibly need it (and often request it from me). We can always keep making breaking changes until 1.0. I'll continue handling the communications for these painful, breaking changes.
@hal3e are we ready to merge this?
closes: #1405
Finishing a transaction builder (i.e.
.build(
) now requires aContext
object.The transaction builder will proceed to finalize the transaction in a manner fitting the context the tx will be used in.
Simulating a call now requires the user to tweak how the simulated call will be executed:
And that allows for actual read only calls
Breaking changes
SizedAsciiString
no longer implementsAsRef<[u8]>
. To get the underlying bytes you can turn it into a&str
via the newAsRef<str>
and callas_bytes()
on the&str
:sized_string.as_ref().as_bytes()
.Context
object in theirbuild
methods.Create
,Upload
,Upgrade
tx builders useContext
whileScript
builders useScriptContext
. Refer to the rust docs for details on each context..simulate()
now accepts anExecution
argument allowing for realistic or state-read-only simulations.Checklist