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

Transaction generated by ckb-cli deploy gen-txs is rejected #575

Closed
XuJiandong opened this issue Jan 5, 2024 · 3 comments
Closed

Transaction generated by ckb-cli deploy gen-txs is rejected #575

XuJiandong opened this issue Jan 5, 2024 · 3 comments
Assignees

Comments

@XuJiandong
Copy link

XuJiandong commented Jan 5, 2024

Rejected with following information:

[send cell transaction]: 0xe61b097a77057c116116e39a884c79ecd30046b1c90dca8437f68bff8c7da247
Send transaction error: jsonrpc error: `Server error: PoolRejectedTransactionByMinFeeRate: The min fee rate is 1000 shannons/KW, so the transaction fee should be 1591 shannons at least, but only got 1506

There is not enough fee after balancing:

let balanced_tx = balance_tx_capacity(

Increasing fee-rate to 1200 can solve this issue.

@XuJiandong
Copy link
Author

XuJiandong commented Jan 6, 2024

It happens in multisig scenario. The delta is computed as 1591 - 1506, resulting in 85. Interestingly, this value aligns precisely with the combined size of a pubkey hash (20) and a signature (65). I am contemplating whether there could be an error in the witness calculation for multisig. See:

https://github.com/nervosnetwork/ckb-system-scripts/blob/a7b7c75662ed950c9bd024e15f83ce702a54996e/c/secp256k1_blake160_multisig_all.c#L26-L27

@XuJiandong
Copy link
Author

Please find the attached info.json used in deployment with the transaction.

info.json.gz

The expected fee-rate is 1600 but actually it is lower than that.

@EthanYuan EthanYuan self-assigned this Feb 28, 2024
@EthanYuan
Copy link
Collaborator

EthanYuan commented Mar 28, 2024

I simulated twice multisig contract(omnilock) deployments, one new deploy and one upgraded deploy, and both were successful at the default fee-rate of 1000.

ckb-cli version: v1.8.0-rc1

@doitian doitian closed this as completed Apr 1, 2024
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

3 participants