-
Notifications
You must be signed in to change notification settings - Fork 208
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
Add new Vtransfer module for notifications #8624
Merged
Merged
Changes from all commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
f5fb4ac
Add vtransfer
schnetzlerjoe 23e3da9
fix(vtransfer): implement and manually test middleware
michaelfig f40c5c8
feat(vtransfer): use `vibc` middleware
michaelfig 80d69e9
feat(vtransfer): prefix action types with `VTRANSFER_`
michaelfig 2864bd5
feat(vat-transfer): first cut at working proposal
michaelfig 8d183cc
Work on ibc testing
schnetzlerjoe 61bb791
test(vtransfer): use custom VM controller function
michaelfig 42b2e7e
test: RunUtils test of vtransfer
turadg e93a2c9
fixup vtransfer
turadg ddf20a7
fixup bridge-target
turadg 7459f16
fix(cosmos): wrap PFM with `vtransfer`, not the other way around
michaelfig 39beecb
fix(network): create and use `coerceToData`
michaelfig 07e6d87
feat(localchain): per-account interception of `vtransfer`
michaelfig 36f7c7e
fix: declare `vtransfer` in `storeUpgrades.Added`
michaelfig f999648
test: more logging in localchain-test
turadg 60d063f
Transfer test work
schnetzlerjoe 95710b7
invokeWriteAcknowledgement memo
schnetzlerjoe d4d716b
test updates
schnetzlerjoe eaba264
chore(localchain): colocate dependency on `vat-transfer`
michaelfig 0d40ce4
test(cosmos): make more structures public
michaelfig a604793
chore(vbank): remove unused types and export others
michaelfig 3b6b82a
test(vtransfer): pass IBC integration test
michaelfig fb95d23
WIP: middleware acknowledgments are not yet flowing
michaelfig f34af98
test(vtransfer): more detailed middleware test
michaelfig b6630a7
test(vtransfer): scatter the sequence numbers to help debugging
michaelfig 195e1c5
Move ot module directly
schnetzlerjoe d5d881f
Reorder inits
schnetzlerjoe 6dfa143
Finish passing tests
schnetzlerjoe 30302a1
test(vtransfer): use ibc/testing framework again, now passing
michaelfig 554fa49
feat(vtransfer): only intercept packets for registered targets
michaelfig badf695
feat(vats): `BRIDGE_TARGET_REGISTER` and `BRIDGE_TARGET_UNREGISTER`
michaelfig ef0fa4e
test(cosmos): expose internals in `x/*/testing`
michaelfig 96dc150
refactor(cosmos): introduce `vm.Sender` type for VM upcalls
michaelfig b1c21bf
docs(vtransfer): improve inline comments
michaelfig 96fdbdf
fix(vtransfer): some separation of keeper duties
michaelfig 8ac8197
fix(vats): `vtransfer` code cleanup
michaelfig 234eb8e
docs(vats): add `transferMiddleware` to `ChainBootstrapSpaceT`
michaelfig 8979c5e
refactor(vtransfer): reorder and consolidate callbacks
michaelfig 8ebe765
refactor(cosmos): clarify `app.go`
michaelfig f3201ed
build(deps): use Agoric-compatible ibc-go v6.3.1
michaelfig 277c489
refactor(transfer): use `VTRANSFER_IBC_EVENT` constant, not string
michaelfig 8bcd9e2
fix(network)!: improve naming and data coercion
michaelfig 0fa1d0a
test(boot): clarify `vtransfer` test
michaelfig ca60e8d
docs: minor comment fixes
michaelfig 5d54d00
chore(vtransfer): use new `localchain` types
michaelfig e651437
test(vtransfer): create stubs for `localchain`
michaelfig 5d4eb51
refactor: clean up vow and network types
michaelfig 3b5e5fc
test(vtransfer): follow the `fake-bridge` lead
michaelfig 89b50a0
feat(vtransfer): save watched addresses to genesis
michaelfig 803e381
fix(vtransfer): refactor and minor improvements
michaelfig ee7351a
docs(boot): property order matters
michaelfig 1be5003
fix(vats): `vat-transfer` and `bridge-target` rework
michaelfig 1aa1d26
fix(cosmos): make agd upgrade work
michaelfig a171561
fix(cosmos): update more `vtransfer` app.go wiring
michaelfig 0158073
test(vtransfer): update `bootstrapTests`
michaelfig e93f7ea
test(boot): break out `vtransfer.test.ts`
michaelfig 3ff24ca
test(boot): use separate bundle caches to prevent concurrent flakes
michaelfig 0b2cf71
style(vats): Rename variables in the vtransfer proposal script
gibson042 09ac0a8
refactor(vats): Implement vtransfer app intercept in the bridge regis…
gibson042 95d81c2
chore(vats): Remove "ß" typos
gibson042 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
syntax = "proto3"; | ||
package agoric.vtransfer; | ||
|
||
import "gogoproto/gogo.proto"; | ||
|
||
option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/vtransfer/types"; | ||
|
||
// The initial and exported module state. | ||
message GenesisState { | ||
option (gogoproto.equal) = false; | ||
|
||
// The list of account addresses that are being watched by the VM. | ||
repeated bytes watched_addresses = 1 [ | ||
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", | ||
(gogoproto.jsontag) = "watched_addresses", | ||
(gogoproto.moretags) = "yaml:\"watched_addresses\"" | ||
]; | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package keeper | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/Agoric/agoric-sdk/golang/cosmos/x/vstorage" | ||
) | ||
|
||
// GetVstorageKeeper returns the vstorage keeper from the swingset keeper | ||
// for testing purposes. | ||
func GetVstorageKeeper(t *testing.T, k Keeper) vstorage.Keeper { | ||
if t == nil { | ||
panic("this function is reserved for testing") | ||
} | ||
return k.vstorageKeeper | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package testing | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/keeper" | ||
vstoragetesting "github.com/Agoric/agoric-sdk/golang/cosmos/x/vstorage/testing" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
// GetActionQueueRecords returns the records in the action queue. | ||
// This is a testing utility function. | ||
func GetActionQueueRecords(t *testing.T, ctx sdk.Context, swingsetKeeper keeper.Keeper) ([]string, error) { | ||
vstorageKeeper := keeper.GetVstorageKeeper(t, swingsetKeeper) | ||
actionQueueName := keeper.StoragePathActionQueue | ||
return vstoragetesting.GetQueueItems(ctx, vstorageKeeper, actionQueueName) | ||
gibson042 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
package vbank | ||
|
||
import ( | ||
// "fmt" | ||
|
||
"fmt" | ||
|
||
"github.com/Agoric/agoric-sdk/golang/cosmos/x/vbank/types" | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,3 @@ | ||
package types | ||
|
||
const RouterKey = ModuleName // this was defined in your key.go file | ||
|
||
type VbankSingleBalanceUpdate struct { | ||
Address string `json:"address"` | ||
Denom string `json:"denom"` | ||
Amount string `json:"amount"` | ||
} | ||
|
||
type VbankBalanceUpdate struct { | ||
Nonce uint64 `json:"nonce"` | ||
Type string `json:"type"` | ||
Updated []VbankSingleBalanceUpdate `json:"updated"` | ||
} |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
What is the motivation for this change? This is used by genesis import/export which should set this appropriately.
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 don't know the motivation, but I see that @schnetzlerjoe made the change. Perhaps this panic was being triggered by the x/vtransfer
ibc_middleware_test.go
?