Skip to content

Commit

Permalink
feat: update to latest ibc spec and use latest ibc-go eureka simapp i…
Browse files Browse the repository at this point in the history
…n e2e (#88)

Co-authored-by: srdtrk <[email protected]>
Co-authored-by: srdtrk <[email protected]>
  • Loading branch information
3 people authored Nov 13, 2024
1 parent 54d509b commit f78f4e6
Show file tree
Hide file tree
Showing 49 changed files with 2,028 additions and 1,440 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,21 @@ The following benchmarks are for a single packet transfer without aggregation.

| **Contract** | **Method** | **Description** | **Gas (groth16)** | **Gas (plonk)** |
|:---:|:---:|:---:|:---:|:---:|
| `ICS20Transfer.sol` | `sendTransfer` | Initiating an IBC transfer with an `ERC20`. | 250,472 | 250,472 |
| `ICS26Router.sol` | `recvPacket` | Receiving _back_ an `ERC20` token. | 548,671 | 636,957 |
| `ICS26Router.sol` | `recvPacket` | Receiving a _new_ Cosmos token for the first time. (Deploying an `ERC20` contract) | 1,446,811 | 1,534,395 |
| `ICS26Router.sol` | `ackPacket` | Acknowledging an ICS20 packet. | 428,926 | 517,836 |
| `ICS26Router.sol` | `timeoutPacket` | Timing out an ICS20 packet | 479,599 | 568,708 |
| `ICS20Transfer.sol` | `sendTransfer` | Initiating an IBC transfer with an `ERC20`. | 251,148 | 251,148 |
| `ICS26Router.sol` | `recvPacket` | Receiving _back_ an `ERC20` token. | 550,874 | 638,731 |
| `ICS26Router.sol` | `recvPacket` | Receiving a _new_ Cosmos token for the first time. (Deploying an `ERC20` contract) | 1,436,745 | 1,524,820 |
| `ICS26Router.sol` | `ackPacket` | Acknowledging an ICS20 packet. | 425,486 | 513,522 |
| `ICS26Router.sol` | `timeoutPacket` | Timing out an ICS20 packet | 470,422 | 558,973 |

### Aggregated Packet Benchmarks

The gas costs are substantially lower when aggregating multiple packets into a single proof, as long as the packets are submitted in the same tx.
Since there is no meaningful difference in gas costs between plonk and groth16 in the aggregated case, they are not separated in the table below.

| **Contract** | **Method** | **Description** | **Avg Gas (25 packets)** | **Avg Gas (100 packets)** |
|:---:|:---:|:---:|:---:|:---:|
| `ICS26Router.sol` | `recvPacket` | Receiving _back_ an `ERC20` token. | 195,355 | 187,373 |
| `ICS26Router.sol` | `ackPacket` | Acknowledging an ICS20 packet. | 107,557 | 100,629 |
| **ICS26Router Method** | **Description** | **Avg Gas (25 packets)** | **Avg Gas (100 packets)** |
|:---:|:---:|:---:|:---:|
| `multicall/recvPacket` | Receiving _back_ an `ERC20` token. | 226,083 | 217,645 |
| `multicall/ackPacket` | Acknowledging an ICS20 packet. | 128,376 | 121,024 |

## License

Expand Down
243 changes: 140 additions & 103 deletions abi/IBCStore.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,40 +24,52 @@
"type": "uint32",
"internalType": "uint32"
},
{
"name": "timeoutTimestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "sourcePort",
"type": "string",
"internalType": "string"
},
{
"name": "sourceChannel",
"type": "string",
"internalType": "string"
},
{
"name": "destPort",
"type": "string",
"internalType": "string"
},
{
"name": "destChannel",
"type": "string",
"internalType": "string"
},
{
"name": "version",
"type": "string",
"internalType": "string"
"name": "timeoutTimestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
"name": "payloads",
"type": "tuple[]",
"internalType": "struct IICS26RouterMsgs.Payload[]",
"components": [
{
"name": "sourcePort",
"type": "string",
"internalType": "string"
},
{
"name": "destPort",
"type": "string",
"internalType": "string"
},
{
"name": "version",
"type": "string",
"internalType": "string"
},
{
"name": "encoding",
"type": "string",
"internalType": "string"
},
{
"name": "value",
"type": "bytes",
"internalType": "bytes"
}
]
}
]
}
Expand All @@ -79,47 +91,59 @@
"type": "uint32",
"internalType": "uint32"
},
{
"name": "timeoutTimestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "sourcePort",
"type": "string",
"internalType": "string"
},
{
"name": "sourceChannel",
"type": "string",
"internalType": "string"
},
{
"name": "destPort",
"type": "string",
"internalType": "string"
},
{
"name": "destChannel",
"type": "string",
"internalType": "string"
},
{
"name": "version",
"type": "string",
"internalType": "string"
"name": "timeoutTimestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
"name": "payloads",
"type": "tuple[]",
"internalType": "struct IICS26RouterMsgs.Payload[]",
"components": [
{
"name": "sourcePort",
"type": "string",
"internalType": "string"
},
{
"name": "destPort",
"type": "string",
"internalType": "string"
},
{
"name": "version",
"type": "string",
"internalType": "string"
},
{
"name": "encoding",
"type": "string",
"internalType": "string"
},
{
"name": "value",
"type": "bytes",
"internalType": "bytes"
}
]
}
]
},
{
"name": "ack",
"type": "bytes",
"internalType": "bytes"
"name": "acks",
"type": "bytes[]",
"internalType": "bytes[]"
}
],
"outputs": [],
Expand All @@ -139,40 +163,52 @@
"type": "uint32",
"internalType": "uint32"
},
{
"name": "timeoutTimestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "sourcePort",
"type": "string",
"internalType": "string"
},
{
"name": "sourceChannel",
"type": "string",
"internalType": "string"
},
{
"name": "destPort",
"type": "string",
"internalType": "string"
},
{
"name": "destChannel",
"type": "string",
"internalType": "string"
},
{
"name": "version",
"type": "string",
"internalType": "string"
"name": "timeoutTimestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
"name": "payloads",
"type": "tuple[]",
"internalType": "struct IICS26RouterMsgs.Payload[]",
"components": [
{
"name": "sourcePort",
"type": "string",
"internalType": "string"
},
{
"name": "destPort",
"type": "string",
"internalType": "string"
},
{
"name": "version",
"type": "string",
"internalType": "string"
},
{
"name": "encoding",
"type": "string",
"internalType": "string"
},
{
"name": "value",
"type": "bytes",
"internalType": "bytes"
}
]
}
]
}
Expand Down Expand Up @@ -263,40 +299,52 @@
"type": "uint32",
"internalType": "uint32"
},
{
"name": "timeoutTimestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "sourcePort",
"type": "string",
"internalType": "string"
},
{
"name": "sourceChannel",
"type": "string",
"internalType": "string"
},
{
"name": "destPort",
"type": "string",
"internalType": "string"
},
{
"name": "destChannel",
"type": "string",
"internalType": "string"
},
{
"name": "version",
"type": "string",
"internalType": "string"
"name": "timeoutTimestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
"name": "payloads",
"type": "tuple[]",
"internalType": "struct IICS26RouterMsgs.Payload[]",
"components": [
{
"name": "sourcePort",
"type": "string",
"internalType": "string"
},
{
"name": "destPort",
"type": "string",
"internalType": "string"
},
{
"name": "version",
"type": "string",
"internalType": "string"
},
{
"name": "encoding",
"type": "string",
"internalType": "string"
},
{
"name": "value",
"type": "bytes",
"internalType": "bytes"
}
]
}
]
}
Expand Down Expand Up @@ -374,6 +422,11 @@
],
"anonymous": false
},
{
"type": "error",
"name": "IBCMultiPayloadPacketNotSupported",
"inputs": []
},
{
"type": "error",
"name": "IBCPacketAcknowledgementAlreadyExists",
Expand Down Expand Up @@ -450,21 +503,5 @@
"internalType": "address"
}
]
},
{
"type": "error",
"name": "SafeCastOverflowedUintDowncast",
"inputs": [
{
"name": "bits",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "value",
"type": "uint256",
"internalType": "uint256"
}
]
}
]
Loading

0 comments on commit f78f4e6

Please sign in to comment.