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

Transaction call object to accept both input and data field if equal #6702

Merged
merged 4 commits into from
Mar 12, 2024
Merged

Transaction call object to accept both input and data field if equal #6702

merged 4 commits into from
Mar 12, 2024

Conversation

friedemannf
Copy link
Contributor

@friedemannf friedemannf commented Mar 8, 2024

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Most advanced CI tests are deferred until PR approval, but you could:

  • locally run all unit tests via: ./gradlew build
  • locally run all acceptance tests via: ./gradlew acceptanceTest
  • locally run all integration tests via: ./gradlew integrationTest
  • locally run all reference tests via: ./gradlew ethereum:referenceTests:referenceTests

PR description

#6094 introduced the option to provide the calldata via the input field instead of the deprecated data field. It also introduced a check that prevents both field from being set. This seems overly strict as it prevents clients from setting both fields to remain backward-compatible. This PR relaxes the check to only fail if both fields are set and they are not equal.

Fixed Issue(s)

fixes #6697

…being set if equal

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>
Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>
@friedemannf friedemannf changed the title relax JsonCallParameter constructor to allow for both input and data … eth_call accept both input and data field if equal Mar 8, 2024
@friedemannf friedemannf changed the title eth_call accept both input and data field if equal Transaction call object to accept both input and data field if equal Mar 8, 2024
Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>
@friedemannf
Copy link
Contributor Author

We might want to adjust the documentation here to specify this behavior:
https://besu.hyperledger.org/public-networks/reference/api/objects#transaction-call-object

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.

LGTM. test cases make it clear. Thanks for your contribution @friedemannf

@macfarla macfarla added the doc-change-required Indicates an issue or PR that requires doc to be updated label Mar 11, 2024
@macfarla
Copy link
Contributor

We might want to adjust the documentation here to specify this behavior: https://besu.hyperledger.org/public-networks/reference/api/objects#transaction-call-object

Thanks for this - added doc-change-required label for that purpose.

@macfarla macfarla enabled auto-merge (squash) March 12, 2024 01:57
@macfarla macfarla merged commit 8becd5a into hyperledger:main Mar 12, 2024
45 checks passed
MASDXI pushed a commit to MASDXI/besu that referenced this pull request Mar 13, 2024
…yperledger#6702)

* relax JsonCallParameter constructor to allow for both input and data being set if equal

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>

* fix: format

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>

* add changelog entry

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>

---------

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: MASDXI <sirawitt42@gmail.com>
@alexandratran alexandratran removed the doc-change-required Indicates an issue or PR that requires doc to be updated label Mar 27, 2024
amsmota pushed a commit to Citi/besu that referenced this pull request Apr 16, 2024
…yperledger#6702)

* relax JsonCallParameter constructor to allow for both input and data being set if equal

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>

* fix: format

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>

* add changelog entry

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>

---------

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: amsmota <antonio.mota@citi.com>
amsmota pushed a commit to Citi/besu that referenced this pull request Apr 16, 2024
…yperledger#6702)

* relax JsonCallParameter constructor to allow for both input and data being set if equal

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>

* fix: format

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>

* add changelog entry

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>

---------

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: amsmota <antonio.mota@citi.com>
matthew1001 pushed a commit to kaleido-io/besu that referenced this pull request Jun 7, 2024
…yperledger#6702)

* relax JsonCallParameter constructor to allow for both input and data being set if equal

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>

* fix: format

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>

* add changelog entry

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>

---------

Signed-off-by: Friedemann Fürst <friedemann.fuerst@smartcontract.com>
Co-authored-by: Sally MacFarlane <macfarla.github@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.

RPC call parameters do not accept input and data field simultaneously
3 participants