Skip to content
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: expose node account id in relay logging of failed transactions #3290

Conversation

natanasow
Copy link
Collaborator

Description:

The Relay server currently lacks visibility into which node account ID a transaction was submitted to when it fails due to an SDK error. With the recent update to the hedera-sdk-js, the error object now includes the node account ID for failed transactions.

This new capability in the Relay's logging system is expected to improve troubleshooting and provide better insights into node-specific transaction failures.

Solution:

Update the Relay server's logging system to extract and log the node account ID from the error object provided by the SDK

Related issue(s):

Fixes #3278

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: nikolay <[email protected]>
@natanasow natanasow changed the base branch from main to 3270-eth_sendrawtransaction-fast-return-add-feature-flag-and-move-all-transaction-processing-logic-in-background-if-the-feature-flag-is-enabled November 22, 2024 13:13
@natanasow natanasow self-assigned this Nov 22, 2024
@natanasow natanasow added the enhancement New feature or request label Nov 22, 2024
@natanasow natanasow added this to the 0.61.0 milestone Nov 22, 2024
Copy link

Test Results

    4 files   -  18    424 suites  +129   28s ⏱️ - 35m 48s
1 502 tests +893  1 501 ✅ +918  1 💤  - 3  0 ❌  - 22 
1 511 runs  +661  1 510 ✅ +687  1 💤  - 3  0 ❌  - 23 

Results for commit 3184eb6. ± Comparison against base commit b55ca6b.

This pull request removes 609 and adds 1502 tests. Note that renamed tests count towards both.
"before all" hook for "@release should deploy a contract" ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-1 RPC Server Acceptance Tests RPC Server Acceptance Tests eth_getLogs "before all" hook for "@release should deploy a contract"
"eth_call" for non-existing contract address returns 0x ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call "eth_call" for non-existing contract address returns 0x
001 Should call pureMultiply ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With evm address 001 Should call pureMultiply
001 Should call pureMultiply ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With long-zero address 001 Should call pureMultiply
002 Should call msgSender ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With evm address 002 Should call msgSender
002 Should call msgSender ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With long-zero address 002 Should call msgSender
003 Should call txOrigin ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With evm address 003 Should call txOrigin
003 Should call txOrigin ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With long-zero address 003 Should call txOrigin
004 Should call msgSig ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With evm address 004 Should call msgSig
004 Should call msgSig ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With long-zero address 004 Should call msgSig
…
"eth_blockNumber" return the latest block number on second try ‑ @ethGetBlockByNumber using MirrorNode "eth_blockNumber" return the latest block number on second try
"eth_blockNumber" should return the latest block number using cache ‑ @ethGetBlockByNumber using MirrorNode "eth_blockNumber" should return the latest block number using cache
"eth_blockNumber" should return the latest block number ‑ @ethGetBlockByNumber using MirrorNode "eth_blockNumber" should return the latest block number
"eth_blockNumber" should throw an error if no blocks are found after third try ‑ @ethGetBlockByNumber using MirrorNode "eth_blockNumber" should throw an error if no blocks are found after third try
"eth_blockNumber" should throw an error if no blocks are found ‑ @ethGetBlockByNumber using MirrorNode "eth_blockNumber" should throw an error if no blocks are found
Adds a revertReason field for receipts with errorMessage ‑ @ethGetTransactionReceipt eth_getTransactionReceipt tests Adds a revertReason field for receipts with errorMessage
BLOCK_HASH filter timeouts and throws the expected error ‑ @ethGetLogs using MirrorNode timeout BLOCK_HASH filter timeouts and throws the expected error
BLOCK_HASH filter ‑ @ethGetLogs using MirrorNode BLOCK_HASH filter
Can extract the account number out of an account pagination next link url ‑ MirrorNodeClient Can extract the account number out of an account pagination next link url
Can extract the evm address out of an account pagination next link url ‑ MirrorNodeClient Can extract the evm address out of an account pagination next link url
…
This pull request removes 4 skipped tests and adds 1 skipped test. Note that renamed tests count towards both.
011 Should fail when calling msgValue with more value than available balance ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With evm address 011 Should fail when calling msgValue with more value than available balance
011 Should fail when calling msgValue with more value than available balance ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests eth_call Caller contract With long-zero address 011 Should fail when calling msgValue with more value than available balance
from/to Addresses in transaction to a contract (deployed through HAPI tx) are in evm and long-zero format ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-2 RPC Server Acceptance Tests Formats of addresses in Transaction and Receipt results from/to Addresses in transaction to a contract (deployed through HAPI tx) are in evm and long-zero format
should not return contract bytecode after sefldestruct ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-2 RPC Server Acceptance Tests eth_getCode should not return contract bytecode after sefldestruct
supports optionality of request id when configured ‑ RPC Server given REQUEST_ID_IS_OPTIONAL=true are set supports optionality of request id when configured

@natanasow natanasow closed this Nov 22, 2024
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 81.35%. Comparing base (323ded7) to head (3184eb6).

Files with missing lines Patch % Lines
packages/relay/src/lib/clients/sdkClient.ts 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                                                                                 Coverage Diff                                                                                 @@
##           3270-eth_sendrawtransaction-fast-return-add-feature-flag-and-move-all-transaction-processing-logic-in-background-if-the-feature-flag-is-enabled    #3290      +/-   ##
===================================================================================================================================================================================
+ Coverage                                                                                                                                            77.99%   81.35%   +3.36%     
===================================================================================================================================================================================
  Files                                                                                                                                                   66       69       +3     
  Lines                                                                                                                                                 4472     4635     +163     
  Branches                                                                                                                                              1002     1041      +39     
===================================================================================================================================================================================
+ Hits                                                                                                                                                  3488     3771     +283     
+ Misses                                                                                                                                                 611      516      -95     
+ Partials                                                                                                                                               373      348      -25     
Flag Coverage Δ
config-service 98.14% <ø> (ø)
relay 78.72% <0.00%> (-0.05%) ⬇️
server 83.28% <ø> (ø)
ws-server 36.66% <ø> (ø)

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

Files with missing lines Coverage Δ
packages/relay/src/lib/clients/sdkClient.ts 60.25% <0.00%> (+4.22%) ⬆️

... and 20 files with indirect coverage changes

---- 🚨 Try these New Features:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose Node Account ID in Relay Logging for Failed Transactions
1 participant