-
Notifications
You must be signed in to change notification settings - Fork 220
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
test: IBC transfer scenarios #10852
base: master
Are you sure you want to change the base?
test: IBC transfer scenarios #10852
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
21dbe29
to
014071b
Compare
014071b
to
33915c1
Compare
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 think I'm confusing myself on which hook does what. Do we have a flow diagram somewhere?
func (k Keeper) PacketStore(ctx sdk.Context, ourOrigin types.PacketOrigin, ourPort string, ourChannel string, sequence uint64) (storetypes.KVStore, []byte) { | ||
key := fmt.Sprintf("%s/%s/%s/%v", ourOrigin, ourPort, ourChannel, sequence) | ||
packetKey := []byte(key) | ||
return prefix.NewStore(ctx.KVStore(k.key), []byte(packetDataStoreKeyPrefix)), packetKey | ||
} |
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.
Maybe make a reference to https://github.com/agoric-labs/ibc-go/blob/v6.3.1-alpha.agoric.2/modules/core/24-host/keys.go#L183-L187 but mention we need to support both directions (hence the extra origin)?
Btw I like the paths used by IBC better because it denotes what each path element is in the name
originalData/{src|dst}/ports/{ourPort}/channel/{ourChannel}/sequences/{sequence}
if StorePacketData && !bytes.Equal(strippedPacket.GetData(), packet.GetData()) { | ||
packetStore, packetKey := k.PacketStoreFromOrigin(ctx, types.PacketSrc, packet) | ||
if !packetStore.Has(packetKey) { | ||
packetStore.Set(packetKey, packet.GetData()) |
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.
Why are we remembering the packet data when receiving an ack? Shouldn't we assert we had saved packet data if we rewrote the packet, and delete instead?
origPacket := packet | ||
packetStore, packetKey := k.PacketStoreFromOrigin(ctx, types.PacketSrc, packet) | ||
if packetStore.Has(packetKey) { | ||
origPacket.Data = packetStore.Get(packetKey) |
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'm confused, why do we need to restore the original packet's data? Wouldn't a received timeout packet contain the original packet data in the first place?
packet.GetDestPort(), packet.GetDestChannel(), | ||
timeout, packet.GetTimeoutTimestamp(), | ||
) | ||
packetStore, packetKey := k.PacketStoreFromOrigin(ctx, types.PacketSrc, packet) |
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.
If we're writing an ack, wouldn't we be the destination / receiver? Why are we using a src origin here?
- min fees were set to 0 to allow the relayers to come up. likely not the best approach, but the most expedient for now
- allow callers to set broadcast mode and fees - allow callers to specify another binary, like osmosisd or gaiad
3a4bb6b
to
560a63a
Compare
closes: #XXXX
refs: #XXXX
Description
Security Considerations
Scaling Considerations
Documentation Considerations
Testing Considerations
Upgrade Considerations