[Utility] Foundational bugs, tests, code cleanup and improvements (2/3)#550
[Utility] Foundational bugs, tests, code cleanup and improvements (2/3)#550
Conversation
…owner and a few other small things
Co-authored-by: Alessandro De Blasis <alex@deblasis.net>
Co-authored-by: Alessandro De Blasis <alex@deblasis.net>
Olshansk
left a comment
There was a problem hiding this comment.
@deblasis Thank you for the quick turnaround on the review.
PTAL at the changes I made along with the comments I left on the unresolved comments.
I think you have a good sense of some future follow-up work from the changes + the couple of issues I created out of it.
I want to prioritize getting this in given the size of the PR and because I'll be OOO later this week so there won't be much time to maintain & rebase it.
runtime/test_artifacts/generator.go
Outdated
| genericParam = DefaultMaxRelaysString | ||
| } | ||
| actor, pk := NewDefaultActor(int32(actorType), genericParam) | ||
| serviceUrl := getServiceURL(i + 1) |
There was a problem hiding this comment.
I changed everything I could to URL. The only thing thing that remains is the Url that's autogenerated by proto-c-gen which unfortunately can't be changed...
I added a comment to actor.proto:
// proto-gen-c does not support `go_name` at the time of writing resulting
// in the output go field being snakeCase: ServiceUrl (https://github.com/golang/protobuf/issues/555)
runtime/genesis/proto/genesis.proto
Outdated
| // TECHDEBT: Explore a more general purpose "feature flag" approach that makes it easy to add/remove | ||
| // parametesr and add activation heights for them as well. | ||
| message Params { | ||
| reserved 4, 59; // Deprecated |
There was a problem hiding this comment.
One of the reasons I hesitated was to avoid doing it manually, but then I discovered: https://marketplace.visualstudio.com/items?itemName=ripwu.protobuf-helper
Ty for the push
| repeated string chains = 4; // Not applicable to `Validator` actors | ||
| string service_url = 5; // Not applicable to `Application` actors |
There was a problem hiding this comment.
// TODO(#555): Investigate ways of having actor specific params that are not part of the shared struct.
message Actor {
shared/core/types/transaction.go
Outdated
| // Nonce cannot be empty to avoid transaction replays | ||
| if tx.Nonce == "" { | ||
| return ErrEmptyNonce() | ||
| return fmt.Errorf("nonce cannot be empty") |
|
@deblasis Thank you again for the quick turnaround. I know this was a bit rushed but I did a local rerun of the unit tests and LocalNet (with docker-compose + sending a transaction) and verified that it works.
I'm on season 2 of the White Lotus, so I guess I'll see you in Sicily. |
👍💯
Never watched, no idea what's about but I hear it's pop culture already. LOL. Funny. I might be going to Sicily for real in a few weeks... |
* main: [Libp2p] Add libp2p module directories and helpers (part 1) (#534) [P2P, Runtime] Update P2P & base config (part 2) (#535) [Utility] Foundational bugs, tests, code cleanup and improvements (2/3) (#550) [CONSENSUS] Find issue with sending metadata request (#548) [Tooling] SLIP-0010 HD Child Key Generation (#510)
|
Part 3/3 can be found here: #574 |

Description
The second of three changes necessary to refactor and improve the utility module to enable implementation of future, more complex, interfaces.
While the list of changes in #503 was more bug & testing focused, this PR was more readability & documentation focused in preparation for M3.
Issue
Fixes #504
Type of change
Please mark the relevant option(s):
List of changes
Blocklifecycle andMessagevalidationStore(),getStoreAndHeight()and a few otherwiseTransactionproto to the shared moduleTxResultresult and removedDefaultTxResultandBlockHeaderGenericParamtoServiceURLStakeStatusin the shared packageapplyTxtohydrateTxand added documentation on its functionalityTesting
make develop_testREADMERequired Checklist
If Applicable Checklist
shared/docs/*if I updatedshared/*README(s)