-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Support custom close methods in vout-based invoices #203
Conversation
88e00f1
to
d45ce1c
Compare
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.
@dr-orlovsky To try this also rgb-runtime needs to be updated:
Compiling rgb-runtime v0.11.0-beta.5 (/mnt/dmc/zoe/work/bitfinex/rgb-integration-tests/rgb)
error[E0308]: mismatched types
--> rgb/src/pay.rs:208:34
|
208 | Address::new(payload, invoice.address_network()),
| ------------ ^^^^^^^ expected `AddressPayload`, found `Pay2Vout`
| |
| arguments to this function are incorrect
|
note: associated function defined here
--> /mnt/dmc/zoe/work/bitfinex/rgb-integration-tests/bp-std/invoice/src/address.rs:105:12
|
105 | pub fn new(payload: AddressPayload, network: AddressNetwork) -> Self {
| ^^^
error[E0599]: no method named `script_pubkey` found for struct `Pay2Vout` in the current scope
--> rgb/src/pay.rs:224:27
|
224 | Some(addr.script_pubkey())
| ^^^^^^^^^^^^^ method not found in `Pay2Vout`
|
help: one of the expressions' fields has a method of the same name
|
224 | Some(addr.address.script_pubkey())
| ++++++++
error[E0599]: no method named `script_pubkey` found for struct `Pay2Vout` in the current scope
--> rgb/src/pay.rs:250:30
|
250 | let s = addr.script_pubkey();
| ^^^^^^^^^^^^^ method not found in `Pay2Vout`
|
help: one of the expressions' fields has a method of the same name
|
250 | let s = addr.address.script_pubkey();
| ++++++++
error[E0599]: no method named `script_pubkey` found for struct `Pay2Vout` in the current scope
--> rgb/src/pay.rs:301:30
|
301 | let s = addr.script_pubkey();
| ^^^^^^^^^^^^^ method not found in `Pay2Vout`
|
help: one of the expressions' fields has a method of the same name
|
301 | let s = addr.address.script_pubkey();
| ++++++++
Some errors have detailed explanations: E0308, E0599.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `rgb-runtime` (lib) due to 4 previous errors
I am updating it, but in the meanwhile can you say are you on with the approach? |
I agree with the approach |
@zoedberg: here you are: RGB-WG/rgb#202 |
I've tried using #203 and RGB-WG/rgb#202, now it compiles but the call to the The error appears only when a TapretFirst wallet tries to pay an invoice containing a witness benecifiary with OpretFirst as close method and when an opret wallet tries to pay an invoice containing a witness beneficiary with TapretFirst as close method. Here the error of the first described case:
and here the error of the second described case:
|
Can you please give me a call stack when the error does happen? I am unable to understand the reason of it so far... |
Setting
|
da6db60
to
0cc06ed
Compare
The issue was fixed with RGB-WG/rgb@7717d24 |
Closes #198 and #119
I decided to address this two issues simultaneously, since it is impossible to reliable parse chunked variable-length strings; thus, in order to get chunking I had to switch to Base64 and fixed-length strings. Since we had to move from bitcoin address format with that, I used the approach as a base to add closing method in a compact form (one byte).