This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
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.
Implementer's guide: downward messages and HRMP, take 2 #1503
Implementer's guide: downward messages and HRMP, take 2 #1503
Changes from 38 commits
c90fdf4
d1ab1fb
69fe295
ceaa096
e952a01
778cc2b
bdb97af
921ca3b
3fff854
8072356
a622f77
0309bc5
1c75b51
c1f8482
d781330
d62803e
5d09dd8
e5f642a
b1e1b28
02ae124
5111966
c94ba1d
bf7eb0a
44f9338
ea1ad39
012b839
2edf4c9
50742fd
09a0c4b
7d8abd6
3f3f051
defd96b
6faf068
ca70234
017885e
439b02e
4285e51
c1b3e0a
4ea0012
065f047
0da3cfa
0de4110
360c518
3d6195d
7bd6316
ce6e8de
eb97502
5c1f312
e18b84a
1bcfe70
6d42e9b
b1b0fd9
c22c5d2
ef9dc1e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
What is the actual deposit mechanism? What actions are prevented and how might the accounting work in practice?
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.
@AlistairStewart It would be helpful to have some more guidance on deposits for parachains/parathreads and how this interacts with the broader parachain / parathread deposits, respectively
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.
The easiest thing would be to have the sender always put down a fixed deposit. While it may be able to share code or storage location with the auction deposit, it shouldn't interact in any way.
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 see, so these are all
UpwardMessages
. cool. Noting that implementation depends on #1510There 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.
Heh, well, that's a subject for discussion. Remember I asked you about introducing special kinds of
UpwardMessage
s instead of relying on dispatching them? That was specifically for this case. I was wondering if it makes sense to add dedicated variants for these messages so that we could reject candidates that fail any of those checks. I didn't go with that way since I thought it might have been too strict. But what do you think?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.
it seems reasonable to reject candidates that fail any checks, actually.
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.
Ok, in that case we should relax some requirements to avoid unnecessary rejecting candidates. I.e. closing should not fail if already requested by the other party.
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.
but that property might not be easily preserved for contextual execution, where we can import parablocks executed in the context of some recent relay-parent. then race conditions will be more easily triggered and the candidate would be no longer includable. however that might be desired...need to think on it
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.
Why not?
close_channel(C)
should be idempotent for the same C even though if it was sent by different origins (At least, as long as we don't allow contextual execution across sessions)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.
what exactly happens here? i could imagine a case where both
sender
andrecipient
initiate at the same time & race.could it even count as a confirmed close?
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.
alternate behavior would be to ignore, and for paras to confirm close requests even when, from their perspective, they have already initiated a close.
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.
either way, would be nice to specify what happens here and what the corner cases are.
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.
There is no notion of close confirmation in this spec, since we decided to go ahead with unilateral closing with dropping messages atm to move things forward (Right?)
So there is no difference apart the value of
initiator
which I guess doesn't make any difference in the current spec and could be safely removed. In other words, if the race happens, even though the lost party's message fails to dispatch, the result is for all practical reasons is the same.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.
great question! lol
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.
What happens to DOTs owned by offboarded paras more generally? A parachain with a large locked depsoit for an auction should become a parathread, which should then be able to dispose of it's free DOTs. But parathreads will in general have a small deposit for being a parathread, which means that it will own DOTs when it is offboarded.
So their probably should be an account these DOTs go to, by default the treasury. If these deposits are in the parachain account but just reserved, then we might not need to clean them up specifically here. So what happens to the para's account on the relay chain when it is offboarded?
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.
The
slots
module maintains an Offboarding address for each parachain. This is initially set to the address of the bidder, but the parachain can submit aCall
to change it to an address of its choosing. When the parachain is offboarded, its deposit is sent to the given address.