Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Handle empty user state for sender/reciever on Rollup.disputeTransitionTransfer #655

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jacque006
Copy link
Collaborator

@jacque006 jacque006 commented Aug 17, 2021

Resolves #654

TODO

  • Fix Stack too deep, try removing local variables. error in numerous places.
  • Fix toIndex dispute test case.
  • Update/improve test cases. (May push remaining work on this to another issue)

@github-actions github-actions bot added contracts This PR changes some contracts client This PR is about implementing the client labels Aug 17, 2021
@jacque006 jacque006 force-pushed the contracts/bug-empty-user-state branch from efd9681 to 2597253 Compare August 23, 2021 22:31
@jacque006 jacque006 marked this pull request as ready for review August 23, 2021 22:31
@jacque006 jacque006 changed the title WIP Handle empty user state for sender/reciever on Rollup.disputeTransitionTransfer Handle empty user state for sender/reciever on Rollup.disputeTransitionTransfer Aug 23, 2021
@jacque006 jacque006 force-pushed the contracts/bug-empty-user-state branch from 2597253 to d3d3fa9 Compare August 23, 2021 22:35
@jacque006 jacque006 marked this pull request as draft August 24, 2021 15:39
@jacque006
Copy link
Collaborator Author

Re-working based on feedback #654 (comment)

Add stateHash field to StateMerkleProof to allow proof to dispute empty to/from indexes.
Sync some enums from Types.sol to match up in TS types in client.
Add more extensive test cases for disputeTransitionTransfer for triggering rollbacks.
Typo signautre -> signature.
Copy link
Collaborator

@ChihChengLiang ChihChengLiang left a comment

Choose a reason for hiding this comment

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

Looks good. The Transition part looks solid.

Comment on lines +10 to +11
bytes32 public constant ZERO_BYTES32 =
0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good one moving ZERO_BYTES32 here

Comment on lines +32 to +35
* @dev If this is not being externally consumed, it can be removed.
*/
// solhint-disable-next-line var-name-mixedcase
bytes32 public immutable ZERO_BYTES32;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Think we don't externally consume this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
client This PR is about implementing the client contracts This PR changes some contracts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Difference between encoding empty user states and abi.encode(0)
2 participants