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

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

Open
5 tasks
bryanchriswhite opened this issue Jul 5, 2024 · 2 comments
Open
5 tasks

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

bryanchriswhite opened this issue Jul 5, 2024 · 2 comments
Assignees
Labels
code health Cleans up some code community A ticket intended to potentially be picked up by a community member enhancement New feature or request

Comments

@bryanchriswhite
Copy link
Contributor

Objective

Ensure message responses contain the respective created/updated resources.

Origin Document

image

Goals

  • Improve developer experience.

Deliverables

  • A PR for each module which updates all message reponse types to include the created/updated object.

Non-goals / Non-deliverables

  • Refactoring protobuf types or message handlers outside the scope of this issue.

General deliverables

  • Comments: Add/update TODOs and comments alongside the source code so it is easier to follow.
  • Testing: Add new tests (unit and/or E2E) to the test suite.
  • Makefile: Add new targets to the Makefile to make the new functionality easier to use.
  • Documentation: Update architectural or development READMEs; use mermaid diagrams where appropriate.

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

@bryanchriswhite bryanchriswhite added enhancement New feature or request code health Cleans up some code community A ticket intended to potentially be picked up by a community member labels Jul 5, 2024
@bryanchriswhite
Copy link
Contributor Author

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/[email protected]/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/[email protected]/src/testing/testing.go:1689 +0x1da
created by testing.(*T).Run in goroutine 16
	/home/bwhite/go/pkg/mod/golang.org/[email protected]/src/testing/testing.go:1742 +0x7d3
: panic

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

image

@bryanchriswhite
Copy link
Contributor Author

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

@bryanchriswhite bryanchriswhite self-assigned this Jul 5, 2024
@bryanchriswhite bryanchriswhite changed the title [REPLACE_WITH_IDENTIFIER] Provide a descriptive title [On-Chain] Ensure all message responses contain results Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health Cleans up some code community A ticket intended to potentially be picked up by a community member enhancement New feature or request
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant