Skip to content

Conversation

@bragaigor
Copy link
Contributor

Improve forwarding transaction log in case of error

fixes NIT-4055

Signed-off-by: Igor Braga <5835477+bragaigor@users.noreply.github.com>
if pos == 0 {
log.Warn("error forwarding transaction trying different target", "current target", f.targets[pos], "err", err)
} else {
log.Warn("error forwarding transaction to a backup target", "target", f.targets[pos], "pos", pos, "total targets", len(f.rpcClients), "err", err)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

didn't add "trying different target" here since this could be the last target. We could add logic to determine if this is the last target but I think that would be overkill for just logging

@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.78%. Comparing base (efc1cdb) to head (37af2e8).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4288      +/-   ##
==========================================
- Coverage   33.04%   32.78%   -0.27%     
==========================================
  Files         482      482              
  Lines       57028    57031       +3     
==========================================
- Hits        18843    18695     -148     
- Misses      34778    35069     +291     
+ Partials     3407     3267     -140     

@bragaigor bragaigor marked this pull request as ready for review January 28, 2026 22:22
Copy link
Member

@KolbyML KolbyML left a comment

Choose a reason for hiding this comment

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

:shipit: looks good

@github-actions
Copy link
Contributor

❌ 6 Tests Failed:

Tests completed Failed Passed Skipped
4051 6 4045 0
View the top 3 failed tests by shortest run time
TestRedisProduceComplex/one_producer,_all_consumers_are_active
Stack Traces | 1.280s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
�[33mWARN �[0m[01-28|22:03:58.202] XClaimJustID returned empty response when indicating heartbeat �[33mmsgID�[0m=1769637837098-2
�[33mWARN �[0m[01-28|22:03:58.202] XClaimJustID returned empty response when indicating heartbeat �[33mmsgID�[0m=1769637837098-4
�[36mDEBUG�[0m[01-28|22:03:58.202] consumer: xdel                           �[36mcid�[0m=2c77d958-68c6-4a37-b012-79ab4cef9d86 �[36mmessageId�[0m=1769637837098-4
�[36mDEBUG�[0m[01-28|22:03:58.202] consumer: xack                           �[36mcid�[0m=cee2e4e5-4401-4c22-9af4-57893f93e6a8 �[36mmessageId�[0m=1769637837098-5
�[36mDEBUG�[0m[01-28|22:03:58.202] consumer: xack                           �[36mcid�[0m=8894033c-2144-42b7-9b28-96ddbfabf5aa �[36mmessageId�[0m=1769637837098-7
�[36mDEBUG�[0m[01-28|22:03:58.202] consumer: xdel                           �[36mcid�[0m=fc520f19-6489-450f-9d3e-c61b61ee3668 �[36mmessageId�[0m=1769637837098-0
�[36mDEBUG�[0m[01-28|22:03:58.202] consumer: xdel                           �[36mcid�[0m=c9170411-5c27-4f42-8ea7-86b3b5c1794f �[36mmessageId�[0m=1769637837098-1
�[36mDEBUG�[0m[01-28|22:03:58.202] consumer: xdel                           �[36mcid�[0m=cee2e4e5-4401-4c22-9af4-57893f93e6a8 �[36mmessageId�[0m=1769637837098-5
�[36mDEBUG�[0m[01-28|22:03:58.202] consumer: xack                           �[36mcid�[0m=fb4da67c-60c0-41dc-a1a4-366e2c3b486f �[36mmessageId�[0m=1769637837098-6
�[36mDEBUG�[0m[01-28|22:03:58.202] consumer: xdel                           �[36mcid�[0m=fb4da67c-60c0-41dc-a1a4-366e2c3b486f �[36mmessageId�[0m=1769637837098-6
�[36mDEBUG�[0m[01-28|22:03:58.202] consumer: xdel                           �[36mcid�[0m=8894033c-2144-42b7-9b28-96ddbfabf5aa �[36mmessageId�[0m=1769637837098-7
�[36mDEBUG�[0m[01-28|22:03:58.204] consumer: xdel                           �[36mcid�[0m=d60234eb-168f-4d19-b0fe-85ca3c807990 �[36mmessageId�[0m=1769637837098-3
�[36mDEBUG�[0m[01-28|22:03:58.215] checkResponses                           �[36mresponded�[0m=40 �[36merrored�[0m=0 �[36mchecked�[0m=100
�[36mDEBUG�[0m[01-28|22:03:58.220] redis producer: check responses starting
�[31mERROR�[0m[01-28|22:03:58.253] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpendingLen�[0m=0
�[36mDEBUG�[0m[01-28|22:03:58.253] checkResponses                           �[36mresponded�[0m=60 �[36merrored�[0m=0 �[36mchecked�[0m=60
�[31mERROR�[0m[01-28|22:03:58.254] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpendingLen�[0m=0
�[31mERROR�[0m[01-28|22:03:58.256] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpendingLen�[0m=0
�[36mDEBUG�[0m[01-28|22:03:58.356] Error destroying a stream group          �[36merror�[0m="dial tcp 127.0.0.1:43955: connect: connection refused"
--- FAIL: TestRedisProduceComplex/one_producer,_all_consumers_are_active (1.28s)
TestRedisProduceComplex/two_producers,_some_consumers_killed,_one_retrying_consumer_take_over_their_work,_unequal_number_of_requests_from_producers
Stack Traces | 2.040s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
�[36mDEBUG�[0m[01-28|22:04:23.888] checkResponses                           �[36mresponded�[0m=0   �[36merrored�[0m=0 �[36mchecked�[0m=0
�[36mDEBUG�[0m[01-28|22:04:23.892] redis producer: check responses starting
�[36mDEBUG�[0m[01-28|22:04:23.893] checkResponses                           �[36mresponded�[0m=0   �[36merrored�[0m=0 �[36mchecked�[0m=2
�[36mDEBUG�[0m[01-28|22:04:23.894] redis producer: check responses starting
�[36mDEBUG�[0m[01-28|22:04:23.894] checkResponses                           �[36mresponded�[0m=0   �[36merrored�[0m=0 �[36mchecked�[0m=0
�[36mDEBUG�[0m[01-28|22:04:23.898] redis producer: check responses starting
�[36mDEBUG�[0m[01-28|22:04:23.898] checkResponses                           �[36mresponded�[0m=0   �[36merrored�[0m=0 �[36mchecked�[0m=2
�[36mDEBUG�[0m[01-28|22:04:23.899] redis producer: check responses starting
�[36mDEBUG�[0m[01-28|22:04:23.899] checkResponses                           �[36mresponded�[0m=0   �[36merrored�[0m=0 �[36mchecked�[0m=0
�[36mDEBUG�[0m[01-28|22:04:23.903] redis producer: check responses starting
�[36mDEBUG�[0m[01-28|22:04:23.903] checkResponses                           �[36mresponded�[0m=0   �[36merrored�[0m=0 �[36mchecked�[0m=2
�[36mDEBUG�[0m[01-28|22:04:23.904] redis producer: check responses starting
�[36mDEBUG�[0m[01-28|22:04:23.904] checkResponses                           �[36mresponded�[0m=0   �[36merrored�[0m=0 �[36mchecked�[0m=0
�[36mDEBUG�[0m[01-28|22:04:23.908] redis producer: check responses starting
�[36mDEBUG�[0m[01-28|22:04:23.909] request timed out waiting for response   �[36mmsgId�[0m=1769637861904-15 �[36mallowedOldestId�[0m=1769637861908-0
�[36mDEBUG�[0m[01-28|22:04:23.909] request timed out waiting for response   �[36mmsgId�[0m=1769637861904-14 �[36mallowedOldestId�[0m=1769637861908-0
�[36mDEBUG�[0m[01-28|22:04:23.909] checkResponses                           �[36mresponded�[0m=0   �[36merrored�[0m=2 �[36mchecked�[0m=2
    pubsub_test.go:385: Unexpected error while awaiting responses, producer: 1, response: 124, err: error getting response, request has been waiting for too long
    pubsub_test.go:385: Unexpected error while awaiting responses, producer: 1, response: 125, err: error getting response, request has been waiting for too long
--- FAIL: TestRedisProduceComplex/two_producers,_some_consumers_killed,_one_retrying_consumer_take_over_their_work,_unequal_number_of_requests_from_producers (2.04s)
TestVersion30
Stack Traces | 9.150s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
INFO [01-28|22:16:04.829] Submitted contract creation              hash=0x83680809d5ed299c3c461d7902c35ce4b1dd2ff4d49d0cb4824640ff1e1ad26c from=0x57Ff0F473737a1c161bfF9efDF016F7991585088 nonce=23   contract=0xB211efa485d87C29b9486E7631D3140e16D28E08 value=0
    precompile_inclusion_test.go:94: goroutine 610021 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x409de70, 0xc066a55a40}, {0x405aac0, 0xc11eb727b0}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/system_tests.Require(0xc066a55a40, {0x405aac0, 0xc11eb727b0}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:2049 +0x5d
        github.com/offchainlabs/nitro/system_tests.testPrecompiles(0xc066a55a40, 0x1e, {0xc1204b9db0, 0x6, 0x0?})
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:94 +0x371
        github.com/offchainlabs/nitro/system_tests.TestVersion30(0xc066a55a40?)
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:67 +0x798
        testing.tRunner(0xc066a55a40, 0x3cdb638)
        	/opt/hostedtoolcache/go/1.25.6/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.6/x64/src/testing/testing.go:1997 +0x465
        
    precompile_inclusion_test.go:94: �[31;1m [] execution aborted (timeout = 5s) �[0;0m
WARN [01-28|22:16:13.858] Served eth_call                          reqid=11   duration=9.088381208s  err="execution aborted (timeout = 5s)"
--- FAIL: TestVersion30 (9.15s)

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

@KolbyML KolbyML assigned bragaigor and unassigned KolbyML Jan 28, 2026
@bragaigor bragaigor assigned joshuacolvin0 and unassigned bragaigor Jan 28, 2026
Copy link
Member

@joshuacolvin0 joshuacolvin0 left a comment

Choose a reason for hiding this comment

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

LGTM

@joshuacolvin0 joshuacolvin0 added this pull request to the merge queue Jan 29, 2026
Merged via the queue into master with commit 70adb95 Jan 29, 2026
27 checks passed
@joshuacolvin0 joshuacolvin0 deleted the braga/soft-warn-level-targets branch January 29, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants