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

feat: update to latest ibc spec and use latest ibc-go eureka simapp in e2e #88

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d39cbfb
deploy with latest ibc-go eureka
gjermundgaraba Nov 5, 2024
56e939a
change package structure
gjermundgaraba Nov 5, 2024
c6a513f
builds (but test fails)
gjermundgaraba Nov 6, 2024
d261c74
update light clients with merkle_path
gjermundgaraba Nov 8, 2024
54f7e3b
Merge branch 'main' into gjermund/78-update-simapp-used-to-latest-ver…
gjermundgaraba Nov 9, 2024
9bfcde9
first transfer test working e2e
gjermundgaraba Nov 10, 2024
1c7f52e
second test passing
gjermundgaraba Nov 10, 2024
ad24446
timout tests work
gjermundgaraba Nov 10, 2024
310f512
update and fix fixtures
gjermundgaraba Nov 11, 2024
cd26807
lint and cleanup
gjermundgaraba Nov 11, 2024
5f9a874
minor cleanup
gjermundgaraba Nov 11, 2024
3c14e5c
use correct paths for proofs
gjermundgaraba Nov 11, 2024
22857b3
lint
gjermundgaraba Nov 11, 2024
edc30d4
Update src/ICS20Transfer.sol
gjermundgaraba Nov 12, 2024
2372039
Update src/ICS20Transfer.sol
gjermundgaraba Nov 12, 2024
2735e70
Update src/utils/ICS24Host.sol
gjermundgaraba Nov 12, 2024
1b8a67d
Update src/utils/ICS24Host.sol
gjermundgaraba Nov 12, 2024
316196f
Merge branch 'main' into gjermund/78-update-simapp-used-to-latest-ver…
gjermundgaraba Nov 12, 2024
311bea2
code review cleanup
gjermundgaraba Nov 12, 2024
db87834
take in list of acks
gjermundgaraba Nov 12, 2024
f20fd59
Merge branch 'main' into gjermund/78-update-simapp-used-to-latest-ver…
gjermundgaraba Nov 12, 2024
6c5d9c7
update fixtures and all that jazz
gjermundgaraba Nov 12, 2024
0000000
imp: removed unused fixtures
srdtrk Nov 13, 2024
0000000
docs: added hashPayload natspec
srdtrk Nov 13, 2024
0000000
imp: made hashPayload private
srdtrk Nov 13, 2024
0000000
docs: updated benchmarks
srdtrk Nov 13, 2024
0000000
docs: updated single packet benchmarks and formatted benchmarks
srdtrk Nov 13, 2024
0000000
docs: updated sendTransfer
srdtrk Nov 13, 2024
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
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
Loading