-
Notifications
You must be signed in to change notification settings - Fork 12
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
Pset add blinder role #79
Pset add blinder role #79
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The structure of the package is so clean! Well done @sekulicd.
Most of the todos are ok.. there are some changes required to fix "bugs", but in general it looks really good to me.
It would be nice if the blinder could expect an argument with a rng function so that it uses the generateRandomNumber
only as a fallback.
Can you elaborate more on this? |
The Of course, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should provide an integration test to test that the blinder role works as expected and that the transaction can be broadcasted.
This is an integration test taken from liquid js that shows how to create, blind, sign and broadcast a confidential transaction that used native segwit confidential addresses.
This is the integration test for a non-confidential transaction using our pset package.
NOTE:
Since our library actually supports only segwit confidential addresses we should use p2wpkh blech32 addreseses in the test.
I am trying to blind same PSET tx as in this test case, so there is one input and 3 outputs. I was debugging mentioned JS test case and I see that method blindGeneratorBlindSum receives input with same count of vbl and gbl and it TC is passing @altafan do you think that it can be issue with validation in line ? |
My guess is that you are including the value of the fee output within |
@altafan, test case is passing now and I can see confirmed blinded transaction in the explorer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a change to updated the readme roadmap, just to let you know in case you want to sync. @sekulicd
LGTM
Awesome! @sekulicd
EDIT: |
Considering that this is the way to create blech32 address:
How should I create scriptpubkey and signature, as we dont have option to create blech32 payment which would hold these two values like in case of p2wpkh for eg.:
|
UPDATE:
Please advise if this is correct. Assuming that this is correct I am trying to add WitnessUtxo: Since Utxo doesnt contain Surjection and Range proof, idea is to fetch full transaction. I receive full transaction in raw bytes which I am able to decode using elements-cli, now the problem is that the method, I assumed, should be used to decode raw tx: |
I was not intending to modify the running integration test by using a confidential input, but rather to create a new one. Said that, the confidential address format, blech32 this case, is just a way so that I, receiver of a transaction, can pass my blinding pubkey to the sender in order to him being able to blind my outputs with a key that I'm aware of. For a confidential output, thus, the output script does not change at all compared to the unconfidential one, so you should not be worried it. The In general the |
Before there was no option to calculate blind pset outputs.
After the method BlindOutputs is added, it is possible to blind outputs of PSET.
It closes #45 .
As per comment here this will close #74Please @altafan can you review this?