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

[open_channel,shutdown_channel] shutdown_channel failed when script length too long #274

Open
gpBlockchain opened this issue Oct 22, 2024 · 0 comments

Comments

@gpBlockchain
Copy link

step

  1. node1 call open_channel(200 ckb with large shutdown_script )
  2. node1 transfer node2 100 ckb
  3. node2 call shutdown_channel return null ,but shutdown failed
curl --location 'http://127.0.0.1:8228' --header 'Content-Type: application/json' --data '{
    "id": 42,
    "jsonrpc": "2.0",
    "method": "open_channel",
    "params": [
        {
            "peer_id": "QmSwY5HeBXPwQgTbpkqQera8bNWRo9V3fuoqsibcMNCsBh",
            "funding_amount": "0x4a817c800",
            "public": true,
            "shutdown_script": {
                "code_hash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
                "hash_type": "type",
                "args": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9f9bd7e06f3ecf4be0f2fcd2188b23f1b9f9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce89bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8"
            }
        }
    ]
}'
curl --location 'http://127.0.0.1:8229' --header 'Content-Type: application/json' --data '{
    "id": 42,
    "jsonrpc": "2.0",
    "method": "shutdown_channel",
    "params": [
        {
            "channel_id": "0x2bc579682173564511b9fc1dcacb7f1d01a1ce73393b4bac191944ee49b23b58",
            "close_script": {
                "code_hash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
                "hash_type": "type",
                "args": "0x470dcdc5e44064909650113a274b3b36aecb6dc7"
            },
            "fee_rate": "0x3FC"
        }
    ]
}'
response:
{"jsonrpc": "2.0", "result": null, "id": 42}
  2024-10-22T10:26:05.908364Z ERROR fnn::fiber::network: Closing transaction Byte32(0xca9915105d0c01c80db18dd8820140eb78222f5ff2a8463ded715affd81b3c65) failed to be confirmed with final status TraceTxResponse { tx: None, status: TxStatus { status: Rejected, block_number: None, block_hash: None, tx_index: None, reason: Some("Sending transaction failed: Rpc(Error { code: ServerError(-302), message: \"TransactionFailedToVerify: Verification failed Transaction(InsufficientCellCapacity(Outputs[1]): expected occupied capacity (0xf224d4a00) <= capacity (0x2540be400))\", data: Some(String(\"Verification(Error { kind: Transaction, inner: InsufficientCellCapacity(Outputs[1]): expected occupied capacity (0xf224d4a00) <= capacity (0x2540be400)\\n\\nStack backtrace:\\n   0: std::backtrace::Backtrace::capture\\n   1: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from\\n   2: ckb_verification::transaction_verifier::CapacityVerifier::verify\\n   3: ckb_tx_pool::util::verify_rtx::{{closure}}::{{closure}}\\n   4: ckb_tx_pool::util::verify_rtx::{{closure}}\\n   5: ckb_tx_pool::process::<impl ckb_tx_pool::service::TxPoolService>::_process_tx::{{closure}}\\n   6: ckb_tx_pool::process::<impl ckb_tx_pool::service::TxPoolService>::process_tx::{{closure}}\\n   7: ckb_tx_pool::service::process::{{closure}}\\n   8: ckb_async_runtime::Handle::spawn::{{closure}}\\n   9: tokio::runtime::task::raw::poll\\n  10: tokio::runtime::scheduler::multi_thread::worker::Context::run_task\\n  11: tokio::runtime::scheduler::multi_thread::worker::run\\n  12: tokio::runtime::task::raw::poll\\n  13: std::sys_common::backtrace::__rust_begin_short_backtrace\\n  14: core::ops::function::FnOnce::call_once{{vtable.shim}}\\n  15: std::sys::unix::thread::Thread::new::thread_start\\n  16: __pthread_joiner_wake })\")) })") } }

node.log

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

No branches or pull requests

1 participant