-
Notifications
You must be signed in to change notification settings - Fork 12
Send and relay packet #250
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 tasks
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.
3466d64 to
462e188
Compare
junha1
requested changes
Mar 12, 2020
| let result = ctx.get_kv_store_mut().insert(&path, &value); | ||
| if result.is_some() { | ||
| panic!("Packet already exists."); | ||
| } |
There was a problem hiding this comment.
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'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it. Thanks!
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
462e188 to
80c03ba
Compare
junha1
approved these changes
Mar 12, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.