Skip to content
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

ics04: remove unused version from init and try handlers #963

Merged
merged 3 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions spec/core/ics-004-channel-and-packet-semantics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,7 @@ function chanOpenInit(
order: ChannelOrder,
connectionHops: [Identifier],
portIdentifier: Identifier,
counterpartyPortIdentifier: Identifier,
version: string): (channelIdentifier: Identifier, channelCapability: CapabilityKey) {
counterpartyPortIdentifier: Identifier): (channelIdentifier: Identifier, channelCapability: CapabilityKey) {
channelIdentifier = generateIdentifier()
abortTransactionUnless(validateChannelIdentifier(portIdentifier, channelIdentifier))

Expand Down Expand Up @@ -354,7 +353,6 @@ function chanOpenTry(
portIdentifier: Identifier,
counterpartyPortIdentifier: Identifier,
counterpartyChannelIdentifier: Identifier,
version: string,
counterpartyVersion: string,
proofInit: CommitmentProof,
proofHeight: Height): (channelIdentifier: Identifier, channelCapability: CapabilityKey) {
Expand Down
11 changes: 3 additions & 8 deletions spec/core/ics-026-routing-module/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,6 @@ interface ChanOpenInit {
order: ChannelOrder
connectionHops: [Identifier]
portIdentifier: Identifier
channelIdentifier: Identifier
counterpartyPortIdentifier: Identifier
counterpartyChannelIdentifier: Identifier
version: string
crodriguezvega marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -432,16 +431,14 @@ function handleChanOpenInit(datagram: ChanOpenInit) {
datagram.order,
datagram.connectionHops,
datagram.portIdentifier,
datagram.channelIdentifier,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was also not correct here since the channel identifier is generated in INIT by the handler and it's not in the datagram.

datagram.counterpartyPortIdentifier,
datagram.counterpartyChannelIdentifier,
version // pass in version returned from callback
datagram.counterpartyChannelIdentifier
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THis shouldn't exist on ChanOpenInit

)
version, err = module.onChanOpenInit(
datagram.order,
datagram.connectionHops,
datagram.portIdentifier,
datagram.channelIdentifier,
channelIdentifier,
datagram.counterpartyPortIdentifier,
datagram.counterpartyChannelIdentifier,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not exist

datagram.version
Expand All @@ -468,7 +465,6 @@ interface ChanOpenTry {
channelIdentifier: Identifier
counterpartyPortIdentifier: Identifier
counterpartyChannelIdentifier: Identifier
version: string
counterpartyVersion: string
proofInit: CommitmentProof
proofHeight: Height
Expand All @@ -485,7 +481,6 @@ function handleChanOpenTry(datagram: ChanOpenTry) {
datagram.channelIdentifier,
datagram.counterpartyPortIdentifier,
datagram.counterpartyChannelIdentifier,
version, // pass in version returned by callback
datagram.counterpartyVersion,
datagram.proofInit,
datagram.proofHeight
Expand All @@ -494,7 +489,7 @@ function handleChanOpenTry(datagram: ChanOpenTry) {
datagram.order,
datagram.connectionHops,
datagram.portIdentifier,
datagram.channelIdentifier,
channelIdentifier,
datagram.counterpartyPortIdentifier,
datagram.counterpartyChannelIdentifier,
datagram.counterpartyVersion
Expand Down