-
Notifications
You must be signed in to change notification settings - Fork 13
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] Scaffold the Proof
type and adjust some of the defaults
#197
Conversation
…id root_hash --no-message --yes
Proof
type and adjust some of the defaults
4952c56
to
cf62672
Compare
cf62672
to
9a9ca7a
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.
Overall LGTM lets get it in
// types and functions will be scaffolded correctly. | ||
// Ref: https://github.com/ignite/cli/issues/3737 | ||
// | ||
// The following will need to be done manually after the scaffold: |
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.
This seems like a good time for a bash script IMO
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.
Somewhat tangential: I would like to propose that we entertain the idea of preferring to write scripts in go. I think the stdlib is more than capable on it's own to accomplish most scripting needs. While it may be verbose in some cases, I think minimizing the number of languages in the repo is worth it on the whole.
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.
@Pantani responded to it, so I want to see if we can solve it via the ignite path first before investing time into it writing proprietary scripts.
@@ -1,10 +1,11 @@ | |||
package types | |||
|
|||
import ( | |||
// this line is used by starport scaffolding # 1 |
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.
Was this you or ignite moving this?
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.
Was this you or ignite moving this?
Or maybe the linter?
+1 and same question for similar moved ignite comments.
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.
It's the linter.
x/supplier/types/codec.go
Outdated
|
||
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) |
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.
Not a blocker but just curious if we know what's going on here. It looks redundant at first glance here.
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.
Updated.
This is a result of the pocket
/github.com/pokt-network/potroll
translation.
- The first one is intended.
- The second one was a result of not deleting it after the Claim scaffolding.
- The third one is a result of the Proof scaffolding
I'm deleting (2) & (3).
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.
Nice one @Olshansk! 🙌
I left some comments, mostly goimports, typos, etc.: little things. A couple of questions as well.
Co-authored-by: Bryan White <[email protected]>
Co-authored-by: Bryan White <[email protected]>
Co-authored-by: Bryan White <[email protected]>
* feat: Add staking flag and config parser * chore: Update make file staking operation * test: Update staking tests to use a json config * test: add json staking config file * feat: Use yaml format instead of json * fix: Use yaml tags * chore: Address change requests, Add tests * fix: Add full path to supplier config * chore: address change requests
* test: improve curl usage in e2e suite * chore: add `WithDifficulty()` miner option * test: add `miner#MinedRelays` coverage * chore: review feedback improvements Co-authored-by: Daniel Olshansky <[email protected]> * refactor: `TestFixtureGeneration_MineMockRelays()` add `--gen-mined-relays` flag to conditionally skip * refactor: set fixture generation precedent * chore: improve naming & comments * chore: improve comments & cleanup * chore: remove commented code * refactor: `HashBytes` to shared testutil * refactor & fix: difficulty * [RelayMiner, Testing] test: add coverage to `relayerSessionsManager` (#194) * test: `relayerSessionsManager` claim/proof life-cycle * chore: review feedback improvements Co-authored-by: Daniel Olshansky <[email protected]> --------- Co-authored-by: Daniel Olshansky <[email protected]> * chore: fix comment * chore: review feedback improvements * chore: review feedback improvements * chore: review feedback improvements * revert: `RelayRequest` pointer receivers * chore: add TODO comment * chore: add "DO NOT EDIT..." comment to fixture output * chore: chore: review feedback improvements --------- Co-authored-by: Daniel Olshansky <[email protected]>
…a couple of files
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.
🚢
…197) Scaffolding the `Proof` type + a few minor edits such as: - Removing proofs from the genesis state - Fixing the language around retrieving more than one proof - scaffold command: ```bash $ ignite scaffold map proof --module supplier supplier_address session_id merkle_proof --no-message --yes ``` --------- Co-authored-by: Bryan White <[email protected]> Co-authored-by: Redouane Lakrache <[email protected]>
Summary
Scaffolding the
Proof
type + a few minor edits such as:Human Summary
AI Summary
Summary generated by Reviewpad on 24 Nov 23 21:57 UTC
This pull request contains multiple file diffs related to the changes made in the codebase. Here is a summary of the changes:
The file
x/supplier/client/cli/query_proof_test.go
has been added. It includes package declaration, commented out functions, and some code related tostrconv
that is commented out.The file
x/supplier/client/cli/query.go
has changes related to module configuration and scaffold operation. It includes import changes and the addition of new commands.The file
x/supplier/client/cli/query.go
introduces new endpoints, response schemas, and query parameters related to querying proofs.The file
x/supplier/client/cli/query.go
contains two new functions related to querying proofs,CmdListProof
andCmdShowProof
, along with a TODO comment.The file
x/supplier/client/cli/query.go
includes changes in import statements, removing unused imports, and organizing import statements.The file
codec.go
includes changes in import statements and a comment line for starport scaffolding.The file
x/supplier/types/key_proof.go
adds theProofKey
function andProofKeyPrefix
constant.The file
genesis.go
in thex/supplier/types
package has changes related to the removal of a line and a comment for starport scaffolding.The file
proof.proto
is a new file that defines a message namedProof
with four string fields.The file
x/supplier/keeper/proof.go
introduces functions related to managing proofs in the store.The file
codec.go
in thex/supplier/types
package includes changes in import statements and the addition of message types to a function.The file
codec.go
adds an import statement for the "github.com/pokt-network/poktroll/x/application/types" package.The file
codec.go
includes changes related to imports and a function definition.The file
proof_test.go
in thex/supplier/keeper
package contains test functions for theProof
type.The file
proof_test.go
includes test cases for querying proofs in the supplier module.Please review these changes and let me know if you need further assistance with any specific diff.
Issue
SubmitProof
message handling #141Type of change
Select one or more:
Testing
make go_develop_and_test
Sanity Checklist