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
ScheduleUpgrade connectors message #1469
Conversation
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.
One typo that's breaking the build (if I don't miss anything else) and apart from that we will then also need to run cargo fmt
and taplo fmt
.
Regarding the test, once the build is fixed the test will fail since it will try to compare the resulting hex the message encoded to against ""
; we can then use that hex-encoded call and replace the ""
with that.
We renamed this to |
Actually we mostly (but not fully) renamed this set of features in solidity to "scheduling relies". I've just pushed a PR to rename the rest of the |
pallets/connectors/src/lib.rs
Outdated
) -> DispatchResult { | ||
let who = ensure_signed(origin)?; | ||
|
||
T::OutboundQueue::submit( |
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.
and here we should ensure that the the DomainAddress
is a DomainAddress::EVM
, i.e, this should fail with an error when it's DomainAddress::Centrifuge
since we don't want to be sending this message to the chain itself.
…ge/centrifuge-chain into scheduleRely-connectors-message
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.
A nit 👀
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.
I promise we are almost there 🙏
pallets/liquidity-pools/src/lib.rs
Outdated
// get account id of this pallet | ||
let who = T::PalletId::get().into_account_truncating(); | ||
ensure!( | ||
contract.domain() != Domain::Centrifuge, | ||
Error::<T>::InvalidDomain | ||
); | ||
|
||
T::OutboundQueue::submit( | ||
who, |
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.
Super nit but just a suggestion:
We don't need who
until we call submit
and it's only used there, so we could do:
// get account id of this pallet | |
let who = T::PalletId::get().into_account_truncating(); | |
ensure!( | |
contract.domain() != Domain::Centrifuge, | |
Error::<T>::InvalidDomain | |
); | |
T::OutboundQueue::submit( | |
who, | |
ensure!( | |
contract.domain() != Domain::Centrifuge, | |
Error::<T>::InvalidDomain | |
); | |
T::OutboundQueue::submit( | |
T::PalletId::get().into_account_truncating(), |
What will be triggered on the |
c54d740
@offerijns will explain this better but, afaik, this will schedule a contract upgrade (Solidity "spell") on the EVM side. the I guess a fair analogy would be to schedule a runtime upgrade and pass on the |
Yes basically this, except the hash being passed is not the new code version itself, but rather a hash of the runtime upgrade that is executing the changes. |
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.
Re-approve
@offerijns @mustermeiszer can we get another re-approval here? I had forgotten to include 49f68f9 in the last run |
It would be great if we did not bump dependencies silently as part of new features. They can introduce silent errors and thus should ideally only be packaged with Substrate updates. |
Description
Adds the ScheduleRely message, intended for governance to rely and execute spells on EVM domain gateway contracts
Changes and Descriptions
ScheduleRely(user: Address)
message.schedule_rely
function to lib.rsChecklist: