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

ROLLUP-437: complete withdrawals configuration #104

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

franciscotobar
Copy link

@franciscotobar franciscotobar commented Sep 28, 2023

What

  • As an operator, I want to have the possibility to configure the server to allow or not the complete withdrawal. For security reasons, such configuration should NOT be allowed in Mainnet.

  • Complete withdrawal: when enabled, it allows the users to move funds from their L2 accounts to their L1 accounts directly. When disabled, if the user withdraws funds from L2, the funds are stored in the L1 contract; the users need to get the pending balances to move funds from the L1 contract to their L1 addresses.

Why

  • UX

Refs

@franciscotobar franciscotobar requested a review from a team September 28, 2023 22:10
@franciscotobar franciscotobar marked this pull request as draft September 28, 2023 22:11
@franciscotobar franciscotobar marked this pull request as ready for review September 28, 2023 22:11
@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

All modified lines are covered by tests ✅

📢 Thoughts on this report? Let us know!.

Copy link
Collaborator

@antomor antomor left a comment

Choose a reason for hiding this comment

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

@franciscotobar thank you for the changes 🙏🏼
It looks like everything is working as expected apart from the config check. There, we check for the chain_eth_network, but that value is supposed to be localhost for now. So we should either change the value in the mainnet configuration or check for the chain_id.

Furthermore, (not related to this PR) I've realised that the chain_id configured in api.toml is under the wrong section [api.rest], because it's supposed to be [api.web3].

@github-actions github-actions bot marked this pull request as draft September 29, 2023 09:52
@franciscotobar
Copy link
Author

@franciscotobar thank you for the changes 🙏🏼 It looks like everything is working as expected apart from the config check. There, we check for the chain_eth_network, but that value is supposed to be localhost for now. So we should either change the value in the mainnet configuration or check for the chain_id.

Furthermore, (not related to this PR) I've realised that the chain_id configured in api.toml is under the wrong section [api.rest], because it's supposed to be [api.web3].

In testnet and qa, I have the testnet value, but I'm concerned about the comment https://github.com/rsksmart/rif-rollup/blob/ROLLUP-437/configurable-withdrawal/etc/env/mainnet/chain.toml#L19.

Maybe using the chain_id, will be better, but we will be only taken into account, RSK.

@antomor
Copy link
Collaborator

antomor commented Sep 29, 2023

Maybe using the chain_id, will be better, but we will be only taken into account, RSK.

Yes, I thought the same indeed

@franciscotobar franciscotobar force-pushed the ROLLUP-437/configurable-withdrawal branch from 915983f to 0e7805d Compare September 29, 2023 20:53
@franciscotobar franciscotobar marked this pull request as ready for review September 29, 2023 20:53
Copy link
Collaborator

@antomor antomor left a comment

Choose a reason for hiding this comment

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

LGTM

@antomor antomor marked this pull request as draft October 2, 2023 09:18
@antomor antomor marked this pull request as ready for review October 2, 2023 09:18
@antomor antomor changed the title refactor: complete withdrawals configuration ROLLUP-437: complete withdrawals configuration Oct 2, 2023
@antomor antomor merged commit 87202cd into main Oct 2, 2023
3 of 5 checks passed
@antomor antomor deleted the ROLLUP-437/configurable-withdrawal branch October 2, 2023 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants