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

Ensure that the same child token addresses are calculated on both chains #1621

Conversation

Stefan-Ethernal
Copy link
Collaborator

@Stefan-Ethernal Stefan-Ethernal commented Jun 15, 2023

Description

This PR ensures that the same child token addresses are calculated on both sides of the bridge (root and child predicates). This is accomplished by providing the same child token template addresses to both root and child predicates.

Also, bridge E2E tests now contain explicit checks of child token addresses being the same calculated on both sides of the bridge.

Before this PR, different child token addresses were provided to root and child predicates, resulting in different calculations of child token addresses.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Breaking changes

Child token template addresses from the root chain are persisted in the genesis.json.

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

@Stefan-Ethernal Stefan-Ethernal force-pushed the EVM-695-different-addresses-are-calculated-for-child-tokens branch from 82da67c to d2c30df Compare June 15, 2023 05:53
@Stefan-Ethernal Stefan-Ethernal changed the title Deploy token templates to the same addresses on both chains Assure that the same child token addresses are on both chains Jun 15, 2023
@Stefan-Ethernal Stefan-Ethernal force-pushed the EVM-695-different-addresses-are-calculated-for-child-tokens branch 3 times, most recently from 9215a86 to 24126c0 Compare June 19, 2023 13:24
@Stefan-Ethernal Stefan-Ethernal force-pushed the EVM-695-different-addresses-are-calculated-for-child-tokens branch from 24126c0 to 90fca14 Compare June 25, 2023 08:16
@github-actions github-actions bot locked and limited conversation to collaborators Jun 25, 2023
@Stefan-Ethernal Stefan-Ethernal self-assigned this Jun 25, 2023
@Stefan-Ethernal Stefan-Ethernal added bug fix Functionality that fixes a bug breaking change Functionality that contains breaking changes labels Jun 25, 2023
@Stefan-Ethernal Stefan-Ethernal requested a review from a team June 25, 2023 08:19
@Stefan-Ethernal Stefan-Ethernal force-pushed the EVM-695-different-addresses-are-calculated-for-child-tokens branch from 7b51f53 to 99acd6c Compare June 25, 2023 08:28
@Stefan-Ethernal Stefan-Ethernal changed the title Assure that the same child token addresses are on both chains Ensure that the same child token addresses are calculated on both chains Jun 25, 2023
@Stefan-Ethernal Stefan-Ethernal force-pushed the EVM-695-different-addresses-are-calculated-for-child-tokens branch from b27d940 to dc57ec8 Compare June 25, 2023 08:33
@Stefan-Ethernal Stefan-Ethernal marked this pull request as ready for review June 25, 2023 11:24
@Stefan-Ethernal Stefan-Ethernal linked an issue Jun 26, 2023 that may be closed by this pull request
Copy link
Contributor

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

LGTM

@Stefan-Ethernal Stefan-Ethernal merged commit 8f39a41 into develop Jun 26, 2023
@Stefan-Ethernal Stefan-Ethernal deleted the EVM-695-different-addresses-are-calculated-for-child-tokens branch June 26, 2023 11:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change Functionality that contains breaking changes bug fix Functionality that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error while withdrawing from the Supernet
4 participants