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

Support the fee estimation via tx size and virtual bytes #454

Open
homura opened this issue Nov 4, 2022 · 1 comment
Open

Support the fee estimation via tx size and virtual bytes #454

homura opened this issue Nov 4, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@homura
Copy link
Collaborator

homura commented Nov 4, 2022

Is your feature request related to a problem? Please describe.

lumos currently only implements tx fee estimation based on tx size, lumos needs to support tx fee estimation based on virtual bytes.

Describe the solution you'd like

Design a module to support asynchronous estimation of the tx fee process for assembling transactions

Additional context

function calculateFee(size: number, feeRate: bigint): bigint {
const result = calculateFeeCompatible(size, feeRate);
return BigInt(result.toString());
}

https://github.com/nervosnetwork/ckb/blob/5aa8b426d0aef48c5a854a74176b5eb9b85896fb/tx-pool/src/component/mod.rs#L19-L28

https://github.com/nervosnetwork/ckb/blob/develop/rpc/README.md#method-estimate_cycles

@homura homura added the enhancement New feature or request label Nov 4, 2022
@gpBlockchain
Copy link
Contributor

nervosnetwork/ckb#3684

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants