Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Unified state filter #415

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Unified state filter #415

wants to merge 8 commits into from

Conversation

CAGS295
Copy link
Contributor

@CAGS295 CAGS295 commented Nov 28, 2023

Summary of Changes

  • Unify TransactionRequest scans for stacks and bitcoin rpc calls.
  1. State is scanned when processing transaction requests. The filtering logic was repeated in a few places (e.g. stacks vs bitcoin homolog functions). This logic was a little inconsistent after the introduction of 'strict' mode, where 'log and exit early' supersedes panics in non-strict mode.
  • Retry signing_&_broacasting upon error; Transient errors like nonce collision must not stop task processing. Transient signing errors (notoriously nonce collision errors) do not halt task processing unless running in' strict' mode. Previously, errors we dealt with a dummy task event that caused issues because it was generic enough to be picked by other task-processing calls, causing the function to complain about multiple task instances being updated. Moreover, the transient errors caused the incomplete task to be stuck in limbo.

It should fix #328 and #333.
It may also fix #268, but I haven't tested it explicitly.

Testing

Risks

How were these changes tested?

I ran a deposit/withdrawal loop until errors popped. You can find the source code here.

What future testing should occur?

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link

codecov bot commented Nov 28, 2023

Codecov Report

Attention: 90 lines in your changes are missing coverage. Please review.

Comparison is base (6470223) 43.44% compared to head (724aa1a) 47.93%.
Report is 4 commits behind head on main.

Files Patch % Lines
romeo/src/system.rs 0.00% 42 Missing ⚠️
romeo/src/state/mod.rs 83.25% 35 Missing ⚠️
romeo/src/state/transaction_request.rs 87.50% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #415      +/-   ##
==========================================
+ Coverage   43.44%   47.93%   +4.48%     
==========================================
  Files          45       46       +1     
  Lines        5467     5656     +189     
  Branches       47       47              
==========================================
+ Hits         2375     2711     +336     
+ Misses       3091     2944     -147     
  Partials        1        1              
Flag Coverage Δ
unittests 76.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant