Handle all breaking changes for the patch #222

Merged
abdulrabbani00 merged 2 commits from v1.10.17-statediff-v3.2.0 into v1.10.17-statediff-v3 2022-04-06 18:44:49 +00:00
abdulrabbani00 commented 2022-04-06 14:59:03 +00:00 (Migrated from github.com)

The major change to integrate the patch has been:

  • Updating the arguments for rlp.EncodeToBytes. This function accepts interfaces, but since the last update, it is better to pass in a pointer to the function.
  • From the Ethereum Release Notes: "Compatibility note about core/types: For optimization purposes, types.Header and other types in this package now implement the rlp.Encoder interface. This change can cause incompatibilities because the new method is implemented with pointer receiver. Attempting to RLP-encode unadressable (i.e. non-pointer) values of type Header does not work anymore and will result in an error."
  • Instead of just updating all the headers. I have updated all parameters for the rlp.EncodeToBytes to be pointers instead of values.

Please take a close look at the updates. The functions won't fail if a non-pointer is passed (in most cases), but we could be unexpected behaviors.

The major change to integrate the patch has been: * Updating the arguments for `rlp.EncodeToBytes`. This function accepts interfaces, but since the last update, it is better to pass in a pointer to the function. * From the Ethereum Release Notes: *"Compatibility note about `core/types`: For optimization purposes, `types.Header` and other types in this package now implement the `rlp.Encoder` interface. This change can cause incompatibilities because the new method is implemented with pointer receiver. Attempting to RLP-encode unadressable (i.e. non-pointer) values of type `Header` does not work anymore and will result in an error."* * Instead of just updating all the headers. I have updated all parameters for the `rlp.EncodeToBytes` to be pointers instead of values. __Please take a close look at the updates__. The functions won't fail if a non-pointer is passed (in most cases), but we could be unexpected behaviors.
i-norden requested changes 2022-04-06 15:42:15 +00:00
i-norden left a comment
Member

LGTM, nothing critical just identified places where it is already the pointer.

LGTM, nothing critical just identified places where it is already the pointer.
abdulrabbani00 (Migrated from github.com) reviewed 2022-04-06 17:55:26 +00:00
i-norden approved these changes 2022-04-06 18:29:34 +00:00
i-norden left a comment
Member

Thanks!

Thanks!
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/go-ethereum#222
No description provided.