Closed trajan0x closed 6 days ago
The changes in chain_queue.go
aim to enhance the calculation of pending transactions by introducing the calculatePendingTxes
function. It computes the number of pending transactions based on their nonce. Additionally, the metrics recording for pending transactions has been updated within the chainPendingQueue
function to reflect these calculations accurately.
File | Change Summary |
---|---|
ethergo/submitter/chain_queue.go | Added calculatePendingTxes function to calculate pending transactions and updated metrics recording in chainPendingQueue . |
sequenceDiagram
participant User
participant chainPendingQueue
participant calculatePendingTxes
User ->> chainPendingQueue: Call function
chainPendingQueue ->> calculatePendingTxes: Calculate pending txes
calculatePendingTxes -->> chainPendingQueue: Number of pending txes
chainPendingQueue ->> User: Updated metrics
Objective | Addressed | Explanation |
---|---|---|
Investigate pending charts not increasing due to low balance (#2817) | ✅ |
In the queue where transactions roam,
A count of pending txes found its home,
Nonce by nonce, they tally high,
Metrics soaring to the sky,
Calculations clear, the data shown,
Bugs now fixed, our code has grown.
[!TIP]
Early access features
- OpenAI `gpt-4o` model for reviews and chat. Note: - You can disable early access features from the CodeRabbit UI or by setting `early_access: false` in the CodeRabbit configuration file. - Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide feedback and report issues. - OSS projects are always opted into early access features.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 25.55943%. Comparing base (
1777040
) to head (0d8b5ce
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Latest commit: |
0d8b5ce
|
Status: | ✅ Deploy successful! |
Preview URL: | https://406407a6.sanguine-fe.pages.dev |
Branch Preview URL: | https://fix-2817.sanguine-fe.pages.dev |
[goreleaser]
Description
Fixes #2817.
In #2817, what happened was we concluded here:
https://github.com/synapsecns/sanguine/blob/4448759db11657e6aba9a336be58c1a31307928c/ethergo/submitter/chain_queue.go#L99-L103
That the txes were not bumpable and as such we never recorded
len(cq.reprocessQueue)
since the metric was an observable, we didn't get stale data either.I know why we use observables here, but it's possible we'll want to consider some future work for when metrics get full
Summary by CodeRabbit