-
Notifications
You must be signed in to change notification settings - Fork 232
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
feat: (experimental) optional fee estimator with different algorithms #4477
Merged
yangby-cryptape
merged 8 commits into
nervosnetwork:develop
from
yangby-cryptape:feature/integrated-fee-estimator
Oct 24, 2024
Merged
feat: (experimental) optional fee estimator with different algorithms #4477
yangby-cryptape
merged 8 commits into
nervosnetwork:develop
from
yangby-cryptape:feature/integrated-fee-estimator
Oct 24, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yangby-cryptape
requested review from
quake,
chenyukang,
zhangsoledad and
eval-exec
and removed request for
a team
June 4, 2024 06:55
eval-exec
reviewed
Jun 7, 2024
eval-exec
reviewed
Jun 7, 2024
yangby-cryptape
force-pushed
the
feature/integrated-fee-estimator
branch
from
July 4, 2024 06:09
f7f60e0
to
1172d2d
Compare
eval-exec
reviewed
Sep 22, 2024
eval-exec
reviewed
Sep 22, 2024
eval-exec
reviewed
Sep 22, 2024
eval-exec
added
t:enhancement
Type: Feature, refactoring.
b:rpc
Break RPC interface
m:tx-pool
labels
Sep 22, 2024
eval-exec
reviewed
Sep 22, 2024
yangby-cryptape
requested review from
quake and
zhangsoledad
and removed request for
quake and
zhangsoledad
October 23, 2024 00:58
quake
previously approved these changes
Oct 23, 2024
eval-exec
previously approved these changes
Oct 23, 2024
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Oct 23, 2024
zhangsoledad
approved these changes
Oct 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Warning
This feature is experimental.
I have done lots of manual tests before submit this PR, but more production environment tests are still required.
Add an optional fee estimator with different algorithms and a RPC method for it.
Description
I do lots manual tests for several day, I don't sure which algorithm is better, so I just submit both of them.
Let's make choice after collect more data in production environment (both mainnet and testnet).
Only 4 levels of priorities for the fee estimator.
Different algorithms have different APIs, I just use some constants as default parameters to avoid specialized parameters, to make the public API more generic.
Current, there are 2 built-in algorithms:
Confirmation Fraction
Migrated from this CKB PR.
👉🏼 Sometimes, it returns unreasonable result, I haven't figured it out yet, since I couldn't reproduce it manually.
Weight-Units Flow
A variant of the Weight-Units Flow Fee Estimator for Bitcoin.
The main difference is I use the block interval to replace the time interval, to avoid unit conversion with random distributions, since our APIs require blocks as the target unit for estimation.
The details of this algorithm are written in the head section of that source code file.
Merged fallback fee estimates algorithm from #4465.
Usage
Append the following content to
ckb.toml
:And enable JSON-RPC API module
Experiment
.After the CKB node started, try the following command:
An example of result is:
What is changed and how it works?
What's Changed:
Related changes
owner/repo
:Check List
Tests
Release note