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

imp: removed unnecessary events #126

Merged
merged 44 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f09987d
rm transfer events,fix test
sangier Nov 28, 2024
160001c
lint
sangier Nov 28, 2024
bf3e4f9
fix lint
sangier Nov 28, 2024
2e09ae3
del packet and ack commit events
sangier Nov 28, 2024
ba09118
gen abi
sangier Nov 28, 2024
28524a9
rm writeAck event
sangier Dec 2, 2024
1d7d3c8
lint
sangier Dec 2, 2024
24d1ea8
generate abi
sangier Dec 2, 2024
dbe5e01
fix lint
sangier Dec 2, 2024
41182ee
readd writeAck event
sangier Dec 2, 2024
bcdceb6
fix e2e test
sangier Dec 2, 2024
d73cda7
abi gen
sangier Dec 2, 2024
0b4e84e
ty fix e2e
sangier Dec 3, 2024
04c04eb
fix e2e attempt
sangier Dec 3, 2024
14aec61
fix lint
sangier Dec 3, 2024
fde820b
mod nativeCosmos test
sangier Dec 3, 2024
3d75bd3
fix nativeCoin e2e
sangier Dec 3, 2024
3e9e8c2
e2e
sangier Dec 3, 2024
2353747
fix attempt
sangier Dec 3, 2024
b0b87af
lint
sangier Dec 3, 2024
b0a23f5
test fix using public getter
sangier Dec 3, 2024
d0f9e18
change func visibility back to private
sangier Dec 4, 2024
0fd7d61
mod test
sangier Dec 4, 2024
ed1124b
abigen
sangier Dec 4, 2024
a1c3d51
address review comments
sangier Dec 4, 2024
0f95877
commenting test
sangier Dec 4, 2024
a6fb974
Merge branch 'main' into stefano/108-spec-events
srdtrk Dec 5, 2024
9de6d07
style: ran golangci-lint
srdtrk Dec 5, 2024
4702f3b
fix: linter complaint
srdtrk Dec 5, 2024
48ebe17
imp: improved public ics20 interface
srdtrk Dec 5, 2024
2bbb533
imp: good start
srdtrk Dec 5, 2024
dc60518
imp: readded newMsgSendPacketV1
srdtrk Dec 5, 2024
facbdda
style: ran forge fmt
srdtrk Dec 5, 2024
ae5bacc
imp: regenerated abi
srdtrk Dec 5, 2024
e7338da
e2e: fixed one of the tests
srdtrk Dec 5, 2024
a53f382
imp: removed unused functions
srdtrk Dec 5, 2024
b8ee44d
test: added missing line
srdtrk Dec 5, 2024
337f46b
imp: remove commented code
srdtrk Dec 5, 2024
69e9547
Merge branch 'main' into stefano/108-spec-events
srdtrk Dec 5, 2024
9dd17ff
imp: regenerated abi
srdtrk Dec 5, 2024
c4a9cf9
refactor: rename func
srdtrk Dec 6, 2024
b73d162
imp: regen abi
srdtrk Dec 6, 2024
86c4064
fix: name
srdtrk Dec 6, 2024
5649f20
docs: updated benchmarks
srdtrk Dec 6, 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
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ The following benchmarks are for a single packet transfer without aggregation.

| **Contract** | **Method** | **Description** | **Gas (groth16)** | **Gas (plonk)** |
|:---:|:---:|:---:|:---:|:---:|
| `ICS26Router.sol` | `sendPacket` | Initiating an IBC transfer with an `ERC20`. | ~205,000 | ~205,000 |
| `ICS26Router.sol` | `recvPacket` | Receiving _back_ an `ERC20` token. | ~484,000 | ~563,000 |
| `ICS26Router.sol` | `recvPacket` | Receiving a _new_ Cosmos token for the first time. (Deploying an `ERC20` contract) | ~1,422,000 | ~1,510,000 |
| `ICS26Router.sol` | `ackPacket` | Acknowledging an ICS20 packet. | ~370,000 | ~448,000 |
| `ICS26Router.sol` | `timeoutPacket` | Timing out an ICS20 packet | ~458,000 | ~545,000 |
| `ICS26Router.sol` | `sendPacket` | Initiating an IBC transfer with an `ERC20`. | ~198,798 | ~198,798 |
| `ICS26Router.sol` | `recvPacket` | Receiving _back_ an `ERC20` token. | ~518,409 | ~602,503 |
| `ICS26Router.sol` | `recvPacket` | Receiving a _new_ Cosmos token for the first time. (Deploying an `ERC20` contract) | ~1,414,262 | ~1,497,617 |
| `ICS26Router.sol` | `ackPacket` | Acknowledging an ICS20 packet. | ~397,928 | ~428,009 |
| `ICS26Router.sol` | `timeoutPacket` | Timing out an ICS20 packet | ~449,137 | ~532,397 |

### Aggregated Packet Benchmarks

Expand All @@ -174,8 +174,8 @@ Since there is no meaningful difference in gas costs between plonk and groth16 i

| **ICS26Router Method** | **Description** | **Avg Gas (25 packets)** | **Avg Gas (50 packets)** |
|:---:|:---:|:---:|:---:|
| `multicall/recvPacket` | Receiving _back_ an `ERC20` token. | ~204,000 | ~197,000 |
| `multicall/ackPacket` | Acknowledging an ICS20 packet. | ~116,000 | ~110,000 |
| `multicall/recvPacket` | Receiving _back_ an `ERC20` token. | ~194,375 | ~187,866 |
| `multicall/ackPacket` | Acknowledging an ICS20 packet. | ~101,630 | ~95,815 |

Note: These gas benchmarks are with Groth16.

Expand Down
38 changes: 0 additions & 38 deletions abi/IBCStore.json
Original file line number Diff line number Diff line change
Expand Up @@ -360,25 +360,6 @@
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "AckCommitted",
"inputs": [
{
"name": "path",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
},
{
"name": "commitment",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
Expand All @@ -398,25 +379,6 @@
],
"anonymous": false
},
{
"type": "event",
"name": "PacketCommitted",
"inputs": [
{
"name": "path",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
},
{
"name": "commitment",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
}
],
"anonymous": false
},
{
"type": "error",
"name": "IBCMultiPayloadPacketNotSupported",
Expand Down
127 changes: 127 additions & 0 deletions abi/ICS20Lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,111 @@
"outputs": [],
"stateMutability": "pure"
},
{
"type": "function",
"name": "newMsgSendPacketV1",
"inputs": [
{
"name": "sender",
"type": "address",
"internalType": "address"
},
{
"name": "msg_",
"type": "tuple",
"internalType": "struct IICS20TransferMsgs.SendTransferMsg",
"components": [
{
"name": "denom",
"type": "string",
"internalType": "string"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "receiver",
"type": "string",
"internalType": "string"
},
{
"name": "sourceChannel",
"type": "string",
"internalType": "string"
},
{
"name": "destPort",
"type": "string",
"internalType": "string"
},
{
"name": "timeoutTimestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "memo",
"type": "string",
"internalType": "string"
}
]
}
],
"outputs": [
{
"name": "",
"type": "tuple",
"internalType": "struct IICS26RouterMsgs.MsgSendPacket",
"components": [
{
"name": "sourceChannel",
"type": "string",
"internalType": "string"
},
{
"name": "timeoutTimestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"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"
}
]
}
]
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "toHexHash",
Expand Down Expand Up @@ -155,6 +260,28 @@
],
"stateMutability": "pure"
},
{
"type": "error",
"name": "ICS20InvalidAddress",
"inputs": [
{
"name": "addr",
"type": "string",
"internalType": "string"
}
]
},
{
"type": "error",
"name": "ICS20InvalidAmount",
"inputs": [
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "StringsInsufficientHexLength",
Expand Down
Loading
Loading