pokt-network / poktroll

The official Shannon upgrade implementation of the Pocket Network Protocol implemented using Rollkit.dev
MIT License
15 stars 7 forks source link

[On-Chain] Ensure all message responses contain results #663

Open bryanchriswhite opened 4 days ago

bryanchriswhite commented 4 days ago

Objective

Ensure message responses contain the respective created/updated resources.

Origin Document

image

Goals

Deliverables

Non-goals / Non-deliverables

General deliverables


Creator: @bryanchriswhite Co-Owners: @red-0ne

bryanchriswhite commented 4 days ago

Complications

As soon as I try to import poktroll.application.Application for use in poktroll.application.MsgDelegateToGateway, the generated pulsar go source changes in an unexpected way:

image

When subsequently produces the following error when running application module integration tests:

recovered: message poktroll.MsgDelegateToGateway does not contain field poktroll.application.MsgDelegateToGateway.app_address
stack:
goroutine 104 [running]:
runtime/debug.Stack()
... 
github.com/cosmos/cosmos-sdk/testutil/cli.ExecTestCLICmd({{0x0, 0x0, 0x0}, {0x7f7ffc24dc08, 0xc000d11380}, 0x0, {0xc0003c55d0, 0xc}, {0x53503e8, 0xc0012b07e0}, ...}, ...)
    /home/bwhite/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.50.4/testutil/cli/cmd.go:26 +0x2bb
github.com/pokt-network/poktroll/x/application/module_test.TestCLI_DelegateToGateway.func1(0xc009322340)
    /home/bwhite/Projects/pokt/poktroll/x/application/module/tx_delegate_to_gateway_test.go:98 +0x3fb
testing.tRunner(0xc009322340, 0xc009542fc0)
    /home/bwhite/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.2.linux-amd64/src/testing/testing.go:1689 +0x1da
created by testing.(*T).Run in goroutine 16
    /home/bwhite/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.2.linux-amd64/src/testing/testing.go:1742 +0x7d3
: panic

For comparison, here's what the pulsar go source should look like:

image

bryanchriswhite commented 4 days ago

NB: Updating the buf.gen.pulsar.yaml like so had no effect:

-    opt: paths=source_relative,Mpoktroll/shared/service.proto=github.com/pokt-network/poktroll/api/poktroll/shared,Mpoktroll/shared/supplier.proto=github.com/pokt-network/poktroll/api/poktroll/shared,Mpoktroll/application/application.proto=github.com/pokt-network/poktroll/api/poktroll/application,Mpoktroll/supplier/supplier.proto=github.com/pokt-network/poktroll/api/poktroll/supplier,Mpoktroll/session/session.proto=github.com/pokt-network/poktroll/api/poktroll/session
+    opt: paths=source_relative,Mpoktroll/shared/service.proto=github.com/pokt-network/poktroll/api/poktroll/shared,Mpoktroll/shared/supplier.proto=github.com/pokt-network/poktroll/api/poktroll/shared,Mpoktroll/application/application.proto=github.com/pokt-network/poktroll/api/poktroll/application,Mpoktroll/supplier/supplier.proto=github.com/pokt-network/poktroll/api/poktroll/supplier,Mpoktroll/session/session.proto=github.com/pokt-network/poktroll/api/poktroll/session,Mpoktroll/application/tx.proto=github.com/pokt-network/poktroll/api/poktroll/application