Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

panick error when trying to transfer on an invoice #76

Closed
stefan52a opened this issue Sep 23, 2020 · 2 comments · Fixed by #90
Closed

panick error when trying to transfer on an invoice #76

stefan52a opened this issue Sep 23, 2020 · 2 comments · Fixed by #90
Assignees
Labels
bug Something isn't working
Milestone

Comments

@stefan52a
Copy link

stefan52a commented Sep 23, 2020

Are we (@Goosie and I) doing something wrong?

So we made a psbt with

bitcoin-cli --testnet createpsbt "[{\"txid\":\"0f1782599ea413b9d256b641849fab286916e68d7794a6db34cf11da7bc032c5\",\"vout\":0}]" [{\"$TO\":0.00001}]
result:

cHNidP8BAFMCAAAAAcUywHvaEc8026aUd43mFmkoq5+EQbZW0rkTpJ5ZghcPAAAAAAD/////AegDAAAAAAAAF6kU+i09h7WGCQuXxIU/EBflDCAPpIeHAAAAAAAAAA==

and converted the result from base64 encoding to binary (in ~/Downloads/downloadBINARY.psbt )

then we tried:

./rgb-cli -d ~/.rgb fungible transfer "rgb20:txo16m5gpagl3rdkj0wv5rp5fqz6fawgurhrtwalyl5xx7k6tkmc9lxqqsfxf4?asset=rgb153f8cp6aj8n5lhu3r7w6e8rj59p66srcelqncdwlh55lry832t5sdt53vt&amount=1000" ~/Downloads/downloadBINARY.psbt 100 consignment.dat updatedBINARY.psbt -vvvvv

result:

[2020-09-23T14:27:35Z INFO  rgb::cli::fungible] Transferring asset ...
[2020-09-23T14:27:35Z DEBUG rgb::cli::fungible] TransferCli { inputs: [], allocate: [], invoice: Invoice { contract_id: e952f190f129bddf353cc1cf7840ad43a1729cac9d1f91df4fe7915d077c52a4, outpoint: BlindedUtxo(cc2f78dba5ad37867ef2bb5be30e8e5c4f5a8044c3a0cc3d69db881ff580e8d6), amount: 1000.0 }, prototype: "/home/rsk/Downloads/downloadBINARY.psbt", fee: 100, consignment: "consignment.dat", transaction: "updatedBINARY.psbt" }
[2020-09-23T14:27:35Z DEBUG rgb::cli::fungible] Reading partially-signed transaction from file "/home/rsk/Downloads/downloadBINARY.psbt"
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/cli/fungible.rs:450:50
stack backtrace:
   0:     0x555c4e598f40 - std::backtrace_rs::backtrace::libunwind::trace::ha1eabb142084ea37
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:96
   1:     0x555c4e598f40 - std::backtrace_rs::backtrace::trace_unsynchronized::hbb8825661d997281
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/../../backtrace/src/backtrace/mod.rs:66
   2:     0x555c4e598f40 - std::sys_common::backtrace::_print_fmt::h26d850e2f7183914
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/sys_common/backtrace.rs:79
   3:     0x555c4e598f40 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3834b06f68a2b012
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/sys_common/backtrace.rs:58
   4:     0x555c4e5bb12c - core::fmt::write::h3a043650ba7bf668
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/core/src/fmt/mod.rs:1117
   5:     0x555c4e594ab5 - std::io::Write::write_fmt::h9c0c8944a1898139
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/io/mod.rs:1510
   6:     0x555c4e59b320 - std::sys_common::backtrace::_print::h693c0c2cc41d4d10
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/sys_common/backtrace.rs:61
   7:     0x555c4e59b320 - std::sys_common::backtrace::print::h213be73e5670b8ea
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/sys_common/backtrace.rs:48
   8:     0x555c4e59b320 - std::panicking::default_hook::{{closure}}::h2d49a3361cc4e7ea
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/panicking.rs:200
   9:     0x555c4e59b06c - std::panicking::default_hook::hd41fbdeba93207ba
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/panicking.rs:219
  10:     0x555c4e59b983 - std::panicking::rust_panic_with_hook::hcab398664b4bd473
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/panicking.rs:569
  11:     0x555c4e59b559 - std::panicking::begin_panic_handler::{{closure}}::h7512c6f2998ba93d
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/panicking.rs:476
  12:     0x555c4e5993ac - std::sys_common::backtrace::__rust_end_short_backtrace::h1a25d7e7e1864d3d
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/sys_common/backtrace.rs:153
  13:     0x555c4e59b519 - rust_begin_unwind
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/panicking.rs:475
  14:     0x555c4e5b8db1 - core::panicking::panic_fmt::h019ad16a92ccd092
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/core/src/panicking.rs:85
  15:     0x555c4e5b8cfd - core::panicking::panic::hf72d67b706869386
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/core/src/panicking.rs:50
  16:     0x555c4e207402 - rgb::cli::fungible::TransferCli::exec::h45acbc688aa50e53
  17:     0x555c4e201bc7 - rgb::cli::fungible::Command::exec::hc6761a1c4a7ef95d
  18:     0x555c4e2c1db0 - rgb::cli::config::Command::exec::h429a7ec2e1d86361
  19:     0x555c4e1740a9 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h7c3296ae971a2305
  20:     0x555c4e17df15 - std::thread::local::LocalKey<T>::with::hcef2969ceead2cc5
  21:     0x555c4e17f8fd - tokio::runtime::enter::Enter::block_on::hd54f6966b06fda3d
  22:     0x555c4e170fd9 - tokio::runtime::thread_pool::ThreadPool::block_on::h0c22bc7ab91e2777
  23:     0x555c4e1726dc - tokio::runtime::context::enter::h3db656b7deb29bfd
  24:     0x555c4e17fa9d - tokio::runtime::handle::Handle::enter::hfda293a84833d405
  25:     0x555c4e176fff - rgb_cli::main::h58be21efd758f43d
  26:     0x555c4e1715d3 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf5567830c1f50079
  27:     0x555c4e1715f5 - std::rt::lang_start::{{closure}}::h0afb3331119951de
  28:     0x555c4e59bd92 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hde9814ae740a85dc
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/core/src/ops/function.rs:265
  29:     0x555c4e59bd92 - std::panicking::try::do_call::h3026bab8cd7540d7
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/panicking.rs:373
  30:     0x555c4e59bd92 - std::panicking::try::h852bb5e5a66f7f84
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/panicking.rs:337
  31:     0x555c4e59bd92 - std::panic::catch_unwind::hfeb0f3dddf7c6a72
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/panic.rs:394
  32:     0x555c4e59bd92 - std::rt::lang_start_internal::h32f0ac6e87476559
                               at /rustc/7e6d6e5f535321c2223f044caba16f97b825009c/library/std/src/rt.rs:51
  33:     0x555c4e177102 - main
  34:     0x7f82ced9a840 - __libc_start_main
  35:     0x555c4e16aa89 - _start
  36:                0x0 - <unknown>
[2020-09-23T14:27:35Z DEBUG zmq] socket dropped
[2020-09-23T14:27:35Z DEBUG zmq] context dropped

@stefan52a stefan52a changed the title panick error when trying to transfer on an invoice request panick error when trying to transfer on an invoice Sep 23, 2020
@dr-orlovsky
Copy link
Member

RGB requires custom fields set for PSBT, seems like it fails b/c they are not set.

We will be releasing PSBT working tool next week, which will significantly simplify the process – and also make PSBT's used by RGB more standard-compliant. Will keep you updated.

@dr-orlovsky
Copy link
Member

dr-orlovsky commented Oct 10, 2020

Can you pls try with the new RC2 version (by checking it out with git checkout tag/v0.1.0-rc.2)?

PSBT tool simplifying life + reference wallet for getting tx signed from CLI are on the finalization

Updated: RC2 version is out

@dr-orlovsky dr-orlovsky self-assigned this Oct 10, 2020
@dr-orlovsky dr-orlovsky added the bug Something isn't working label Oct 10, 2020
@dr-orlovsky dr-orlovsky added this to the v0.1.0 Release milestone Oct 10, 2020
@dr-orlovsky dr-orlovsky linked a pull request Oct 21, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants