Skip to content

morph: make client retry if fallback transaction was accepted#3798

Open
carpawell wants to merge 1 commit intomasterfrom
feat/container-removal-retries
Open

morph: make client retry if fallback transaction was accepted#3798
carpawell wants to merge 1 commit intomasterfrom
feat/container-removal-retries

Conversation

@carpawell
Copy link
Member

If complex notary invocation flow failed, retry transaction sending the same way it is done for ErrMempoolCapReached problems. Contract storages (and, therefore, GAS payments) may change b/w SN's test invocations and real transaction acceptance tries, and it is normal. In particular, it fixes #3739.

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.56%. Comparing base (bfb9c89) to head (a2d3310).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pkg/morph/client/static.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3798      +/-   ##
==========================================
+ Coverage   25.55%   25.56%   +0.01%     
==========================================
  Files         660      660              
  Lines       42663    42664       +1     
==========================================
+ Hits        10903    10909       +6     
+ Misses      30753    30751       -2     
+ Partials     1007     1004       -3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

err := invokeFunc()
if err != nil {
if errors.Is(err, neorpc.ErrMempoolCapReached) {
if errors.Is(err, neorpc.ErrMempoolCapReached) || errors.Is(err, notary.ErrFallbackAccepted) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallback? Why anyone cares about fallback here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if IR cannot accept transaction, doesn't it lead to FB being accepted instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it has no problems accepting a transaction in #3739.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, i got you. then i can suggest retrying every time we get a non-HALT tx state for every CallWithAlphabetWitness call (likely that will lead to many backoffs when anything is not right in vm execution, any correct panic in our contract call), or we may do a string search for insufficient amount of gas

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of GAS only. If execution fails for other reasons that's likely a permanent error (for example, container was locked before deletion attempt and now it can't be deleted).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added search for insufficient amount of gas. also can be a narrower System.Storage.Get failed

If complex notary invocation flow failed, retry transaction sending the same way
it is done for `ErrMempoolCapReached` problems. Contract storages (and,
therefore, GAS payments) may change b/w SN's test invocations and real
transaction acceptance tries, and it is normal. In particular, it fixes #3739.

Signed-off-by: Pavel Karpy <[email protected]>
@carpawell carpawell force-pushed the feat/container-removal-retries branch from 9572ea8 to a2d3310 Compare February 4, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Container can't be removed because of insufficient GAS

2 participants