Make ValidationContext
and ExecutionContext
implement the ICS-26 router
#322
Milestone
ValidationContext
and ExecutionContext
implement the ICS-26 router
#322
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: