-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: robust deployment script #16
feat: robust deployment script #16
Conversation
a80fc69
to
591b875
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM -- marked some questions, but nothing blocking on my end.
|
||
ScrollChain(L1_SCROLL_CHAIN_PROXY_ADDR).addSequencer(L1_COMMIT_SENDER_ADDR); | ||
ScrollChain(L1_SCROLL_CHAIN_PROXY_ADDR).addProver(L1_FINALIZE_SENDER_ADDR); | ||
if (!ScrollChain(L1_SCROLL_CHAIN_PROXY_ADDR).isSequencer(L1_COMMIT_SENDER_ADDR)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow-up: We should consider logging existing Sequencers and Provers if this function adds new ones and there is already one defined. This could be a risky security oversight if people re-run a script not realizing they've enabled multiple commit senders.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sequencers in contract are saving in a mapping, this makes it hard to log existing sequencers.
We can try to save all sequencers address in a local file, but this seems don't prevent people add sequencers in another environment different from the local file.
if (!ScrollChain(L1_SCROLL_CHAIN_PROXY_ADDR).isSequencer(L1_COMMIT_SENDER_ADDR)) { | ||
ScrollChain(L1_SCROLL_CHAIN_PROXY_ADDR).addSequencer(L1_COMMIT_SENDER_ADDR); | ||
} | ||
if (!ScrollChain(L1_SCROLL_CHAIN_PROXY_ADDR).isProver(L1_FINALIZE_SENDER_ADDR)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same follow-up as above.
Let's merge this branch since this feature required urgently. And follow up logging existing Sequencers and Provers in other PRs. |
Problem:
The deployment script is not reliable with a public endpoint, due to gas price spike and other errors.
Solution:
To address this, we enable resume when deployment fails. Basically there are four types of transactions:
BTW, although seems the problem only happens in L1, still we no sure if there are potential problem in L2, besides we deploy both L1/L2 in one shell script now. If we think it's redundant, we can revert commit "feat: l2 robust deployment script".