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: enhance debug_traceTransaction to work with Opcode Logger #2480

Merged

Conversation

victor-yanev
Copy link
Contributor

@victor-yanev victor-yanev commented May 13, 2024

Description:

With the implemenation of /api/v1/contracts/results/{transactionIdOrHash}/opcodes in the web3 module of hedera-mirror-node, we can now utilise it by extending our support for debugging transactions.

This PR:

  • makes the neccessery changes to the debug_traceTransaction endpoint
  • adds acceptance tests for calling debug_traceTransaction with TracerType.OpcodeLogger.

Related issue(s):

Fixes #2431

Notes for reviewer:

Checklist

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

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
@victor-yanev victor-yanev added enhancement New feature or request limechain labels May 13, 2024
@victor-yanev victor-yanev self-assigned this May 13, 2024
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
@victor-yanev victor-yanev marked this pull request as ready for review May 13, 2024 13:10
Copy link

github-actions bot commented May 13, 2024

Tests

    2 files  155 suites   15s ⏱️
842 tests 841 ✔️ 1 💤 0
854 runs  853 ✔️ 1 💤 0

Results for commit 3f337e0.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented May 13, 2024

Acceptance Tests

     30 files     497 suites   45m 37s ⏱️
   605 tests    595 ✔️   3 💤   7
1 827 runs  1 782 ✔️ 26 💤 19

Results for commit 3f337e0.

♻️ This comment has been updated with latest results.

@konstantinabl
Copy link
Collaborator

LGTM, one small nit

@victor-yanev victor-yanev marked this pull request as draft May 16, 2024 08:10
Signed-off-by: nikolay <n.atanasow94@gmail.com>
@natanasow natanasow changed the title feat: Enhance debug_traceTransaction to work with Opcode Logger feat: enhance debug_traceTransaction to work with Opcode Logger Jun 6, 2024
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
@victor-yanev victor-yanev added this to the 0.50.0 milestone Jun 6, 2024
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Copy link

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
1.0% Duplication on New Code

See analysis details on SonarCloud

@victor-yanev victor-yanev marked this pull request as ready for review June 10, 2024 12:08
@victor-yanev victor-yanev requested a review from Nana-EC as a code owner June 10, 2024 12:08
@quiet-node quiet-node modified the milestones: 0.50.0, 0.51.0 Jun 17, 2024
Copy link
Contributor

@ebadiere ebadiere left a comment

Choose a reason for hiding this comment

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

LG.

Copy link
Collaborator

@natanasow natanasow left a comment

Choose a reason for hiding this comment

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

LG

@ebadiere ebadiere merged commit a04e3aa into main Jun 21, 2024
35 checks passed
@ebadiere ebadiere deleted the 2431-Enchance-debug_traceTransaction-to-work-with-opcode-logger branch June 21, 2024 13:58
quiet-node pushed a commit that referenced this pull request Jun 27, 2024
* feat: Enhance debug_traceTransaction to work with Opcode Logger

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* feat: Enhance debug_traceTransaction to work with Opcode Logger

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* chore: Remove unused imports and config variable in debug.spec.ts

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* chore: extract `getQueryParams` to helpers.ts

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* chore: fix validation

Signed-off-by: nikolay <n.atanasow94@gmail.com>

* chore: final touches

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* fix: error message in param validations

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* test: fix expected error message in server.spec.ts

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* fix: tests in debug.spec.ts

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* fix: remove unused import

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

---------

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: nikolay <n.atanasow94@gmail.com>
Co-authored-by: nikolay <n.atanasow94@gmail.com>
quiet-node pushed a commit that referenced this pull request Jun 27, 2024
* feat: Enhance debug_traceTransaction to work with Opcode Logger

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* feat: Enhance debug_traceTransaction to work with Opcode Logger

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* chore: Remove unused imports and config variable in debug.spec.ts

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* chore: extract `getQueryParams` to helpers.ts

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* chore: fix validation

Signed-off-by: nikolay <n.atanasow94@gmail.com>

* chore: final touches

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* fix: error message in param validations

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* test: fix expected error message in server.spec.ts

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* fix: tests in debug.spec.ts

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* fix: remove unused import

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

---------

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: nikolay <n.atanasow94@gmail.com>
Co-authored-by: nikolay <n.atanasow94@gmail.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
quiet-node added a commit that referenced this pull request Jun 27, 2024
* feat: enhance debug_traceTransaction to work with Opcode Logger (#2480)

* feat: Enhance debug_traceTransaction to work with Opcode Logger

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* feat: Enhance debug_traceTransaction to work with Opcode Logger

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* chore: Remove unused imports and config variable in debug.spec.ts

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* chore: extract `getQueryParams` to helpers.ts

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* chore: fix validation

Signed-off-by: nikolay <n.atanasow94@gmail.com>

* chore: final touches

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* fix: error message in param validations

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* test: fix expected error message in server.spec.ts

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* fix: tests in debug.spec.ts

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

* fix: remove unused import

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>

---------

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: nikolay <n.atanasow94@gmail.com>
Co-authored-by: nikolay <n.atanasow94@gmail.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* fix: debug_traceTransaction not working when we don't pass tracerConfig (#2628)

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

---------

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: nikolay <n.atanasow94@gmail.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Co-authored-by: Victor Yanev <161485803+victor-yanev@users.noreply.github.com>
Co-authored-by: nikolay <n.atanasow94@gmail.com>
@quiet-node quiet-node modified the milestones: 0.51.0, 0.50.0 Jun 29, 2024
@Nana-EC Nana-EC modified the milestones: 0.50.0, 0.51.0 Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request limechain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance debug_traceTransaction to work with opcode Logger
6 participants