-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Utility] Foundational bugs, tests, code cleanup and improvements (2/3) #550
Conversation
…owner and a few other small things
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.
Yo @Olshansk! I gave this a first pass. Solid work as usual.
Some bits and bolts and Qs. Depending on the priority of this vs what I am working on currently let me know if and how I can help you here. 🫡
Co-authored-by: Alessandro De Blasis <alex@deblasis.net>
Co-authored-by: Alessandro De Blasis <alex@deblasis.net>
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.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
message Params { | ||
reserved 4, 59; // Deprecated |
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.
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
shared/core/types/proto/actor.proto
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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") |
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.
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.
🚢 🇮🇹
@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
Block
lifecycle andMessage
validationStore()
,getStoreAndHeight()
and a few otherwiseTransaction
proto to the shared moduleTxResult
result and removedDefaultTxResult
andBlockHeader
GenericParam
toServiceURL
StakeStatus
in the shared packageapplyTx
tohydrateTx
and added documentation on its functionalityTesting
make develop_test
README
Required Checklist
If Applicable Checklist
shared/docs/*
if I updatedshared/*
README(s)