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

fix(rpc): make data field in EthCallMessage optional #5357

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

hanabi1224
Copy link
Contributor

@hanabi1224 hanabi1224 commented Feb 27, 2025

Summary of changes

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes #5352

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@hanabi1224 hanabi1224 force-pushed the hm/make-data-field-optional-in-eth-call-message branch from 1108d6a to 0896b12 Compare February 27, 2025 12:59

let bytes = decode_payload(&msg_rct.return_data(), CBOR)?;
Ok(bytes)
let return_data = msg_rct.return_data();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

if msg.To == builtintypes.EthereumAddressManagerActorAddr {
		return ethtypes.EthBytes{}, nil
	} else if len(invokeResult.MsgRct.Return) > 0 {
		return cbg.ReadByteArray(bytes.NewReader(invokeResult.MsgRct.Return), uint64(len(invokeResult.MsgRct.Return)))
	}

	return ethtypes.EthBytes{}, nil

@hanabi1224 hanabi1224 force-pushed the hm/make-data-field-optional-in-eth-call-message branch from 0896b12 to 44442fd Compare February 27, 2025 13:36
@hanabi1224 hanabi1224 marked this pull request as ready for review February 27, 2025 14:03
@hanabi1224 hanabi1224 requested a review from a team as a code owner February 27, 2025 14:03
@hanabi1224 hanabi1224 requested review from lemmih, LesnyRumcajs and AlexeyKrasnoperov and removed request for a team February 27, 2025 14:03
Copy link
Member

@LesnyRumcajs LesnyRumcajs left a comment

Choose a reason for hiding this comment

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

changelog entry?

@hanabi1224
Copy link
Contributor Author

changelog entry?

@LesnyRumcajs added.

CHANGELOG.md Outdated
@@ -112,6 +112,8 @@

- [#5213](https://github.com/ChainSafe/forest/issues/5213) Fix incorrect results for the `Filecoin.EthGetLogs` RPC method on ranges that include null tipsets.

- [#5357](https://github.com/ChainSafe/forest/issues/5357) Make data field in EthCallMessage optional.
Copy link
Member

Choose a reason for hiding this comment

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

This isn't helpful to the changelog reader - it's an implementation detail. What would be beneficial is mentioning the RPC methods affected by this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

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.

eth_estimateGas requires data parameter, which is not required by spec
2 participants