-
Notifications
You must be signed in to change notification settings - Fork 973
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(state): Integrate new Signer for concurrent tx submission #3298
Conversation
There are a lot more relevant issues that this PR would close. |
Agree, bc it seems that neither EstimateGas nor Simulate don't include tx options in the calculation and we are running out of gas. Should this multiplier be dynamically changed depending on the amount of options? |
I think it should be fixed. We should have a sane conservative default (like 1.2x) and add a field in the relevant config for users to change it if they need to. Fees are so cheap I don't think people will mind slightly overestimating the gas in exchange for better UX |
We talked about this in-sync but we need a way for the signer to be able to start with a key that may not "exist" yet (unfunded account). Otherwise construction of Signer is not possible for a newly instantiated node where the account is not yet funded. cc @cmwaters |
After further discussion, @cmwaters and I agreed that it might make more sense to handle for the case that node is started with an unfunded account inside of node codebase rather than inside the signer as the signer is just a wrapper for writes to state which cannot happen when the account is not funded. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3298 +/- ##
==========================================
+ Coverage 44.83% 44.88% +0.05%
==========================================
Files 265 272 +7
Lines 14620 15120 +500
==========================================
+ Hits 6555 6787 +232
- Misses 7313 7567 +254
- Partials 752 766 +14 ☔ View full report in Codecov by Sentry. |
Waiting on response regarding defaults for state module blob submission |
Let's do this in a later PR |
8e6c71e
to
5cdfcfd
Compare
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.
d93e325
to
78c8c22
Compare
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.
Finally, it only took 4 months to get it out 😬
Is there anything that SubmitTx
could benefit from using the Signer? Like retries?
cc @cmwaters
Closes: #3296
This adds the
Signer
struct from celestia-app's user package.Signer keeps track of both the network and local sequence number allowing for multiple messages to be signed within a single block.
This also uses the
EstimateGas
function of the signer to estimate the gas, when the user provides 0 as thegasLim
TODO: we should probably introduce some gas multiplier (default: 1.1) to the
EstimateGas
as it seems to underestimate the value (cc @vgonkivs)