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

Conversation

gjermundgaraba
Copy link
Contributor

No description provided.

@gjermundgaraba gjermundgaraba linked an issue Nov 11, 2024 that may be closed by this pull request
@@ -15,7 +15,7 @@ var DefaultChainSpecs = []*interchaintest.ChainSpec{
Images: []ibc.DockerImage{
{
Repository: "ghcr.io/cosmos/ibc-go-wasm-simd", // FOR LOCAL IMAGE USE: Docker Image Name
Version: "poc-solidity-ibc-eureka-wasm", // FOR LOCAL IMAGE USE: Docker Image Tag
Version: "gjermund-tmp-wasmd", // FOR LOCAL IMAGE USE: Docker Image Tag
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will update to a more proper version soon, waiting for some PRs


wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

wasmd types not compatible, which is why we have our own types I guess

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.59%. Comparing base (54d509b) to head (0000000).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #88      +/-   ##
==========================================
+ Coverage   98.52%   98.59%   +0.07%     
==========================================
  Files          12       12              
  Lines         338      357      +19     
  Branches       11       11              
==========================================
+ Hits          333      352      +19     
  Misses          5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gjermundgaraba gjermundgaraba marked this pull request as ready for review November 11, 2024 11:50
Copy link
Member

@srdtrk srdtrk left a comment

Choose a reason for hiding this comment

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

Looking good. I'll approve after most of the review items are addressed. Can you also update the benchmarks in README?

src/errors/IICS26RouterErrors.sol Show resolved Hide resolved
src/utils/ICS24Host.sol Outdated Show resolved Hide resolved
src/utils/ICS24Host.sol Outdated Show resolved Hide resolved
src/ICS20Transfer.sol Outdated Show resolved Hide resolved
src/ICS20Transfer.sol Outdated Show resolved Hide resolved
src/msgs/IICS26RouterMsgs.sol Show resolved Hide resolved
src/msgs/IICS26RouterMsgs.sol Show resolved Hide resolved
src/msgs/IICS26RouterMsgs.sol Show resolved Hide resolved
src/utils/ICS24Host.sol Outdated Show resolved Hide resolved
src/utils/ICS24Host.sol Outdated Show resolved Hide resolved
@gjermundgaraba
Copy link
Contributor Author

@srdtrk updated with the changes now

Copy link
Member

@srdtrk srdtrk left a comment

Choose a reason for hiding this comment

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

Lgtm. I left a few nits which I'll push myself and then merge this PR

test/fixtures/acknowledgePacket-groth16.json Outdated Show resolved Hide resolved
test/fixtures/acknowledgePacket-plonk.json Outdated Show resolved Hide resolved
test/fixtures/receivePacket-groth16.json Outdated Show resolved Hide resolved
test/fixtures/receivePacket-plonk.json Outdated Show resolved Hide resolved
src/utils/ICS24Host.sol Outdated Show resolved Hide resolved
Comment on lines +30 to +31
/// @notice ICS20_ENCODING is the encoding string for ICS20 packet data.
string public constant ICS20_ENCODING = "application/json";
Copy link
Member

Choose a reason for hiding this comment

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

Can't wait to test this with abi encoding in the future 🚀

@srdtrk srdtrk merged commit f78f4e6 into main Nov 13, 2024
13 checks passed
@srdtrk srdtrk deleted the gjermund/78-update-simapp-used-to-latest-version-of-ibc-go-with-eureka branch November 13, 2024 03:09
@srdtrk
Copy link
Member

srdtrk commented Nov 13, 2024

I've also updated the benchmarks

value: packetData
});
IICS26RouterMsgs.MsgSendPacket memory msgSendPacket = IICS26RouterMsgs.MsgSendPacket({
sourceChannel: msg_.sourceChannel,
timeoutTimestamp: msg_.timeoutTimestamp, // TODO: Default timestamp?
Copy link
Member

Choose a reason for hiding this comment

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

We should impose some limits on this value

Copy link
Contributor Author

@gjermundgaraba gjermundgaraba Nov 16, 2024

Choose a reason for hiding this comment

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

Created an issue for it #104

string memory counterpartyId = ICS02_CLIENT.getCounterparty(msg_.sourceChannel).clientId;

// TODO: validate all identifiers
if (msg_.timeoutTimestamp <= block.timestamp) {
revert IBCInvalidTimeoutTimestamp(msg_.timeoutTimestamp, block.timestamp);
}

uint32 sequence = IBC_STORE.nextSequenceSend(msg_.sourcePort, msg_.sourceChannel);
uint32 sequence = IBC_STORE.nextSequenceSend(payload.sourcePort, msg_.sourceChannel);
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 only be keyed on the source Channel now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding this fix to: #101

revert IBCMultiPayloadPacketNotSupported();
}
Payload calldata payload = msg_.packet.payloads[0];

IICS02ClientMsgs.CounterpartyInfo memory cInfo = ICS02_CLIENT.getCounterparty(msg_.packet.destChannel);
if (keccak256(bytes(cInfo.clientId)) != keccak256(bytes(msg_.packet.sourceChannel))) {
Copy link
Member

Choose a reason for hiding this comment

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

This seems wrong

Copy link
Contributor Author

@gjermundgaraba gjermundgaraba Nov 16, 2024

Choose a reason for hiding this comment

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

Getting fixed in your PR, it seems: #100

return abi.encodePacked(
"commitments/ports/", portId, "/channels/", channelId, "/sequences/", Strings.toString(sequence)
);
return abi.encodePacked("commitments/channels/", channelId, "/sequences/", Strings.toString(sequence));
Copy link
Member

Choose a reason for hiding this comment

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

These paths need to be changed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Getting fixed in: #101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Update simapp used to latest version of ibc-go with Eureka
3 participants