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

IBC demo fixes #174

Merged
merged 64 commits into from
Nov 5, 2019
Merged

IBC demo fixes #174

merged 64 commits into from
Nov 5, 2019

Conversation

cwgoes
Copy link
Contributor

@cwgoes cwgoes commented Oct 31, 2019

Updating as I test.


For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge PR #XYZ: [title]" (coding standards)

@cwgoes
Copy link
Contributor Author

cwgoes commented Oct 31, 2019

Got the first part of the connection handshake working, now dealing with:

1506 D[2019-10-31|15:21:59.484] Invalid tx                                   module=state code=1 log="{\"codespace\":\"sdk\",\"code\":1,\"message\":\"recovered: runtime error: invalid memory address or nil pointer dereference\nstack:\ngoroutine 136 [running]:\nruntime/debug.Stack((
     0xc002476218, 0x1120d00, 0x1f0ba80)\n\t/usr/lib/go/src/runtime/debug/stack.go:24 +0x9d\ngithub.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx.func1(0xc002479f38, 0xc00247a610, 0xc00247bdf8)\n\t/home/cwgoes/working/go/pkg/mod/github.com/cosmos/[email protected]
     0628-96a4006ba6c3/baseapp/baseapp.go:544 +0x90\npanic(0x1120d00, 0x1f0ba80)\n\t/usr/lib/go/src/runtime/panic.go:679 +0x1b2\ngithub.com/tendermint/tendermint/crypto/merkle.(*ProofRuntime).DecodeProof(0xc00013dd40, 0x0, 0x0, 0xc002939d20, 0x10fcbe0, 0xc0029543c0, 0xc002476508))
     \n\t/home/cwgoes/working/go/pkg/mod/github.com/tendermint/[email protected]/crypto/merkle/proof.go:101 +0x3a\ngithub.com/tendermint/tendermint/crypto/merkle.(*ProofRuntime).Verify(0xc00013dd40, 0x0, 0xc0029467e0, 0x20, 0x20, 0xc002946800, 0x1e, 0xc0029490a0, 0x1, 0x1, ...)\\
     n\t/home/cwgoes/working/go/pkg/mod/github.com/tendermint/[email protected]/crypto/merkle/proof.go:123 +0x3c\ngithub.com/tendermint/tendermint/crypto/merkle.(*ProofRuntime).VerifyValue(...)\n\t/home/cwgoes/working/go/pkg/mod/github.com/tendermint/[email protected]/crypto/mee
     rkle/proof.go:113\ngithub.com/cosmos/cosmos-sdk/x/ibc/23-commitment.Proof.VerifyMembership(0x0, 0x169a540, 0xc002949080, 0x169a4c0, 0xc002948fc0, 0xc0028fab60, 0x47, 0xc6, 0x16a8740)\n\t/home/cwgoes/working/go/pkg/mod/github.com/cosmos/[email protected]
     006ba6c3/x/ibc/23-commitment/merkle.go:142 +0x158\ngithub.com/cosmos/cosmos-sdk/x/ibc/02-client/keeper.Keeper.VerifyMembership(0x16983c0, 0xc000c79600, 0xc000183340, 0xc00016b2b0, 0xa, 0xc00016b278, 0x7, 0x7, 0x16a8740, 0xc000036120, ...)\n\t/home/cwgoes/working/go/pkg/mod/gii
     thub.com/cosmos/[email protected]/x/ibc/02-client/keeper/keeper.go:177 +0x13d\ngithub.com/cosmos/cosmos-sdk/x/ibc/03-connection/keeper.Keeper.VerifyMembership(0x16983c0, 0xc000c79600, 0xc000183340, 0xc00016b2c0, 0xe, 0xc00016b2d0, 0xb, 0xb, 0x16a99
     700, 0xc00013b740, ...)\n\t/home/cwgoes/working/go/pkg/mod/github.com/cosmos/[email protected]/x/ibc/03-connection/keeper/keeper.go:147 +0x182\ngithub.com/cosmos/cosmos-sdk/x/ibc/03-connection/keeper.Keeper.ConnOpenTry(0x16983c0, 0xc000c79600, 00
     xc000183340, 0xc00016b2c0, 0xe, 0xc00016b2d0, 0xb, 0xb, 0x16a9700, 0xc00013b740, ...)\n\t/home/cwgoes/working/go/pkg/mod/github.com/cosmos/[email protected]/x/ibc/03-connection/keeper/handshake.go:86 +0x61f\ngithub.com/cosmos/cosmos-sdk/x/ibc/033
     -connection.HandleMsgConnectionOpenTry(0x16a8740, 0xc000036120, 0x16baf60, 0xc00283b340, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\n\t/home/cwgoes/working/go/pkg/mod/github.com/cosmos/[email protected]/x/ibc/03-connection/handler.go:34 +0x183\ngithub.cc
     om/cosmos/cosmos-sdk/x/ibc.NewHandler.func1(0x16a8740, 0xc000036120, 0x16baf60, 0xc00283b340, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\n\t/home/cwgoes/working/go/pkg/mod/github.com/cosmos/[email protected]/x/ibc/handler.go:33 +0xc00\ngithub.com/cosmoss
     /cosmos-sdk/baseapp.(*BaseApp).runMsgs(0xc0004d68c0, 0x16a8740, 0xc000036120, 0x16baf60, 0xc00283b340, 0xa, 0x0, 0x0, 0x0, 0x0, ...)\n\t/home/cwgoes/working/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/baseapp.go:659 +0xc3c\ngithub.comm
     /cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx(0xc0004d68c0, 0x3, 0xc0027554a0, 0xee, 0xee, 0x169a440, 0xc002938720, 0x0, 0x0, 0x0, ...)\n\t/home/cwgoes/working/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/baseapp.go:618 +0x39f\ngithub.coo
     m/cosmos/cosmos-sdk/baseapp.(*BaseApp).DeliverTx(0xc0004d68c0, 0xc0027554a0, 0xee, 0xee, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\n\t/home/cwgoes/working/go/pkg/mod/github.com/cosmos/[email protected]/baseapp/abci.go:194 +0x2c1\ngithub.com/tendermint//
     tendermint/abci/client.(*localClient).DeliverTxAsync(0xc000da30e0, 0xc0027554a0, 0xee, 0xee, 0x0, 0x0, 0x0, 0x0, 0x0)\n\t/home/cwgoes/working/go/pkg/mod/github.com/tendermint/[email protected]/abci/client/local_client.go:88 +0xed\ngithub.com/tendermint/tendermint/proxy.(*appp
     ConnConsensus).DeliverTxAsync(0xc000c19560, 0xc0027554a0, 0xee, 0xee, 0x0, 0x0, 0x0, 0x0, 0x0)\n\t/home/cwgoes/working/go/pkg/mod/github.com/tendermint/[email protected]/proxy/app_conn.go:73 +0x5e\ngithub.com/tendermint/tendermint/state.execBlockOnProxyApp(0x16a9180, 0xc000aa
     8b400, 0x16b4420, 0xc000c19560, 0xc0027dcd20, 0x16bd160, 0xc00012c230, 0x6, 0xc0004a020c, 0x4)\n\t/home/cwgoes/working/go/pkg/mod/github.com/tendermint/[email protected]/state/execution.go:286 +0x613\ngithub.com/tendermint/tendermint/state.(*BlockExecutor).ApplyBlock(0xc00011
     15ce0, 0xa, 0x0, 0xc0004a0200, 0x6, 0xc0004a020c, 0x4, 0xc, 0x2, 0xc002798aa0, ...)\n\t/home/cwgoes/working/go/pkg/mod/github.com/tendermint/[email protected]/state/execution.go:124 +0x17a\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).finalizeCommit(0xc0008fff
     500, 0xd)\n\t/home/cwgoes/working/go/pkg/mod/github.com/tendermint/[email protected]/consensus/state.go:1342 +0x90a\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).tryFinalizeCommit(0xc0008ff500, 0xd)\n\t/home/cwgoes/working/go/pkg/mod/github.com/tendermint/tt
     [email protected]/consensus/state.go:1273 +0x383\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).enterCommit.func1(0xc0008ff500, 0x0, 0xd)\n\t/home/cwgoes/working/go/pkg/mod/github.com/tendermint/[email protected]/consensus/state.go:1218 +0x90\ngithub.com/tendd
     ermint/tendermint/consensus.(*ConsensusState).enterCommit(0xc0008ff500, 0xd, 0x0)\n\t/home/cwgoes/working/go/pkg/mod/github.com/tendermint/[email protected]/consensus/state.go:1250 +0x61a\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).addVote(0xc0008ff500, 0xcc
     002836500, 0x0, 0x0, 0xc00247dae8, 0x434451, 0x14a1ee8)\n\t/home/cwgoes/working/go/pkg/mod/github.com/tendermint/[email protected]/consensus/state.go:1678 +0xa39\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).tryAddVote(0xc0008ff500, 0xc002836500, 0x0, 0x0, 0xx
     8, 0xc00247daf8, 0x4b12bd)\n\t/home/cwgoes/working/go/pkg/mod/github.com/tendermint/[email protected]/consensus/state.go:1521 +0x59\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).handleMsg(0xc0008ff500, 0x16874a0, 0xc00013d9b8, 0x0, 0x0)\n\t/home/cwgoes/workk
     ing/go/pkg/mod/github.com/tendermint/[email protected]/consensus/state.go:688 +0x252\ngithub.com/tendermint/tendermint/consensus.(*ConsensusState).receiveRoutine(0xc0008ff500, 0x0)\n\t/home/cwgoes/working/go/pkg/mod/github.com/tendermint/[email protected]/consensus/state.goo
     :646 +0x56a\ncreated by github.com/tendermint/tendermint/consensus.(*ConsensusState).OnStart\n\t/home/cwgoes/working/go/pkg/mod/github.com/tendermint/[email protected]/consensus/state.go:334 +0x13a\n\"}"

@cwgoes
Copy link
Contributor Author

cwgoes commented Oct 31, 2019

Looks like a proof isn't being encoded correctly.

@cwgoes
Copy link
Contributor Author

cwgoes commented Oct 31, 2019

(this also has to be checked for, as it's a DoS vector, but for now I will debug the correct path)

@cwgoes
Copy link
Contributor Author

cwgoes commented Oct 31, 2019

The proof is nil for some reason.

@cwgoes
Copy link
Contributor Author

cwgoes commented Oct 31, 2019

Tried flagProve = true, that doesn't seem to be the problem.

@cwgoes
Copy link
Contributor Author

cwgoes commented Oct 31, 2019

We cannot use queriers for any IBC state queries, since we always need proofs.

We also need to prove the thing actually in the store - binary-encoded, not JSON-encoded.

@jackzampolin jackzampolin marked this pull request as ready for review November 5, 2019 00:56
@jackzampolin jackzampolin merged commit 7b2589c into fedekunze/ibc Nov 5, 2019
jackzampolin pushed a commit that referenced this pull request Jan 15, 2020
@alessio alessio deleted the cwgoes/ibc-demo-fixes branch March 30, 2020 18:29
jackzampolin added a commit that referenced this pull request Apr 23, 2020
* IBC v1.0.0

* add demo readme

* update ibc-demo.md

* fix readme to match current state

* WIP connection handshake

* Merge PR #174: IBC demo fixes

* Fix branch in demo readme

* Fix branch in script

* Apply suggestions from code review

Co-Authored-By: Anca Zamfir <[email protected]>

* Init ibc-alpha

* Update sdk version to incorporate codec changes

* Upstream codec changes

* Add --node flag to transfer commands

* Remove extra --from flag

* fix app.evidenceKeeper params

* point to 'misc-ibc-issues' SDK branch

* fix build

* target to ibc-alpha

* Update gaia to latest ibc-alpha

* IBC v1.0.0

* add demo readme

* update ibc-demo.md

* fix readme to match current state

* WIP connection handshake

* Merge PR #174: IBC demo fixes

* Fix branch in demo readme

* Fix branch in script

* Apply suggestions from code review

Co-Authored-By: Anca Zamfir <[email protected]>

* Init ibc-alpha

* Update sdk version to incorporate codec changes

* Upstream codec changes

* Add --node flag to transfer commands

* Remove extra --from flag

* fix app.evidenceKeeper params

* point to 'misc-ibc-issues' SDK branch

* fix build

* target to ibc-alpha

* Update gaia to latest ibc-alpha

* Update to latest sdk:ibc-alpha and rebase onto master

* Fix broken tests

* update to v0.38.0 sdk

* Update to latest master, bank changes

* Update to latest SDK ibc-alpha

* update: gaia to master of the sdk

- updated gaia to use the master branch of the sdk
- when full proto?

Signed-off-by: Marko Baricevic <[email protected]>

* bump to master

* Proto updates

* Update makefiles

* Fix codecs in cli tests

* Update CLI tests

* WIP fix deps

* Pin to IBC-alpha

* Updates to build, failing tests

* Update to latest ibc-alpha

* Push

* Update to latest ibc-alpha

* Update upstream SDK version to latest ibc-alpha

* Update to latest ibc-alpha

* Push go.sum changes

* enable historical info tracking

* Update to latest ibc-alpha

* Push latest ibc-alpha version

* Fix build, flags issue still present

* Working build

* Fix lint issue

* Update to latest sdk@ibc-alpha

* Update TM and SDK versions

* Change historical header numsaved to 1000 and update to latest ibc-alpha

* Update upstream SDK version

* Merge PR #318: Hook up 20-Transfer module to Gaia

* hookup transfer module to gaia

* Update upstream SDK version

Co-authored-by: Christopher Goes <[email protected]>

* Update upstream SDK version

* Fix commit

* bump sdk dependency

* Update sdk version

* update to [email protected]

* Update to latest cosmos-sdk

* Push ibc-alpha @jackzampolin: update sdk version

* Push ibc-alpha @jackzampolin: update sdk version

* Push ibc-alpha @jackzampolin: fix go version in dockerfile

* Merge PR #336: Add testing dockerfile for relayer

* Add test docker file for relayer and makefile build, tag and push commands

* add entrypoint on test docker image

* fix typo in makefile

* turn up speed on tests

* Back to 1s blocks

* Test fixes

* Push ibc-alpha @jackzampolin: ensure that tags are indexed

* Push ibc-alpha @jackzampolin: update to latest sdk@ibc-alpha

* Push ibc-alpha @jackzampolin: update sdk to latest ibc-alpha

* Push ibc-alpha @jackzampolin: update sdk version

* Add capability keeper to gaia

* Push ibc-alpha @jackzampolin: clean up go.sum

* Push ibc-alpha @jackzampolin: fix test failures

* Push ibc-alpha @jackzampolin: begin incorporating the port routing changes

* Push ibc-alpha @jackzampolin: begin incorporating the port routing changes

* Merge PR #349: Update to lastest SDK

* make gaia fixes

* Update to latest

* blah

* remove sdk replace

Co-authored-by: Jack Zampolin <[email protected]>

* Push ibc-alpha @jackzampolin: fix go.sum

* Push ibc-alpha @jackzampolin: fix test failure due to key refactor

* Passing cli tests?"

* Push ibc-alpha @jackzampolin: Update to latest SDK master

* Remove unnecessary import

* Passing multisig test

* Update go.mod

Co-Authored-By: Federico Kunze <[email protected]>

* Update lcd_test/helpers.go

Co-Authored-By: Federico Kunze <[email protected]>

* Update lcd_test/helpers.go

Co-Authored-By: Bot from GolangCI <[email protected]>

* Apply suggestions from code review

Co-Authored-By: Federico Kunze <[email protected]>

* Update app/app.go

Co-Authored-By: Federico Kunze <[email protected]>

* Apply suggestions from code review

* revert changes as suggested by @fedekunze

* run go mod tidy

* attempt to fix test-sim-multi-seed-short simulation

* Revert "attempt to fix test-sim-multi-seed-short simulation"

This reverts commit 1ff1a01.

* Push ibc-alpha @jackzampolin: address pr comments and clean up old ibc demo

* remove unnecessary replace statement

* Push ibc-alpha @jackzampolin: update to latest cosmos-sdk master and assoicated changes

* Push ibc-alpha @jackzampolin: update to latest SDK

* Push ibc-alpha @jackzampolin: fix test builds

* Push ibc-alpha @jackzampolin: fix packet send issue

* Push ibc-alpha @jackzampolin: update sdk to fix encoding issue on acks

* Push ibc-alpha @jackzampolin: update for supply removal and packet ack fixes

* Push ibc-alpha @jackzampolin: update to latest sdk master

* Fix test failures

* Push ibc-alpha @jackzampolin: fix gaia supply tests

* Push ibc-alpha @jackzampolin: fix lcd test failures

* WIP debugging

* Push ibc-alpha @jackzampolin: update to include capability fixes

* Push ibc-alpha @jackzampolin: fix test build issue

* add HistoricalInfoKey to skipped prefixes

* fix diff with SDK's Simapp

* typo

* update sim_test.go

* Bump sdk version

* update replay.go and helpers.go

* remove default param override

* Update Dockerfile

* Push ibc-alpha @jackzampolin: update to sdk master

* Push ibc-alpha @jackzampolin: address PR comments

* simplify makefile's docker target, remove remote push

* update .PHONY

remove go mod verify after lint, no longer needed

* Reduce diff size

* Push ibc-alpha @jackzampolin: re-add docker push to Makefile

* Push ibc-alpha @jackzampolin: incorporate historical entries change from SDK

* Address PR comment

Co-authored-by: Federico Kunze <[email protected]>
Co-authored-by: mossid <[email protected]>
Co-authored-by: Christopher Goes <[email protected]>
Co-authored-by: Federico Kunze <[email protected]>
Co-authored-by: Anca Zamfir <[email protected]>
Co-authored-by: Marko Baricevic <[email protected]>
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
Co-authored-by: Aditya Sripal <[email protected]>
Co-authored-by: Alessio Treglia <[email protected]>
Co-authored-by: Bot from GolangCI <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants