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 fields to eth_getTransaction series of RPCs #1835

Merged
merged 6 commits into from
Jan 27, 2021

Conversation

shemnon
Copy link
Contributor

@shemnon shemnon commented Jan 26, 2021

Add fields for chainId, publicKey, and raw to RPCs where detailed
transaction data is returned (eth_getTransactionByBlockHash,
eth_getTransactionByBlockNumber, eth_getTransactionByHash, and
eth_getBlock with certain parameters).

Addresses #1802

Signed-off-by: Danno Ferrin [email protected]

Changelog

Add fields for `chainId`, `publicKey`, and `raw` to RPCs where detailed
transaction data is returned (`eth_getTransactionByBlockHash`,
`eth_getTransactionByBlockNumber`, `eth_getTransactionByHash`, and
`eth_getBlock` with certain parameters).

Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: Danno Ferrin <[email protected]>
Comment on lines +408 to +412
public Optional<String> getPublicKey() {
return SECP256K1.PublicKey.recoverFromSignature(getOrComputeSenderRecoveryHash(), signature)
.map(PublicKey::toString);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

(optional) Maybe make this return PublicKey and have the caller toString it?

CHANGELOG.md Outdated
@@ -11,6 +11,7 @@
* `--skip-pow-validation-enabled` is now an error with `block import --format JSON`. This is because the JSON format doesn't include the nonce so the proof of work must be calculated. [\#1815](https://github.com/hyperledger/besu/pull/1815)
* Added a new CLI option `--Xlauncher` to start a mainnet launcher. It will help to configure Besu easily.
* Return the revert reason from `eth_call` JSON-RPC api calls when the contract causes a revert. [\#1829](https://github.com/hyperledger/besu/pull/1829)
* Added `chainId`, `publicKey`, and `raw` to JSON-RPC api calls returning detailed transaction results. [\#1835]((https://github.com/hyperledger/besu/pull/1835)
Copy link
Contributor

Choose a reason for hiding this comment

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

s/((/(

CHANGELOG.md Outdated
@@ -11,6 +11,7 @@
* `--skip-pow-validation-enabled` is now an error with `block import --format JSON`. This is because the JSON format doesn't include the nonce so the proof of work must be calculated. [\#1815](https://github.com/hyperledger/besu/pull/1815)
* Added a new CLI option `--Xlauncher` to start a mainnet launcher. It will help to configure Besu easily.
* Return the revert reason from `eth_call` JSON-RPC api calls when the contract causes a revert. [\#1829](https://github.com/hyperledger/besu/pull/1829)
* Added `chainId`, `publicKey`, and `raw` to JSON-RPC api calls returning detailed transaction results. [\#1835]((https://github.com/hyperledger/besu/pull/1835)

### Bug Fixes
* Ethereum classic heights will no longer be reported in mainnet metrics. Issue [\#1751]((https://github.com/hyperledger/besu/pull/1751) Fix [\#1820](https://github.com/hyperledger/besu/pull/1820)
Copy link
Contributor

Choose a reason for hiding this comment

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

s/((/(

@shemnon shemnon added the doc-change-required Indicates an issue or PR that requires doc to be updated label Jan 27, 2021
@shemnon
Copy link
Contributor Author

shemnon commented Jan 27, 2021

Doc change is to update the JSON-RPC samples to show the three included fields in calls to eth_getTransactionByBlockHash,
eth_getTransactionByBlockNumber, eth_getTransactionByHash and maybe eth_block

@shemnon shemnon enabled auto-merge (squash) January 27, 2021 04:50
Signed-off-by: Danno Ferrin <[email protected]>
@shemnon shemnon merged commit 27521c5 into hyperledger:master Jan 27, 2021
@shemnon shemnon deleted the moreTxFields branch February 26, 2022 18:42
@bgravenorst bgravenorst removed the doc-change-required Indicates an issue or PR that requires doc to be updated label Mar 4, 2022
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
Add fields for `chainId`, `publicKey`, and `raw` to RPCs where detailed
transaction data is returned (`eth_getTransactionByBlockHash`,
`eth_getTransactionByBlockNumber`, `eth_getTransactionByHash`, and
`eth_getBlock` with certain parameters).

Signed-off-by: Danno Ferrin <[email protected]>
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