-
Notifications
You must be signed in to change notification settings - Fork 82
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
Make ValidationContext
and ExecutionContext
implement the ICS-26 router
#322
Milestone
Comments
This was referenced Jan 11, 2023
Blocked on #361. |
plafer
added
A: blocked
Admin: blocked by another (internal/external) issue or PR
and removed
A: blocked
Admin: blocked by another (internal/external) issue or PR
labels
Jan 19, 2023
This was referenced Jan 26, 2023
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When we wrote ADR 5, we forgot to consider how the ICS-26 router would work with the new
ValidationContext
andExecutionContext
. Also, since then, the removal of crossing hellos from connection and channel handshakes changed how certain handlers interact with the router (e.g. we can no longer emit events directly inChanOpenTry
andChanOpenAck
handlers). This issue serves to amend ADR 5 in order to address all of the above.The bottom line is: both
validate()
andexecute()
need to perform the relevant parts of the ICS-26 router. As an example, here is whatvalidate()
andexecute()
would do to handle aChanOpenTry
message:validate()
:Module
based on themsg.port_id
chan_open_try::validate()
handlerchannel_id
(through the channel counter)Module
callbackon_chan_open_try_validate()
(which only performs validation)execute()
:Module
based on themsg.port_id
channel_id
(through the channel counter)Module
callbackon_chan_open_try_execute(channel_id, ...)
(which only performs state changes), and save the returnedversion
chan_open_try::execute(version, ...)
handler, feeding it theversion
obtained from theexecute()
callbackA few things to note:
Module
trait with validation methods (1 per callback).channel_id
is no longer generated by the core handler, as specified in the specs (although see this spec issue which shows that the spec needs to be updated). Instead we generate it in what is effectively the ICS-26 router.The text was updated successfully, but these errors were encountered: