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

[wip] Implement redesigned PSET #217

Closed
wants to merge 2 commits into from

Conversation

achow101
Copy link
Contributor

PSET is being redesigned in order to actually do everything that elements transactions can do while also preserving privacy.

See ElementsProject/elements#900 for more details about this, including a specification for the new PSET.

@jgriffiths
Copy link
Contributor

@niftynei Heads up that the elements interface will be changing per the linked PR.

Hi @achow101, for the presence/absence of fields in inputs and outputs I am leaning towards using a bitset and removing the hacks to malloc(1) buffers leaving their length 0. Can you comment as to how likely the Elements interface is to change at this time?

@achow101
Copy link
Contributor Author

Can you comment as to how likely the Elements interface is to change at this time?

I'm not sure how it will change at this time, there still some work being done on the design of the Blinder role.

@jgriffiths
Copy link
Contributor

I'm not sure how it will change at this time, there still some work being done on the design of the Blinder role.

OK, I imagine we want the updated Elements support in the next release, since we can then get all the PSBT interface changes done within one release.

#define PSET_IN_VALUE_BLINDER 0x01
#define PSET_IN_ASSET 0x02
#define PSET_IN_ASSET_BLINDER 0x03
#define PSET_GLOBAL_SCALRA 0x00
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define PSET_GLOBAL_SCALRA 0x00
#define PSET_GLOBAL_SCALAR 0x00

extremely drive by nit lol

@jgriffiths
Copy link
Contributor

jgriffiths commented Aug 14, 2020

@achow I have started implementing these changes locally including tests, swig/C++ wrappers and code de-duplication. Please see https://github.com/jgriffiths/libwally-core/tree/elements_pbst. I've fixed the malloc hack in that tree.

I'm thinking about moving all varbuff members of inputs and output to just be held in a map internally. That seems easier than fiddling around with struct members while the interface settles, and it would make serialisation easier too.

@jgriffiths
Copy link
Contributor

Closing this in favour of #218 which implements the PSET BIP as currently specified. Please update there when the spec changes/is finalised.

@jgriffiths jgriffiths closed this Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants