-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Record Specification (#118)
* [59]: Create some stuff in types/specification.go related to RecordSpecification and InputSpeciofication objects. Rename a couple existing functions in there to prevent conflict and confusion (related to Source fields). * [59]: Fill in ValidateBasic for both RecordSpecification and InputSpecification. * [59]: Add a MetadataAddress function for getting a contract spec address from a record spec address. * [59]: Allow multiple responsible parties in a record spec. * [59]: Make sure there's at least one responsible party on a record spec. * [59]: Remove the wantErr parameter in the specification tests since it's redundant (empty want string conveys same info). * [59]: Update migrate test due to multiple responsible parties change. * [59]: Create unit tests for String methods on RecordSpecification and InputSpecification. * [59]: stop outputting some actual values in the specification tests. * [59]: Verify that the record id metadata address in the input spec source has the record prefix. * [59]: Add unit tests for InputSpecification.ValidateBasic(). * z[59]: Add unit tests for RecordSpecification.ValidateBasic(). * [59]: Update query and tx proto to add record spec rpcs and messages. * [59]: Remove the DeleteRecordSpecification rpc endpoint. Record spec deleting will be handled automatically during contract spec updating or deleting. * [59]: Put the DeleteRecordSpecification endpoint back in. * [59]: Add a name parameter to the query for record specifications (since they don't have their own uuids). * [59]: Implement at least skeletons for the stuff recently added to the queries and transactions endpoints list. * [59]: proto-format and regen. * [59]: Create iterator funcs for record specs. * [59]: Finish up RecordSpecificationsForContractSpecification in the query server. * [59]: During the spec remove keeper methods, first check if the spec is used and short circuit as early as possible. * [59]: Linter.... * [59]: Fix one of the tests that was set up incorrectly to falsely validate the functionality of a method that was corrected. * [59]: Remove the record_spec_ids field from the contract specification. The specification ids for record specifications contain the uuid for the contract specification its in. Having that list along with that spec id structure was causing synchronization issues. Removing that field allows for a record spec to be added or deleted without having to update the contract spec. * [59]: Linter. * [59]: For the msg_server methods for specifications, pull the signing logic out of the specification keeper and into the msg_server. I feel this is a bit cleaner by making the keeper more focused on managing data in the store. * [59]: Update unit tests with change in signer check code location. * [59]: Move the ValidateAllOwnersAreSigners func into the main keeper.go file since it's a really generic function that could be useful in other keepers. * [59]: In the iterators, prefer UnmarshalBinaryBare to MustUnmarshalBinaryBare since the iterators can return the error to be handled (instead of callin panic). Also call isRecordSpecUsed for all record specs in a contract spec when checking if the contract spec is used. * [59]: Add a query for getting both the contract spec and record specs. * [59]: Log an error when getting record specifications but one isn't found. * [59]: Have the remove spec methods in the keeper return an error since sometimes it doesn't actually do the remove. * [59]: Comments and formatting. * [59]: Add some TODO notes on stuff that needs unit tests. Create a skeleton unit test file for the msg server. * [59]: Add some TODO notes to the querier. * [59]: Add changelog line for this ticket. * [59]: When deleting a contract specification, first delete all its record specifications. * [59]: Add record spec stuff to the codec. * [59]: Add some stuff that got missed in the types/msg.go file. * [59]: Add a record specs parameter to NewGenesisState. * [59]: Add spec stuff to the genesis keeper. * [59]: Write a few unit tests for the RecordSpecification stuff in the keeper. Fix the failure messages of some of the other keeper unit tests. * [59]: write TestIterateRecordSpecsForContractSpec tests. * [59]: Linter. * [59]: Write TestGetRecordSpecificationsForContractSpecificationID tests. * [59]: Write TestValidateRecordSpecUpdate tests. * [59]: Add specification msg service calls to the handler.
- Loading branch information
1 parent
cfd7d44
commit 401c6d8
Showing
29 changed files
with
5,392 additions
and
1,428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.