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

[Supplier] feat: persistence proofs in submit proof msg handler #250

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Dec 7, 2023

Summary

Human Summary

WIP

Issue

The SubmitProof msg handler function is receiving proof messages but is not persisting the respective proofs yet.

Type of change

Select one or more:

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Documentation
  • Other (specify)

Testing

  • Run all unit tests: make go_develop_and_test
  • Verify Localnet manually: See the instructions [here](TODO: add link to instructions)

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have performed a self-review of my own code
  • I have commented my code, updated documentation and left TODOs throughout the codebase

@bryanchriswhite bryanchriswhite added supplier Changes related to the Supplier actor on-chain On-chain business logic labels Dec 7, 2023
@bryanchriswhite bryanchriswhite added this to the Shannon TestNet milestone Dec 7, 2023
@bryanchriswhite bryanchriswhite self-assigned this Dec 7, 2023
srv := keeper.NewMsgServerImpl(*supplierKeeper)
ctx := sdk.WrapSDKContext(sdkCtx)

// TODO_IN_THIS_COMMIT: refactor
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[linter-name (fail-on-found)] reported by reviewdog 🐶
// TODO_IN_THIS_COMMIT: refactor

testutil/network/sessions.go Outdated Show resolved Hide resolved
x/supplier/types/query_validation.go Outdated Show resolved Hide resolved
x/session/client/cli/query_get_session_test.go Outdated Show resolved Hide resolved
x/session/client/cli/helpers_test.go Outdated Show resolved Hide resolved
x/supplier/client/cli/query_proof_test.go Outdated Show resolved Hide resolved
// }
// }
args: common,
// TODO_IN_THIS_COMMIT: assert against sentinel error.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[linter-name (fail-on-found)] reported by reviewdog 🐶
// TODO_IN_THIS_COMMIT: assert against sentinel error.

x/supplier/client/cli/query_claim_test.go Outdated Show resolved Hide resolved
testutil/network/network.go Outdated Show resolved Hide resolved
testutil/network/sessions.go Outdated Show resolved Hide resolved
testutil/network/sessions.go Outdated Show resolved Hide resolved
testutil/network/sessions.go Outdated Show resolved Hide resolved
testutil/network/sessions.go Outdated Show resolved Hide resolved
@bryanchriswhite bryanchriswhite changed the base branch from main to issues/141/refactor/proof-store-indices December 12, 2023 16:25
@bryanchriswhite bryanchriswhite force-pushed the issues/141/refactor/proof-store-indices branch from 067a310 to fc28802 Compare December 12, 2023 17:09
@bryanchriswhite bryanchriswhite force-pushed the issues/141/refactor/proof-store-indices branch 2 times, most recently from be55be8 to 7579dcf Compare December 13, 2023 22:10
@bryanchriswhite bryanchriswhite changed the title [On-chain, Supplier] feat: persistence proofs in submit proof msg handler [Supplier] feat: persistence proofs in submit proof msg handler Dec 14, 2023
@bryanchriswhite bryanchriswhite force-pushed the issues/141/refactor/proof-store-indices branch from 7579dcf to 80275dd Compare December 19, 2023 18:32
@bryanchriswhite bryanchriswhite force-pushed the issues/141/refactor/proof-store-indices branch from 80275dd to 9419a30 Compare December 21, 2023 18:57
@bryanchriswhite bryanchriswhite force-pushed the issues/141/feat/proof-persistence branch 2 times, most recently from 58ae02a to 297a919 Compare January 2, 2024 13:46
@bryanchriswhite bryanchriswhite force-pushed the issues/141/refactor/proof-store-indices branch 3 times, most recently from bfad61c to 1ab8ed2 Compare January 3, 2024 10:55
@bryanchriswhite bryanchriswhite force-pushed the issues/141/feat/proof-persistence branch 3 times, most recently from 20fd732 to 42d97c0 Compare January 5, 2024 07:03
@bryanchriswhite bryanchriswhite force-pushed the issues/141/feat/proof-persistence branch from 42d97c0 to 7e265a4 Compare January 8, 2024 11:45
ErrSupplierInvalidQueryRequest = sdkerrors.Register(ModuleName, 11, "invalid query request")
ErrSupplierClaimNotFound = sdkerrors.Register(ModuleName, 12, "claim not found")
ErrSupplierProofNotFound = sdkerrors.Register(ModuleName, 13, "proof not found")
ErrSupplierInvalidApplicationAddress = sdkerrors.Register(ModuleName, 3, "invalid application address")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert

if err != nil {
return sdkerrors.Wrapf(ErrSupplierInvalidAddress, "invalid supplierAddress address (%s)", err)
return sdkerrors.Wrapf(ErrSupplierInvalidAddress, "%s", msg.GetSupplierAddress())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return sdkerrors.Wrapf(ErrSupplierInvalidAddress, "%s", msg.GetSupplierAddress())
return sdkerrors.Wrapf(ErrSupplierInvalidAddress, "supplier address %q in create claim message", msg.GetSupplierAddress())

@bryanchriswhite
Copy link
Contributor Author

Implementation superseded in #328. Omitted test tracked in #141.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-chain On-chain business logic supplier Changes related to the Supplier actor
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[Testing] Ensure unit test coverage of supplier module
1 participant