-
Notifications
You must be signed in to change notification settings - Fork 24
bugfix: fixed capacity estimation RPC #2612
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
JoeCap08055
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Do we want to add/update any tests? I believe we have e2e tests that deal with stable weights...
|
@JoeCap08055 This is only on the RPC side and doesn't involve the stable weights directly. I don't think we had any tests that needed fixing but I can maybe add one just in case. |
mattheworris
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Read through changes
🚢 it!
| const tx = ExtrinsicHelper.api.tx.frequencyTxPayment.payWithCapacity(insideTx); | ||
| const signedTx = await firstValueFrom(tx.signAsync(capacityProviderKeys)); | ||
| const signedHex = signedTx.toHex(); | ||
| // it's important to submit a signed extrinsic to the rpc to get an accurate estimate due to the actual length of extrinsic and etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
enddynayn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 superb!
Goal
The goal of this PR is to fix the bug in capacity estimation RPC.
Closes #2579
Discussion
Checklist
Verification
As shown Calculated and deducted capacity values are really close.
2,741,950 in RPC2,737,627 in Event