Skip to content

Commit

Permalink
Merge branch 'main' into stefano/small-fixes-channel-upgradability-specs
Browse files Browse the repository at this point in the history
  • Loading branch information
sangier authored Nov 28, 2023
2 parents a4aa88a + 7e9fd7d commit 638d52f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@

/spec/app @adityasripal @cwgoes @colin-axner @angbrav

/spec/app/ics-028-cross-chain-validation @mpoke @adityasripal @cwgoes @angbrav
/spec/app/ics-028-cross-chain-validation @mpoke @adityasripal @cwgoes @angbrav @insumity
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ All standards at or past the "Draft" stage are listed here in order of their ICS

| Interchain Standard Number | Standard Title | Stage | Implementations | Maintainer |
| ------------------------------------------------------------- | -------------------------- | --------- | --------------- | ------------- |
| [2](spec/core/ics-002-client-semantics/README.md) | Client Semantics | Candidate | [ibc-go](https://github.com/cosmos/ibc-go) | Protocol team |
| [3](spec/core/ics-003-connection-semantics/README.md) | Connection Semantics | Candidate | [ibc-go](https://github.com/cosmos/ibc-go) | Protocol team |
| [4](spec/core/ics-004-channel-and-packet-semantics/README.md) | Channel & Packet Semantics | Candidate | [ibc-go](https://github.com/cosmos/ibc-go) | Protocol team |
| [2](spec/core/ics-002-client-semantics/README.md) | Client Semantics | Candidate | [ibc-go](https://github.com/cosmos/ibc-go), [ibc-rs](https://github.com/cosmos/ibc-rs) | Protocol team |
| [3](spec/core/ics-003-connection-semantics/README.md) | Connection Semantics | Candidate | [ibc-go](https://github.com/cosmos/ibc-go), [ibc-rs](https://github.com/cosmos/ibc-rs) | Protocol team |
| [4](spec/core/ics-004-channel-and-packet-semantics/README.md) | Channel & Packet Semantics | Candidate | [ibc-go](https://github.com/cosmos/ibc-go), [ibc-rs](https://github.com/cosmos/ibc-rs) | Protocol team |
| [5](spec/core/ics-005-port-allocation/README.md) | Port Allocation | Candidate | [ibc-go](https://github.com/cosmos/ibc-go) | Protocol team |
| [23](spec/core/ics-023-vector-commitments/README.md) | Vector Commitments | Candidate | [ibc-go](https://github.com/cosmos/ibc-go) | Protocol team |
| [24](spec/core/ics-024-host-requirements/README.md) | Host Requirements | Candidate | [ibc-go](https://github.com/cosmos/ibc-go) | Protocol team |
| [25](spec/core/ics-025-handler-interface/README.md) | Handler Interface | Candidate | [ibc-go](https://github.com/cosmos/ibc-go) | Protocol team |
| [26](spec/core/ics-026-routing-module/README.md) | Routing Module | Candidate | [ibc-go](https://github.com/cosmos/ibc-go) | Protocol team |
| [23](spec/core/ics-023-vector-commitments/README.md) | Vector Commitments | Candidate | [ibc-go](https://github.com/cosmos/ibc-go), [ibc-rs](https://github.com/cosmos/ibc-rs) | Protocol team |
| [24](spec/core/ics-024-host-requirements/README.md) | Host Requirements | Candidate | [ibc-go](https://github.com/cosmos/ibc-go), [ibc-rs](https://github.com/cosmos/ibc-rs) | Protocol team |
| [25](spec/core/ics-025-handler-interface/README.md) | Handler Interface | Candidate | [ibc-go](https://github.com/cosmos/ibc-go), [ibc-rs](https://github.com/cosmos/ibc-rs) | Protocol team |
| [26](spec/core/ics-026-routing-module/README.md) | Routing Module | Candidate | [ibc-go](https://github.com/cosmos/ibc-go), [ibc-rs](https://github.com/cosmos/ibc-rs) | Protocol team |
| [33](spec/core/ics-033-multi-hop/README.md) | Multi-hop Messaging | Candidate | [ibc-go](https://github.com/cosmos/ibc-go) | Protocol team |

### Client

| Interchain Standard Number | Standard Title | Stage | Implementations | Maintainer |
| --------------------------------------------------------------- | -------------------------- | ----- | --------------- | ------------- |
| [6](spec/client/ics-006-solo-machine-client/README.md) | Solo Machine Client | Candidate | [ibc-go](https://github.com/cosmos/ibc-go/tree/main/modules/light-clients/06-solomachine) | Protocol team |
| [7](spec/client/ics-007-tendermint-client/README.md) | Tendermint Client | Candidate | [ibc-go](https://github.com/cosmos/ibc-go/tree/main/modules/light-clients/07-tendermint) | Protocol team |
| [7](spec/client/ics-007-tendermint-client/README.md) | Tendermint Client | Candidate | [ibc-go](https://github.com/cosmos/ibc-go/tree/main/modules/light-clients/07-tendermint), [ibc-rs](https://github.com/cosmos/ibc-rs/tree/main/ibc-clients/ics07-tendermint) | Protocol team |
| [8](spec/client/ics-008-wasm-client/README.md) | Wasm Client | Draft | | Protocol team / [Composable Finance](https://www.composable.finance) |
| [9](spec/client/ics-009-loopback-cilent/README.md) | Loopback Client | Draft | [ibc-go](https://github.com/cosmos/ibc-go/tree/main/modules/light-clients/09-localhost) | Protocol team |
| [10](spec/client/ics-010-grandpa-client/README.md) | GRANDPA Client | Draft | | [Octopus Network](https://oct.network) |
Expand All @@ -61,7 +61,7 @@ All standards at or past the "Draft" stage are listed here in order of their ICS

| Interchain Standard Number | Standard Title | Stage | Implementations | Maintainer |
| -------------------------------------------------------- | ----------------------- | ----- | --------------- | ------------- |
| [20](spec/app/ics-020-fungible-token-transfer/README.md) | Fungible Token Transfer | Candidate | [ibc-go](https://github.com/cosmos/ibc-go/tree/main/modules/apps/transfer) | Protocol team |
| [20](spec/app/ics-020-fungible-token-transfer/README.md) | Fungible Token Transfer | Candidate | [ibc-go](https://github.com/cosmos/ibc-go/tree/main/modules/apps/transfer), [ibc-rs](https://github.com/cosmos/ibc-rs/tree/main/ibc-apps/ics20-transfer) | Protocol team |
| [27](spec/app/ics-027-interchain-accounts/README.md) | Interchain Accounts | Candidate | [ibc-go](https://github.com/cosmos/ibc-go/tree/main/modules/apps/27-interchain-accounts) | Protocol team |
| [28](spec/app/ics-028-cross-chain-validation/README.md) | Cross-Chain Validation | Candidate | [interchain-security](https://github.com/cosmos/interchain-security/tree/main) | Cosmos Hub team |
| [29](spec/app/ics-029-fee-payment) | General Relayer Incentivization Mechanism | Candidate | [ibc-go](https://github.com/cosmos/ibc-go/tree/main/modules/apps/29-fee) | Protocol team |
Expand Down
2 changes: 2 additions & 0 deletions meta/STANDARDS_COMMITTEE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ Currently, the core standardisation committee consists of:
- Aditya Sripal (@adityasripal)
- Christopher Goes (@cwgoes)
- Marius Poke (@mpoke)
- Manuel Bravo (@angbrav)
- Stefano Angieri (@sangier)

A two-of-three quorum is needed to approve pull requests to this repository.
18 changes: 11 additions & 7 deletions spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ function restoreChannel(
channel = provableStore.get(channelPath(portIdentifier, channelIdentifier))
errorReceipt = ErrorReceipt{
channel.upgradeSequence,
"upgrade handshake is aborted", // constant string changable by implementation
"upgrade handshake is aborted", // constant string changeable by implementation
}
provableStore.set(channelUpgradeErrorPath(portIdentifier, channelIdentifier), errorReceipt)
channel.state = OPEN
Expand Down Expand Up @@ -560,7 +560,7 @@ function chanUpgradeTry(
if counterpartyUpgradeSequence < channel.upgradeSequence {
errorReceipt = ErrorReceipt{
channel.upgradeSequence - 1,
"sequence out of sync", // constant string changable by implementation
"sequence out of sync", // constant string changeable by implementation
}
provableStore.set(channelUpgradeErrorPath(portIdentifier, channelIdentifier), errorReceipt)
return
Expand Down Expand Up @@ -647,25 +647,29 @@ function chanUpgradeAck(
)
)

upgrade = provableStore.get(channelUpgradePath(portIdentifier, channelIdentifier))
existingUpgrade = provableStore.get(channelUpgradePath(portIdentifier, channelIdentifier))

// optimistically accept version that TRY chain proposes and pass this to callback for confirmation.
// in the crossing hello case, we do not modify version that our TRY call returned and instead
// enforce that both TRY calls returned the same version
if (channel.state == OPEN) {
upgrade.fields.version == counterpartyUpgrade.fields.version
existingUpgrade.fields.version == counterpartyUpgrade.fields.version
}
// if upgrades are not compatible by ACK step, then we restore the channel
if (!isCompatibleUpgradeFields(upgrade.fields, counterpartyUpgrade.fields)) {
if (!isCompatibleUpgradeFields(existingUpgrade.fields, counterpartyUpgrade.fields)) {
restoreChannel(portIdentifier, channelIdentifier)
return
}

if (channel.state == OPEN) {
// prove counterparty and move our own state to flushing
// if we are already at flushing, then no state changes occur
// upgrade is blocked on this channelEnd from progressing until flush completes on both ends
// upgrade is blocked on this channelEnd from progressing until flush completes on its end
startFlushUpgradeHandshake(portIdentifier, channelIdentifier)
// startFlushUpgradeHandshake sets the timeout for the upgrade
// so retrieve upgrade again here and use that timeout value
upgrade = provableStore.get(channelUpgradePath(portIdentifier, channelIdentifier))
existingUpgrade.timeout = upgrade.timeout
}

timeout = counterpartyUpgrade.timeout
Expand Down Expand Up @@ -705,7 +709,7 @@ function chanUpgradeAck(
}

// if no error, agree on final version
provableStore.set(channelUpgradePath(portIdentifier, channelIdentifier), upgrade)
provableStore.set(channelUpgradePath(portIdentifier, channelIdentifier), existingUpgrade)
}
```

Expand Down

0 comments on commit 638d52f

Please sign in to comment.