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

Support cast run quorum private txn #9058

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

rodionlim
Copy link

@rodionlim rodionlim commented Oct 8, 2024

This PR is raised to support debugging Quorum private transactions with cast run. Context: #9057

Motivation

Quorum private transactions are not generating the right traces with cast tooling due to the way that the client masks the actual transaction input data.

Solution

Quorum private transactions have a specified format that is unique to the blockchain. The transaction input is a 64 bytes Tessera hash, and the recovery id of a private transaction can only be 37/38. Based on the criteria, we can get the CLI to make an additional RPC call to fetch the actual private transaction input data to replace the tessera hash.

rodionlim and others added 3 commits October 8, 2024 09:15
* feat: rust error handling

* feat: pass through eth_getQuorumPayload errors

* chore: replace logs with println macro
@zerosnacks zerosnacks linked an issue Oct 8, 2024 that may be closed by this pull request
Comment on lines 235 to 236
if let Some(signature) = tx.inner.signature {
let v = signature.v;
Copy link
Member

Choose a reason for hiding this comment

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

not opposed to this, but I'd like to have this ideally as a separate function so we can properly document this and have this isolated.

this should probably also check the chainid?

Choose a reason for hiding this comment

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

Hi @mattsse

We agree on the first point to create a separate function, will update the PR

On the chainId topic:

Quorum explicitly doesn't allow a chainId of 1, it will not run if it is configured this way
https://docs.goquorum.consensys.io/concepts/network-and-chain-id

Are you saying that if chainId is 1, then is_private_quorum_txn should be false here?

Copy link
Author

Choose a reason for hiding this comment

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

@mattsse, I refactored this out into a separate function, not sure if you want it isolated via a CLI flag as well

@zerosnacks
Copy link
Member

Personally not a fan as it is highly vendor specific and therefore I would be hesitant to add this; not because of the proposed functionality of implementation but whenever we implement a feature in Foundry we try to be as neutral as possible, avoid having vendor-specific logic and avoid enshrining winners.

A good example of how a vendor specific request for Kontrol cheatcodes was turned into generalized functionality available to all and non-specific can be seen here: #4072

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Add support for debugging Quorum private transactions
5 participants