Correctly initialize use allow list and use block list parameters on the access list predicates #1750
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In case either bridge allow list admin or bridge block list admin is provided, predicate contracts are initialized with flags that indicate that both bridge transactions allow list and block list should be checked.
This was wrong because if someone configures Supernets to rely only on the bridge block list (by specifying the bridge block list admin address), SC will also check the allow list. Since the bridge allow list is empty it would result in the account not being able to execute bridge transactions, even though it is not block-listed.
Therefore, the fix includes using separate boolean parameters to initialize SCs whether allow list or block list should be used.
Existing data fix
If bridge transactions are not executed successfully (either deposit for child chain mintable tokens or withdraw for root chain mintable tokens), and access lists are in use, chances are the issue is related to this bug.
In order to fix it the following Foundry commands need to be run (https://book.getfoundry.sh/reference/cast/cast-send).
Use only block lists for bridge transactions
In case only bridge block lists should be used, an account that was specified as bridge block lists admin during deployment should send the following transactions, which would disable usage of allow lists on the predicate contracts:
Use only allow lists for bridge transactions
In case only bridge block lists should be used, an account that was specified as bridge block lists admin during deployment should send the following transactions, which would disable usage of block lists on the predicate contracts:
Changes include
Checklist
Testing