Skip to content

Conversation

@majecty
Copy link
Contributor

@majecty majecty commented Mar 11, 2020

I wrote code to send and relay packets.
While I testing it, I met an unexpected error: "Illformed Sequence stored in the DB: RlpExpectedToBeData".
I'll fix it soon.

@majecty majecty added ics Interchain standard do-not-merge Do not merge this PR experiment Experimental features labels Mar 11, 2020
majecty added 6 commits March 12, 2020 18:32
I tried RlpEncodableWrapper and RlpDecodableWrapper macro. When I use
the macros, test failed.
…ash, and PacketCommitmentHash

Flattened format is easier to use.
…and AcknowledgementHash

Flattened format is easier to use.

Before:
```
data: {
  raw: xxx
}
```

After:
```
data: xxx
```
…_recv_packet

Since another chain's client should be able to verify the proof of
packets, we should be able to specify the proof's block number.
A received packet should use destination port and channel. A sent packet
should use source port and channel.
@majecty majecty force-pushed the f/ics-send-packet branch from 3466d64 to 462e188 Compare March 12, 2020 09:39
@majecty majecty changed the title [WIP] Send and relay packet Send and relay packet Mar 12, 2020
@majecty majecty requested a review from junha1 March 12, 2020 09:40
@majecty majecty removed the do-not-merge Do not merge this PR label Mar 12, 2020
let result = ctx.get_kv_store_mut().insert(&path, &value);
if result.is_some() {
panic!("Packet already exists.");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo in the commit message 'remove_pcket'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I fixed it. Thanks!

majecty added 7 commits March 12, 2020 18:56
To prevent programmers' mistake, remove_packet panics when the packet
does not exist. So we should check the packet is exist or not before
calling remove_packet in the recv_packet method.
The scenario should execute many transactions. Let's reduce the time.
- AcknowledgePacketDatagram
- RecvPacketDatagram
- SendPacketDatagram
@majecty majecty force-pushed the f/ics-send-packet branch from 462e188 to 80c03ba Compare March 12, 2020 09:56
@majecty majecty merged commit c353872 into CodeChain-io:ics-poc Mar 12, 2020
@majecty majecty deleted the f/ics-send-packet branch March 12, 2020 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

experiment Experimental features ics Interchain standard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants