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

add JSON-RPC method to call /storeraw on GoQuorum enclave #1859

Merged
merged 20 commits into from
Feb 8, 2021

Conversation

macfarla
Copy link
Contributor

@macfarla macfarla commented Feb 1, 2021

PR description

override existing JSON-RPC method: priv_distributeRawTransaction which is a proxy to Tessera's /storeraw - and the factory chooses which implementation to create, depending on whether go-quorum mode is enabled.

/storeraw is required to process GoQuorum private transactions via EthSigner (analogous to priv_distributeRawTransaction for Orion)

Fixed Issue(s)

refs https://github.com/ConsenSys/protocol-misc/issues/256

Changelog

{
    "jsonrpc": "2.0",
    "method": "goquorum_storeRaw",
    "params": [
        "tQEmN0d/xXJZs5OMgl8QVBIyYxu1XubAKehsSYbcOjbxai+QJQpEOs6ghrYAZizLtnM4EJdMyVeVrxO3cA9JJA=="
    ],
    "id": 1
}

Gives result:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "aC4t8i1td8+JWL31qNaV9i1rVc6gRwdPspRJhGTz4CL92MI7by9K/gvkwrtBc7BazNw3Yyu6fuDWs1JUGvEKjA=="
}

Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
@macfarla macfarla requested a review from pinges February 1, 2021 01:29
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
…essera for storing

Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
@macfarla macfarla changed the title add /storeraw endpoint to GoQuorum enclave add JSON-RPC method to call /storeraw on GoQuorum enclave Feb 3, 2021
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
…group

Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
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 added another comment!
Would be nice if we could make sure that the right distribute RPC is used when both, PRIV and GOQUORUM RPCs are enabled!

final String methodName = rpcMethod.getName();
if (methodName.equals(RpcMethod.ETH_SEND_RAW_PRIVATE_TRANSACTION.getMethodName())) {
return rpcMethod;
} else if (methodName.equals(RpcMethod.PRIV_DISTRIBUTE_RAW_TRANSACTION.getMethodName())
Copy link
Contributor

Choose a reason for hiding this comment

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

can this be removed now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not quite

Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
@macfarla
Copy link
Contributor Author

macfarla commented Feb 5, 2021

I've added another comment!
Would be nice if we could make sure that the right distribute RPC is used when both, PRIV and GOQUORUM RPCs are enabled!

to achieve this I have given them different method names

@macfarla macfarla closed this Feb 8, 2021
@macfarla macfarla deleted the goquorum-store-raw branch February 8, 2021 00:03
@macfarla macfarla restored the goquorum-store-raw branch February 8, 2021 00:15
@macfarla macfarla reopened this Feb 8, 2021
@macfarla macfarla merged commit 1de067b into hyperledger:master Feb 8, 2021
@macfarla macfarla deleted the goquorum-store-raw branch February 8, 2021 00:44
davemec pushed a commit to davemec/besu that referenced this pull request Feb 8, 2021
…r#1859)

* added GoQuorumStoreRawPrivateTransaction that can send a payload to Tessera for storing

Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
RichardH92 pushed a commit to RichardH92/besu that referenced this pull request Mar 29, 2021
…r#1859)

* added GoQuorumStoreRawPrivateTransaction that can send a payload to Tessera for storing

Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Richard Hart <richardhart92@gmail.com>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
…r#1859)

* added GoQuorumStoreRawPrivateTransaction that can send a payload to Tessera for storing

Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
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.

2 participants