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

[ADR: 015] IBC Packet Receiver #5230

Merged
merged 37 commits into from
Dec 11, 2019
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7ace5b2
WIP: ADR IBC Packet Receiver
mossid Oct 22, 2019
9b1b06e
Update adr-015-ibc-packet-receiver.md
mossid Oct 22, 2019
d275aae
Remove FoldHandler, add consequences
mossid Nov 7, 2019
6bacbcf
Apply suggestions from code review @fedekunze @cwgoes
mossid Nov 7, 2019
465d1d8
Apply suggestions from code review
mossid Nov 8, 2019
291452c
Add wrapper function for acknowledgement
mossid Nov 8, 2019
4ae5461
fix typo
mossid Nov 8, 2019
5735e2b
Merge branch 'master' into joon/adr-ibc-packet-receiver
cwgoes Nov 8, 2019
35ec132
Apply suggestions from code review
mossid Nov 8, 2019
43fe290
Add other handler types requires verification
mossid Nov 13, 2019
330b043
Add PacketHandler type
mossid Nov 13, 2019
7ab51de
Use AnteDecorator, rename the helper to WriteAck
mossid Nov 14, 2019
fe499a6
fix typo
mossid Nov 14, 2019
c6f9154
Merge branch 'master' into joon/adr-ibc-packet-receiver
cwgoes Nov 14, 2019
e130c07
minor cleanup
fedekunze Nov 14, 2019
ab1dcd2
Update adr-015-ibc-packet-receiver.md
mossid Nov 15, 2019
66547af
Add vulnerability scenario(failing message injection)
mossid Nov 15, 2019
9cd9bc3
Apply suggestions from code review
fedekunze Nov 19, 2019
b168e3f
Add PacketDataI to this ADR
jackzampolin Nov 22, 2019
c3a812d
add port/chan checking, add ics20 example
mossid Nov 22, 2019
7f1b0d6
add foldhandler, remove safety assumptions
mossid Dec 3, 2019
961ea03
Apply suggestions from code review
mossid Dec 3, 2019
c60d4c6
Merge branch 'master' into joon/adr-ibc-packet-receiver
fedekunze Dec 4, 2019
4106830
address comments in progress
mossid Dec 4, 2019
4569be4
address missing pieces
mossid Dec 7, 2019
07a8987
fix missed line
mossid Dec 7, 2019
26db0bc
Apply suggestions from code review
cwgoes Dec 8, 2019
ed131a3
Merge branch 'master' into joon/adr-ibc-packet-receiver
cwgoes Dec 8, 2019
e6692f7
Apply suggestions from code review
mossid Dec 9, 2019
46e018c
address comments
mossid Dec 9, 2019
4ce753c
Merge branch 'master' into joon/adr-ibc-packet-receiver
fedekunze Dec 9, 2019
6e4c052
address comments in progress
mossid Dec 10, 2019
0d236ff
Merge branch 'master' into joon/adr-ibc-packet-receiver
alexanderbez Dec 11, 2019
7ebb6ad
Add newline
alexanderbez Dec 11, 2019
d62de0c
Fix linting and typos
alexanderbez Dec 11, 2019
a22aeee
Merge branch 'master' into joon/adr-ibc-packet-receiver
cwgoes Dec 11, 2019
37342cf
Merge branch 'master' into joon/adr-ibc-packet-receiver
cwgoes Dec 11, 2019
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
Prev Previous commit
Next Next commit
address comments in progress
  • Loading branch information
mossid authored Dec 4, 2019
commit 4106830e9581b4a7e4a27ac37f8c0d930cc65b82
11 changes: 8 additions & 3 deletions docs/architecture/adr-015-ibc-packet-receiver.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

`handlePacketRecv` executes per-module `onRecvPacket` callbacks, verifies the
packet merkle proof, and pushes the acknowledgement bytes, if present, to the IBC
channel `Keeper` state (ICS04).
channel `Keeper` state ([ICS04](https://github.com/cosmos/ics/tree/master/spec/ics-004-channel-and-packet-semantics)).

`handlePacketAcknowledgement` executes per-module `onAcknowledgementPacket`
callbacks, and verifies the acknowledgement commitment proof.
Expand Down Expand Up @@ -175,8 +175,13 @@ func NewFoldHandler(k ChannelKeeper) sdk.FoldHandler {
```

The `ProofVerificationDecorator` will be inserted to the top level application.
AdityaSripal marked this conversation as resolved.
Show resolved Hide resolved
It should come right after the default sybil attack resistent layer from the
current `auth.NewAnteHandler`:
It is not safe to make each application responsible to call proof verification
cwgoes marked this conversation as resolved.
Show resolved Hide resolved
logic, whereas application can misbehave(in terms of IBC protocol) either by
mistake or purposefully. Also this eliminates the neccesity for multistore
cacheing inside the app handlers.

The `ProofVerificationDecorator` should come right after the default sybil attack
resistent layer from the current `auth.NewAnteHandler`:

```go
// add IBC ProofVerificationDecorator to the Chain of
Expand Down