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

Tracing private transactions feature #6161

Merged
merged 21 commits into from
Aug 13, 2024

Conversation

NickSneo
Copy link
Contributor

PR description

PR for adding priv_traceTransaction API

Fixed Issue(s)

#5280

Copy link

github-actions bot commented Nov 12, 2023

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.
  • I thought about the changelog and included a changelog update if required.
  • If my PR includes database changes (e.g. KeyValueSegmentIdentifier) I have thought about compatibility and performed forwards and backwards compatibility tests

@macfarla
Copy link
Contributor

Hi @NickSneo - would like to see some unit and acceptance tests for this new method!

@NickSneo
Copy link
Contributor Author

Hi @NickSneo - would like to see some unit and acceptance tests for this new method!

Hey @macfarla , Sure. I am just working on it. Will push the new commits by the end of this week.

@NickSneo NickSneo marked this pull request as draft November 21, 2023 13:34
@NickSneo NickSneo marked this pull request as ready for review November 23, 2023 08:46
Copy link
Contributor

@pinges pinges left a comment

Choose a reason for hiding this comment

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

I've noticed that there is a lot of code that is very similar to existing code (e.g. see PrivateTraceGenerator vs FlatTraceGenerator).
I think it would be good to try to have less code duplication.

@NickSneo NickSneo force-pushed the nicks/private-tracing branch 2 times, most recently from 45c5137 to cc38374 Compare April 29, 2024 14:38
@NickSneo
Copy link
Contributor Author

I've noticed that there is a lot of code that is very similar to existing code (e.g. see PrivateTraceGenerator vs FlatTraceGenerator). I think it would be good to try to have less code duplication.

Hey @pinges ,

Thank you for reviewing the PR. I have resolved all the comments. For code duplication I have tried to have as less as possible, but since we want to make private and public code separate from each other, I have followed the similar approach as it is right now -> some code duplication is expected. Let me know if it is fine or I still need to change.

Also regarding the failing pipeline, It is not related to any of my change, should I try to fix that too in this PR?

@NickSneo NickSneo requested a review from pinges April 30, 2024 05:27
@NickSneo
Copy link
Contributor Author

NickSneo commented May 7, 2024

Hey @pinges @macfarla ,
Please review this PR

I've noticed that there is a lot of code that is very similar to existing code (e.g. see PrivateTraceGenerator vs FlatTraceGenerator). I think it would be good to try to have less code duplication.

Hey @pinges ,

Thank you for reviewing the PR. I have resolved all the comments. For code duplication I have tried to have as less as possible, but since we want to make private and public code separate from each other, I have followed the similar approach as it is right now -> some code duplication is expected. Let me know if it is fine or I still need to change.

Also regarding the failing pipeline, It is not related to any of my change, should I try to fix that too in this PR?

@macfarla
Copy link
Contributor

Hey @pinges @macfarla , Please review this PR

I've noticed that there is a lot of code that is very similar to existing code (e.g. see PrivateTraceGenerator vs FlatTraceGenerator). I think it would be good to try to have less code duplication.

Hey @pinges ,
Thank you for reviewing the PR. I have resolved all the comments. For code duplication I have tried to have as less as possible, but since we want to make private and public code separate from each other, I have followed the similar approach as it is right now -> some code duplication is expected. Let me know if it is fine or I still need to change.
Also regarding the failing pipeline, It is not related to any of my change, should I try to fix that too in this PR?

would it make sense to have an abstract class that FlatTrace can extend?

For the failing test - i have created an issue for it #7108 - that is not caused by this PR - but a lot of those permissioning tests are flaky lately - so if you feel like fixing them separately that would be super!

@NickSneo
Copy link
Contributor Author

would it make sense to have an abstract class that FlatTrace can extend?

For the failing test - i have created an issue for it #7108 - that is not caused by this PR - but a lot of those permissioning tests are flaky lately - so if you feel like fixing them separately that would be super!

@macfarla Sure, will create an abstract class that FlatTrace can extend. Also will look into the issue #7108

@NickSneo
Copy link
Contributor Author

NickSneo commented Jun 10, 2024

would it make sense to have an abstract class that FlatTrace can extend?

For the failing test - i have created an issue for it #7108 - that is not caused by this PR - but a lot of those permissioning tests are flaky lately - so if you feel like fixing them separately that would be super!

Hey @macfarla ,
I tried two approaches for FlatTraceGenerator and PrivateTraceGenerator -

  1. Abstract Class - But the signatures are different, and I tried to have a common signature but then goes into a rabbit hole to change a lot of classes but still failed to resolve few issues like handling ExecutedPrivateTransaction and Transaction.
  2. PrivateTraceGenerator inheriting FlatTraceGenerator - In this too failed to override common methods since singatures are different.

Right now not trying to modify logic for FlatTraceGenerator and PrivateTraceGenerator.

Also, Can we get this merged soon, so I can pick other issues too. Thanks

Edit: Any change in PrivateFlatTrace file will require whole refactoring and a lot of changes in current PR. Current solution works as expected, I think we should merge it as it is

@NickSneo
Copy link
Contributor Author

NickSneo commented Jul 3, 2024

Hey @macfarla @non-fungible-nelson ,

Can we get this PR merged soon? It is open from a long time, also I have spent a lot of time on it so it would be great to see this merged. Thanks!

@NickSneo NickSneo requested a review from macfarla July 9, 2024 14:02
Copy link
Contributor

@pinges pinges left a comment

Choose a reason for hiding this comment

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

Please have a look at the comments.

Copy link
Contributor

@pinges pinges left a comment

Choose a reason for hiding this comment

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

@NickSneo I think we are very close to get this merged. If my comments about the gas do not make sense just let me know :-)

@NickSneo
Copy link
Contributor Author

@NickSneo I think we are very close to get this merged. If my comments about the gas do not make sense just let me know :-)

Hey @pinges , Thanks for reviewing. Comments make sense, actually I got stuck in other Besu PR - EIP196 constantine bindings. I will resolve the comments and push the changes

@NickSneo
Copy link
Contributor Author

NickSneo commented Jul 26, 2024

Hey @pinges Sorry for the delay on this, I just pushed new commits to resolved comments. Please review.
Thanks!

Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

needs a changelog entry

NickSneo and others added 16 commits August 1, 2024 14:15
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
…acceptance/dsl/privacy/transaction/PrivacyTransactions.java

Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
…s/acceptance/privacy/PrivTraceTransactionAcceptanceTest.java

Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
…ateTransaction.java

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
…acceptance/dsl/transaction/privacy/PrivTraceTransaction.java

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
@NickSneo
Copy link
Contributor Author

NickSneo commented Aug 1, 2024

@pinges @macfarla Hey, I have resolved all the comments kindly review.

Thanks again!

@NickSneo
Copy link
Contributor Author

NickSneo commented Aug 12, 2024

@macfarla @pinges Hey, I have resolved all the comments. Waiting for you review and if we can get this merged?

Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

for me it looks good, @pinges can you confirm?

Copy link
Contributor

@pinges pinges left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
@pinges pinges enabled auto-merge (squash) August 13, 2024 01:44
@pinges pinges merged commit 50f8add into hyperledger:main Aug 13, 2024
40 checks passed
@joaniefromtheblock joaniefromtheblock removed the doc-change-required Indicates an issue or PR that requires doc to be updated label Aug 15, 2024
gconnect pushed a commit to gconnect/besu that referenced this pull request Aug 26, 2024
* add private tx tracing feature

Signed-off-by: Nischal Sharma <nischal@web3labs.com>
Signed-off-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: gconnect <agatevureglory@gmail.com>
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.

4 participants