From 4b7e72fe889286c3af3aa4f03f45c84895b11d9a Mon Sep 17 00:00:00 2001 From: Abdulbois Date: Thu, 30 May 2024 20:27:48 +0500 Subject: [PATCH] Add schemaVersion into all entities Signed-off-by: Abdulbois Signed-off-by: Abdulbois --- integration_tests/cli/pki-demo.sh | 23 +- integration_tests/cli/pki-noc-certs.sh | 20 +- .../grpc_rest/pki/noc_cert_helpers.go | 11 +- .../compliance/certified_model.proto | 4 +- .../compliance/compliance_history_item.proto | 3 +- .../device_software_compliance.proto | 1 + .../compliance/provisional_model.proto | 4 +- .../compliance/revoked_model.proto | 4 +- .../dclauth/account.proto | 1 + .../dclauth/account_stat.proto | 4 +- .../dclauth/grant.proto | 1 + .../dclauth/pending_account.proto | 3 +- .../dclauth/pending_account_revocation.proto | 2 +- .../dclauth/rejected_account.proto | 1 + .../dclauth/revoked_account.proto | 1 + .../dclupgrade/approved_upgrade.proto | 3 +- .../dclupgrade/grant.proto | 1 + .../dclupgrade/proposed_upgrade.proto | 3 +- .../dclupgrade/rejected_upgrade.proto | 1 + .../model/model_versions.proto | 3 +- .../model/product.proto | 1 + .../model/vendor_products.proto | 4 +- .../approved_certificates_by_subject.proto | 4 +- ...roved_certificates_by_subject_key_id.proto | 1 + .../pki/approved_root_certificates.proto | 4 +- .../pki/certificate_identifier.proto | 3 +- .../pki/child_certificates.proto | 4 +- .../pki/grant.proto | 1 + ...oc_root_certificates_by_vid_and_skid.proto | 4 +- ...tion_points_by_issuer_subject_key_id.proto | 1 + .../pki/revoked_noc_root_certificates.proto | 3 +- .../pki/revoked_root_certificates.proto | 3 +- .../distributedcomplianceledger/pki/tx.proto | 9 - .../pki/unique_certificate.proto | 4 +- .../validator/description.proto | 3 +- .../validator/disabled_validator.proto | 3 +- .../validator/grant.proto | 1 + .../validator/last_validator_power.proto | 4 +- .../proposed_disable_validator.proto | 3 +- .../validator/rejected_validator.proto | 3 +- .../validator/validator.proto | 4 +- x/compliance/types/certified_model.pb.go | 72 ++- .../types/compliance_history_item.pb.go | 72 ++- .../types/device_software_compliance.pb.go | 53 +- x/compliance/types/provisional_model.pb.go | 74 ++- x/compliance/types/revoked_model.pb.go | 73 ++- x/dclauth/types/account.pb.go | 95 ++- x/dclauth/types/account_stat.pb.go | 54 +- x/dclauth/types/grant.pb.go | 65 +- x/dclauth/types/pending_account.pb.go | 57 +- .../types/pending_account_revocation.pb.go | 82 ++- x/dclauth/types/rejected_account.pb.go | 57 +- x/dclauth/types/revoked_account.pb.go | 89 ++- x/dclupgrade/types/approved_upgrade.pb.go | 92 ++- x/dclupgrade/types/grant.pb.go | 77 ++- x/dclupgrade/types/proposed_upgrade.pb.go | 92 ++- x/dclupgrade/types/rejected_upgrade.pb.go | 92 ++- x/model/types/model_versions.pb.go | 57 +- x/model/types/product.pb.go | 73 ++- x/model/types/vendor_products.pb.go | 60 +- x/pki/client/cli/tx_add_noc_x_509_cert.go | 5 +- .../client/cli/tx_add_noc_x_509_root_cert.go | 5 +- x/pki/client/cli/tx_add_x_509_cert.go | 5 +- .../cli/tx_propose_add_x_509_root_cert.go | 9 +- .../cli/tx_propose_revoke_x_509_root_cert.go | 5 +- .../cli/tx_reject_add_x_509_root_cert.go | 5 +- .../cli/tx_revoke_noc_root_x_509_cert.go | 5 +- x/pki/client/cli/tx_revoke_noc_x_509_cert.go | 5 +- x/pki/client/cli/tx_revoke_x_509_cert.go | 5 +- x/pki/handler_add_noc_cert_test.go | 26 +- x/pki/handler_add_noc_root_cert_test.go | 16 +- x/pki/handler_add_non_root_cert_test.go | 76 +-- x/pki/handler_remove_noc_ica_cert_test.go | 28 +- x/pki/handler_remove_noc_root_cert_test.go | 10 +- x/pki/handler_remove_non_root_cert_test.go | 35 +- x/pki/handler_revoke_noc_cert_test.go | 43 +- x/pki/handler_revoke_noc_root_cert_test.go | 39 +- x/pki/handler_revoke_non_root_cert_test.go | 36 +- x/pki/handler_test.go | 154 +++-- x/pki/handler_update_revocation_test.go | 2 +- x/pki/keeper/approved_certificates.go | 9 +- x/pki/keeper/child_certificates.go | 6 +- .../msg_server_add_noc_x_509_ica_cert.go | 4 +- .../msg_server_add_noc_x_509_root_cert.go | 4 +- x/pki/keeper/msg_server_add_x_509_cert.go | 2 +- .../msg_server_approve_add_x_509_root_cert.go | 2 +- ...g_server_approve_revoke_x_509_root_cert.go | 6 +- .../msg_server_propose_add_x_509_root_cert.go | 1 - ...g_server_propose_revoke_x_509_root_cert.go | 11 +- .../msg_server_reject_add_x_509_root_cert.go | 1 - .../msg_server_revoke_noc_x_509_ica_cert.go | 13 +- .../msg_server_revoke_noc_x_509_root_cert.go | 13 +- x/pki/keeper/msg_server_revoke_x_509_cert.go | 14 +- x/pki/keeper/noc_ica_certificates.go | 8 +- x/pki/keeper/noc_root_certificates.go | 8 +- x/pki/keeper/revoked_certificates.go | 9 +- .../approved_certificates_by_subject.pb.go | 57 +- ...roved_certificates_by_subject_key_id.pb.go | 76 ++- x/pki/types/approved_root_certificates.pb.go | 57 +- x/pki/types/certificate_identifier.pb.go | 57 +- x/pki/types/child_certificates.pb.go | 74 ++- x/pki/types/grant.pb.go | 67 +- x/pki/types/message_add_noc_x_509_ica_cert.go | 5 +- .../message_add_noc_x_509_ica_cert_test.go | 11 - .../types/message_add_noc_x_509_root_cert.go | 3 +- .../message_add_noc_x_509_root_cert_test.go | 11 - x/pki/types/message_add_x_509_cert.go | 3 +- x/pki/types/message_add_x_509_cert_test.go | 11 - .../message_propose_add_x_509_root_cert.go | 3 +- ...essage_propose_add_x_509_root_cert_test.go | 14 - .../message_propose_revoke_x_509_root_cert.go | 16 +- ...age_propose_revoke_x_509_root_cert_test.go | 11 - .../message_reject_add_x_509_root_cert.go | 13 +- ...message_reject_add_x_509_root_cert_test.go | 11 - .../message_revoke_noc_x_509_ica_cert.go | 17 +- .../message_revoke_noc_x_509_ica_cert_test.go | 13 - .../message_revoke_noc_x_509_root_cert.go | 17 +- ...message_revoke_noc_x_509_root_cert_test.go | 13 - x/pki/types/message_revoke_x_509_cert.go | 16 +- x/pki/types/message_revoke_x_509_cert_test.go | 12 - ...oc_root_certificates_by_vid_and_skid.pb.go | 91 ++- ...tion_points_by_issuer_subject_key_id.pb.go | 74 ++- .../types/revoked_noc_root_certificates.pb.go | 79 ++- x/pki/types/revoked_root_certificates.pb.go | 57 +- x/pki/types/tx.pb.go | 580 ++++-------------- x/pki/types/unique_certificate.pb.go | 76 ++- x/validator/types/description.pb.go | 78 ++- x/validator/types/disabled_validator.pb.go | 81 ++- x/validator/types/grant.pb.go | 65 +- x/validator/types/last_validator_power.pb.go | 58 +- .../types/proposed_disable_validator.pb.go | 87 ++- x/validator/types/rejected_validator.pb.go | 86 ++- x/validator/types/validator.pb.go | 84 ++- 133 files changed, 2545 insertions(+), 1711 deletions(-) diff --git a/integration_tests/cli/pki-demo.sh b/integration_tests/cli/pki-demo.sh index f526681bd..38d99dfc3 100755 --- a/integration_tests/cli/pki-demo.sh +++ b/integration_tests/cli/pki-demo.sh @@ -188,13 +188,13 @@ test_divider echo "$user_account (Not Trustee) propose Root certificate" root_path="integration_tests/constants/root_cert" cert_schema_version_1=1 -schema_version_2=2 +schema_version_0=0 result=$(echo "$passphrase" | dcld tx pki propose-add-x509-root-cert --certificate="$root_path" --from $user_account --vid $vid --yes) result=$(get_txn_result "$result") response_does_not_contain "$result" "\"code\": 0" echo "$trustee_account (Trustee) propose Root certificate" -result=$(echo "$passphrase" | dcld tx pki propose-add-x509-root-cert --certificate="$root_path" --certificate-schema-version=$cert_schema_version_1 --schemaVersion=$schema_version_2 --from $trustee_account --vid $vid --yes) +result=$(echo "$passphrase" | dcld tx pki propose-add-x509-root-cert --certificate="$root_path" --schemaVersion=$cert_schema_version_1 --from $trustee_account --vid $vid --yes) result=$(get_txn_result "$result") check_response "$result" "\"code\": 0" @@ -206,7 +206,7 @@ echo $result | jq check_response "$result" "\"subject\": \"$root_cert_subject\"" check_response "$result" "\"subjectKeyId\": \"$root_cert_subject_key_id\"" check_response "$result" "\"certSchemaVersion\": $cert_schema_version_1" -check_response "$result" "\"schemaVersion\": $schema_version_2" +check_response "$result" "\"schemaVersion\": $schema_version_0" test_divider @@ -390,7 +390,7 @@ test_divider echo "$vendor_account adds Intermediate certificate" intermediate_path="integration_tests/constants/intermediate_cert" -result=$(echo "$passphrase" | dcld tx pki add-x509-cert --certificate="$intermediate_path" --certificate-schema-version=$cert_schema_version_1 --schemaVersion=$schema_version_2 --from $vendor_account --yes) +result=$(echo "$passphrase" | dcld tx pki add-x509-cert --certificate="$intermediate_path" --schemaVersion=$cert_schema_version_1 --from $vendor_account --yes) result=$(get_txn_result "$result") check_response "$result" "\"code\": 0" @@ -405,7 +405,7 @@ check_response "$result" "\"subjectKeyId\": \"$intermediate_cert_subject_key_id\ check_response "$result" "\"serialNumber\": \"$intermediate_cert_serial_number\"" check_response "$result" "\"subjectAsText\": \"$intermediate_cert_subject_as_text\"" check_response "$result" "\"schemaVersion\": $cert_schema_version_1" -check_response "$result" "\"schemaVersion\": $schema_version_2" +check_response "$result" "\"schemaVersion\": 0" check_response "$result" "\"approvals\": \\[\\]" echo "Request Intermediate certificate by subjectKeyId - There are no approvals for Intermidiate Certificates" @@ -680,9 +680,8 @@ result=$(echo "$passphrase" | dcld tx pki revoke-x509-cert --subject="$intermedi result=$(get_txn_result "$result") check_response "$result" "\"code\": 4" -revoke_schema_version_3=3 echo "$vendor_account (Not Trustee) revokes only Intermediate certificate. This must not revoke its child - Leaf certificate." -result=$(echo "$passphrase" | dcld tx pki revoke-x509-cert --subject="$intermediate_cert_subject" --subject-key-id="$intermediate_cert_subject_key_id" --schemaVersion=$revoke_schema_version_3 --from=$vendor_account --yes) +result=$(echo "$passphrase" | dcld tx pki revoke-x509-cert --subject="$intermediate_cert_subject" --subject-key-id="$intermediate_cert_subject_key_id" --from=$vendor_account --yes) result=$(get_txn_result "$result") check_response "$result" "\"code\": 0" @@ -712,7 +711,6 @@ result=$(dcld query pki all-revoked-x509-certs) echo $result | jq check_response "$result" "\"subject\": \"$intermediate_cert_subject\"" check_response "$result" "\"subjectKeyId\": \"$intermediate_cert_subject_key_id\"" -check_response "$result" "\"schemaVersion\": $revoke_schema_version_3" response_does_not_contain "$result" "\"subject\": \"$leaf_cert_subject\"" response_does_not_contain "$result" "\"subjectKeyId\": \"$leaf_cert_subject_key_id\"" response_does_not_contain "$result" "\"subject\": \"$root_cert_subject\"" @@ -822,9 +820,8 @@ test_divider echo "7. PROPOSE REVOCATION OF ROOT CERT" test_divider -revoke_schema_version_4=4 echo "$trustee_account (Trustee) proposes to revoke only Root certificate(child certificates should not be revoked)" -result=$(echo "$passphrase" | dcld tx pki propose-revoke-x509-root-cert --subject="$root_cert_subject" --subject-key-id="$root_cert_subject_key_id" --schemaVersion=$revoke_schema_version_4 --from $trustee_account --yes) +result=$(echo "$passphrase" | dcld tx pki propose-revoke-x509-root-cert --subject="$root_cert_subject" --subject-key-id="$root_cert_subject_key_id" --from $trustee_account --yes) result=$(get_txn_result "$result") check_response "$result" "\"code\": 0" @@ -842,7 +839,6 @@ result=$(dcld query pki all-proposed-x509-root-certs-to-revoke) echo $result | jq check_response "$result" "\"subject\": \"$root_cert_subject\"" check_response "$result" "\"subjectKeyId\": \"$root_cert_subject_key_id\"" -check_response "$result" "\"schemaVersion\": $revoke_schema_version_4" response_does_not_contain "$result" "\"subject\": \"$intermediate_cert_subject\"" response_does_not_contain "$result" "\"subjectKeyId\": \"$intermediate_cert_subject_key_id\"" response_does_not_contain "$result" "\"subject\": \"$leaf_cert_subject\"" @@ -1689,9 +1685,8 @@ response_does_not_contain "$result" "\"subjectAsText\": \"$test_cert_subject_as_ test_divider -reject_schema_version_4=4 echo "$second_trustee_account (Second Trustee) rejects Root certificate" -result=$(echo "$passphrase" | dcld tx pki reject-add-x509-root-cert --subject="$test_cert_subject" --subject-key-id="$test_cert_subject_key_id" --schemaVersion=$reject_schema_version_4 --from $second_trustee_account --yes) +result=$(echo "$passphrase" | dcld tx pki reject-add-x509-root-cert --subject="$test_cert_subject" --subject-key-id="$test_cert_subject_key_id" --from $second_trustee_account --yes) result=$(get_txn_result "$result") check_response "$result" "\"code\": 0" @@ -1722,7 +1717,7 @@ check_response "$result" "\"serialNumber\": \"$test_cert_serial_number\"" check_response "$result" "\"subjectAsText\": \"$test_cert_subject_as_text\"" check_response "$result" "\"address\": \"$trustee_account_address\"" check_response "$result" "\"address\": \"$second_trustee_account_address\"" -check_response "$result" "\"schemaVersion\": $reject_schema_version_4" +check_response "$result" "\"schemaVersion\": $schema_version_0" test_divider diff --git a/integration_tests/cli/pki-noc-certs.sh b/integration_tests/cli/pki-noc-certs.sh index 7bf45b68f..988ad442a 100755 --- a/integration_tests/cli/pki-noc-certs.sh +++ b/integration_tests/cli/pki-noc-certs.sh @@ -153,9 +153,8 @@ result=$(get_txn_result "$result") check_response "$result" "\"code\": 414" cert_schema_version_1=1 -schema_version_2=2 echo "Add first NOC root certificate by vendor with VID = $vid" -result=$(echo "$passphrase" | dcld tx pki add-noc-x509-root-cert --certificate="$noc_root_cert_1_path" --certificate-schema-version=$cert_schema_version_1 --schemaVersion=$schema_version_2 --from $vendor_account --yes) +result=$(echo "$passphrase" | dcld tx pki add-noc-x509-root-cert --certificate="$noc_root_cert_1_path" --schemaVersion=$cert_schema_version_1 --from $vendor_account --yes) result=$(get_txn_result "$result") check_response "$result" "\"code\": 0" @@ -293,14 +292,13 @@ check_response "$result" "\"code\": 439" test_divider cert_schema_version_3=3 -schema_version_4=4 echo "Add second NOC certificate by vendor with VID = $vid" -result=$(echo "$passphrase" | dcld tx pki add-noc-x509-ica-cert --certificate="$noc_cert_2_path" --certificate-schema-version=$cert_schema_version_3 --from $vendor_account --yes) +result=$(echo "$passphrase" | dcld tx pki add-noc-x509-ica-cert --certificate="$noc_cert_2_path" --schemaVersion=$cert_schema_version_3 --from $vendor_account --yes) result=$(get_txn_result "$result") check_response "$result" "\"code\": 0" echo "Add third NOC certificate by vendor with VID = $vid" -result=$(echo "$passphrase" | dcld tx pki add-noc-x509-ica-cert --certificate="$noc_cert_1_copy_path" --schemaVersion=$schema_version_4 --from $vendor_account --yes) +result=$(echo "$passphrase" | dcld tx pki add-noc-x509-ica-cert --certificate="$noc_cert_1_copy_path" --from $vendor_account --yes) result=$(get_txn_result "$result") check_response "$result" "\"code\": 0" @@ -317,7 +315,7 @@ check_response "$result" "\"serialNumber\": \"$noc_cert_2_serial_number\"" check_response "$result" "\"vid\": $vid" check_response "$result" "\"schemaVersion\": $cert_schema_version_0" check_response "$result" "\"schemaVersion\": $cert_schema_version_3" -check_response "$result" "\"schemaVersion\": $schema_version_4" +check_response "$result" "\"schemaVersion\": $schema_version_0" echo "Request all approved certificates" @@ -366,9 +364,8 @@ result=$(echo "$passphrase" | dcld tx pki revoke-noc-x509-root-cert --subject="$ result=$(get_txn_result "$result") check_response "$result" "\"code\": 439" -revoke_schema_version_5=5 echo "$vendor_account Vendor revokes only root certificate, it should not revoke intermediate certificates" -result=$(echo "$passphrase" | dcld tx pki revoke-noc-x509-root-cert --subject="$noc_root_cert_1_subject" --subject-key-id="$noc_root_cert_1_subject_key_id" --schemaVersion=$revoke_schema_version_5 --from=$vendor_account --yes) +result=$(echo "$passphrase" | dcld tx pki revoke-noc-x509-root-cert --subject="$noc_root_cert_1_subject" --subject-key-id="$noc_root_cert_1_subject_key_id" --from=$vendor_account --yes) result=$(get_txn_result "$result") check_response "$result" "\"code\": 0" @@ -379,7 +376,7 @@ check_response "$result" "\"subject\": \"$noc_root_cert_1_subject" check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\"" check_response "$result" "\"serialNumber\": \"$noc_root_cert_1_serial_number\"" check_response "$result" "\"serialNumber\": \"$noc_root_cert_1_copy_serial_number\"" -check_response "$result" "\"schemaVersion\": $revoke_schema_version_5" +check_response "$result" "\"schemaVersion\": $schema_version_0" response_does_not_contain "$result" "\"subject\": \"$noc_cert_1_subject\"" response_does_not_contain "$result" "\"subject\": \"$noc_leaf_cert_1_subject\"" @@ -492,9 +489,8 @@ result=$(echo "$passphrase" | dcld tx pki revoke-noc-x509-ica-cert --subject="$n result=$(get_txn_result "$result") check_response "$result" "\"code\": 439" -revoke_schema_version_6=6 echo "$vendor_account Vendor revokes only NOC certificates, it should not revoke leaf certificates" -result=$(echo "$passphrase" | dcld tx pki revoke-noc-x509-ica-cert --subject="$noc_cert_1_subject" --subject-key-id="$noc_cert_1_subject_key_id" --schemaVersion=$revoke_schema_version_6 --from=$vendor_account --yes) +result=$(echo "$passphrase" | dcld tx pki revoke-noc-x509-ica-cert --subject="$noc_cert_1_subject" --subject-key-id="$noc_cert_1_subject_key_id" --from=$vendor_account --yes) result=$(get_txn_result "$result") check_response "$result" "\"code\": 0" @@ -508,7 +504,7 @@ check_response "$result" "\"serialNumber\": \"$noc_root_cert_1_copy_serial_numbe check_response "$result" "\"subject\": \"$noc_cert_1_subject\"" check_response "$result" "\"subjectKeyId\": \"$noc_cert_1_subject_key_id\"" check_response "$result" "\"serialNumber\": \"$noc_cert_1_serial_number" -check_response "$result" "\"schemaVersion\": $revoke_schema_version_6" +check_response "$result" "\"schemaVersion\": $schema_version_0" response_does_not_contain "$result" "\"subject\": \"$noc_leaf_cert_1_subject\"" response_does_not_contain "$result" "\"subjectKeyId\": \"$noc_leaf_cert_1_subject_key_id\"" response_does_not_contain "$result" "\"serialNumber\": \"$noc_leaf_cert_1_serial_number" diff --git a/integration_tests/grpc_rest/pki/noc_cert_helpers.go b/integration_tests/grpc_rest/pki/noc_cert_helpers.go index 33411e8bc..0545b4cb5 100644 --- a/integration_tests/grpc_rest/pki/noc_cert_helpers.go +++ b/integration_tests/grpc_rest/pki/noc_cert_helpers.go @@ -255,9 +255,8 @@ func NocCertDemo(suite *utils.TestSuite) { // Add first NOC certificate by first vendor msgAddNocRootCertificate = pkitypes.MsgAddNocX509RootCert{ - Signer: vendor1Account.Address, - Cert: testconstants.NocRootCert1, - SchemaVersion: testconstants.SchemaVersion, + Signer: vendor1Account.Address, + Cert: testconstants.NocRootCert1, } _, err = suite.BuildAndBroadcastTx([]sdk.Msg{&msgAddNocRootCertificate}, vendor1Name, vendor1Account) require.NoError(suite.T, err) @@ -272,9 +271,8 @@ func NocCertDemo(suite *utils.TestSuite) { // Add third NOC certificate by second vendor msgAddNocRootCertificate = pkitypes.MsgAddNocX509RootCert{ - Signer: vendor2Account.Address, - Cert: testconstants.NocRootCert3, - SchemaVersion: 1, + Signer: vendor2Account.Address, + Cert: testconstants.NocRootCert3, } _, err = suite.BuildAndBroadcastTx([]sdk.Msg{&msgAddNocRootCertificate}, vendor2Name, vendor2Account) require.NoError(suite.T, err) @@ -308,7 +306,6 @@ func NocCertDemo(suite *utils.TestSuite) { require.Equal(suite.T, 1, len(nocCertificatesByVidAndSkid.Certs)) require.Equal(suite.T, testconstants.NocRootCert3Subject, nocCertificatesByVidAndSkid.Certs[0].Subject) require.Equal(suite.T, testconstants.NocRootCert3SubjectKeyID, nocCertificatesByVidAndSkid.Certs[0].SubjectKeyId) - require.Equal(suite.T, uint32(1), nocCertificates.SchemaVersion) require.Equal(suite.T, float32(1), nocCertificatesByVidAndSkid.Tq) // Request All NOC root certificate diff --git a/proto/zigbeealliance/distributedcomplianceledger/compliance/certified_model.proto b/proto/zigbeealliance/distributedcomplianceledger/compliance/certified_model.proto index fbe9fd4c0..0223d939a 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/compliance/certified_model.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/compliance/certified_model.proto @@ -8,7 +8,7 @@ message CertifiedModel { int32 pid = 2; uint32 softwareVersion = 3; string certificationType = 4; - bool value = 5; - + bool value = 5; + uint32 schemaVersion = 6; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/compliance/compliance_history_item.proto b/proto/zigbeealliance/distributedcomplianceledger/compliance/compliance_history_item.proto index 3b41d2c88..30e1c7eb1 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/compliance/compliance_history_item.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/compliance/compliance_history_item.proto @@ -8,5 +8,6 @@ message ComplianceHistoryItem { uint32 softwareVersionCertificationStatus = 1; string date = 2; string reason = 3; - uint32 cDVersionNumber = 4; + uint32 cDVersionNumber = 4; + uint32 schemaVersion = 5; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/compliance/device_software_compliance.proto b/proto/zigbeealliance/distributedcomplianceledger/compliance/device_software_compliance.proto index 550f5b624..943e80e04 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/compliance/device_software_compliance.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/compliance/device_software_compliance.proto @@ -8,4 +8,5 @@ import "zigbeealliance/distributedcomplianceledger/compliance/compliance_info.pr message DeviceSoftwareCompliance { string cDCertificateId = 1; repeated ComplianceInfo complianceInfo = 2; + uint32 schemaVersion = 3; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/compliance/provisional_model.proto b/proto/zigbeealliance/distributedcomplianceledger/compliance/provisional_model.proto index 913b16c33..d61463b44 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/compliance/provisional_model.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/compliance/provisional_model.proto @@ -8,7 +8,7 @@ message ProvisionalModel { int32 pid = 2; uint32 softwareVersion = 3; string certificationType = 4; - bool value = 5; - + bool value = 5; + uint32 schemaVersion = 6; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/compliance/revoked_model.proto b/proto/zigbeealliance/distributedcomplianceledger/compliance/revoked_model.proto index 9676865bd..8b4837711 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/compliance/revoked_model.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/compliance/revoked_model.proto @@ -8,7 +8,7 @@ message RevokedModel { int32 pid = 2; uint32 softwareVersion = 3; string certificationType = 4; - bool value = 5; - + bool value = 5; + uint32 schemaVersion = 6; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/dclauth/account.proto b/proto/zigbeealliance/distributedcomplianceledger/dclauth/account.proto index f1213e518..03aaf63d1 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/dclauth/account.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/dclauth/account.proto @@ -23,5 +23,6 @@ message Account { int32 vendorID = 4; repeated Grant rejects = 5; repeated common.Uint16Range productIDs = 6; + uint32 schemaVersion = 7; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/dclauth/account_stat.proto b/proto/zigbeealliance/distributedcomplianceledger/dclauth/account_stat.proto index e20783f8f..92c68a67d 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/dclauth/account_stat.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/dclauth/account_stat.proto @@ -4,6 +4,6 @@ package zigbeealliance.distributedcomplianceledger.dclauth; option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/dclauth/types"; message AccountStat { - uint64 number = 1; - + uint64 number = 1; + uint32 schemaVersion = 2; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/dclauth/grant.proto b/proto/zigbeealliance/distributedcomplianceledger/dclauth/grant.proto index 53f7ed323..2352ae881 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/dclauth/grant.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/dclauth/grant.proto @@ -9,5 +9,6 @@ message Grant { string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; int64 time = 2; // number of nanoseconds elapsed since January 1, 1970 UTC string info = 3; + uint32 schemaVersion = 4; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/dclauth/pending_account.proto b/proto/zigbeealliance/distributedcomplianceledger/dclauth/pending_account.proto index 6817024ec..66cc3dda5 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/dclauth/pending_account.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/dclauth/pending_account.proto @@ -11,5 +11,6 @@ message PendingAccount { // option (gogoproto.goproto_getters) = false; // option (gogoproto.goproto_stringer) = false; - Account account = 1 [(gogoproto.embed) = true]; + Account account = 1 [(gogoproto.embed) = true]; + uint32 pendingAccountSchemaVersion = 2; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/dclauth/pending_account_revocation.proto b/proto/zigbeealliance/distributedcomplianceledger/dclauth/pending_account_revocation.proto index 0e9b29e84..ff6bab024 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/dclauth/pending_account_revocation.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/dclauth/pending_account_revocation.proto @@ -12,6 +12,6 @@ message PendingAccountRevocation { string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated Grant approvals = 2; - + uint32 schemaVersion = 3; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/dclauth/rejected_account.proto b/proto/zigbeealliance/distributedcomplianceledger/dclauth/rejected_account.proto index 2a357e3fc..8c1099793 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/dclauth/rejected_account.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/dclauth/rejected_account.proto @@ -8,5 +8,6 @@ import "zigbeealliance/distributedcomplianceledger/dclauth/account.proto"; message RejectedAccount { Account account = 1 [(gogoproto.embed) = true]; + uint32 rejectedAccountSchemaVersion = 2; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/dclauth/revoked_account.proto b/proto/zigbeealliance/distributedcomplianceledger/dclauth/revoked_account.proto index f1098b335..ce9fdc11b 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/dclauth/revoked_account.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/dclauth/revoked_account.proto @@ -15,5 +15,6 @@ message RevokedAccount { MaliciousValidator = 1; } Reason reason = 3; + uint32 revokedAccountSchemaVersion = 4; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/approved_upgrade.proto b/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/approved_upgrade.proto index ee17d0802..5170e35ff 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/approved_upgrade.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/approved_upgrade.proto @@ -12,6 +12,7 @@ message ApprovedUpgrade { cosmos.upgrade.v1beta1.Plan plan = 1 [(gogoproto.nullable) = false]; string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated Grant approvals = 3; - repeated Grant rejects = 4; + repeated Grant rejects = 4; + uint32 schemaVersion = 5; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/grant.proto b/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/grant.proto index 7ac0410e8..6b6c0f480 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/grant.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/grant.proto @@ -9,5 +9,6 @@ message Grant { string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; int64 time = 2; // number of nanoseconds elapsed since January 1, 1970 UTC string info = 3; + uint32 schemaVersion = 4; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/proposed_upgrade.proto b/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/proposed_upgrade.proto index ed8599d5d..ef3a01845 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/proposed_upgrade.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/proposed_upgrade.proto @@ -12,6 +12,7 @@ message ProposedUpgrade { cosmos.upgrade.v1beta1.Plan plan = 1 [(gogoproto.nullable) = false]; string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated Grant approvals = 3; - repeated Grant rejects = 4; + repeated Grant rejects = 4; + uint32 schemaVersion = 5; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/rejected_upgrade.proto b/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/rejected_upgrade.proto index 8e5977762..57a1647d7 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/rejected_upgrade.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/dclupgrade/rejected_upgrade.proto @@ -13,5 +13,6 @@ message RejectedUpgrade { string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated Grant approvals = 3; repeated Grant rejects = 4; + uint32 schemaVersion = 5; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/model/model_versions.proto b/proto/zigbeealliance/distributedcomplianceledger/model/model_versions.proto index fb30a7ed8..f4a5c86b5 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/model/model_versions.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/model/model_versions.proto @@ -6,6 +6,7 @@ option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/ message ModelVersions { int32 vid = 1; int32 pid = 2; - repeated uint32 softwareVersions = 3; + repeated uint32 softwareVersions = 3; + uint32 schemaVersion = 4; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/model/product.proto b/proto/zigbeealliance/distributedcomplianceledger/model/product.proto index 35a67a652..a14bf1524 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/model/product.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/model/product.proto @@ -8,4 +8,5 @@ message Product { int32 pid = 1; string name = 2; string partNumber = 3; + uint32 schemaVersion = 4; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/model/vendor_products.proto b/proto/zigbeealliance/distributedcomplianceledger/model/vendor_products.proto index a1dc3dc4b..8181b967d 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/model/vendor_products.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/model/vendor_products.proto @@ -6,7 +6,7 @@ import "zigbeealliance/distributedcomplianceledger/model/product.proto"; message VendorProducts { int32 vid = 1; - repeated Product products = 2; - + repeated Product products = 2; + uint32 schemaVersion = 3; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/approved_certificates_by_subject.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/approved_certificates_by_subject.proto index 40d34442f..ea1e71418 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/pki/approved_certificates_by_subject.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/pki/approved_certificates_by_subject.proto @@ -5,7 +5,7 @@ option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/ message ApprovedCertificatesBySubject { string subject = 1; - repeated string subjectKeyIds = 2; - + repeated string subjectKeyIds = 2; + uint32 schemaVersion = 3; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/approved_certificates_by_subject_key_id.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/approved_certificates_by_subject_key_id.proto index 18348157d..c93fe3ee1 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/pki/approved_certificates_by_subject_key_id.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/pki/approved_certificates_by_subject_key_id.proto @@ -8,4 +8,5 @@ import "zigbeealliance/distributedcomplianceledger/pki/certificate.proto"; message ApprovedCertificatesBySubjectKeyId { string subjectKeyId = 1; repeated Certificate certs = 2; + uint32 schemaVersion = 3; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/approved_root_certificates.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/approved_root_certificates.proto index c2edf4aab..c21edc188 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/pki/approved_root_certificates.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/pki/approved_root_certificates.proto @@ -6,6 +6,6 @@ option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/ import "zigbeealliance/distributedcomplianceledger/pki/certificate_identifier.proto"; message ApprovedRootCertificates { - repeated CertificateIdentifier certs = 1; - + repeated CertificateIdentifier certs = 1; + uint32 schemaVersion = 2; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/certificate_identifier.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/certificate_identifier.proto index e5d918f78..8892b2470 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/pki/certificate_identifier.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/pki/certificate_identifier.proto @@ -6,5 +6,6 @@ option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/ message CertificateIdentifier { string subject = 1; - string subjectKeyId = 2; + string subjectKeyId = 2; + uint32 schemaVersion = 3; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/child_certificates.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/child_certificates.proto index 6610e53a0..d5b41e559 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/pki/child_certificates.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/pki/child_certificates.proto @@ -8,7 +8,7 @@ import "zigbeealliance/distributedcomplianceledger/pki/certificate_identifier.pr message ChildCertificates { string issuer = 1; string authorityKeyId = 2; - repeated CertificateIdentifier certIds = 3; - + repeated CertificateIdentifier certIds = 3; + uint32 schemaVersion = 4; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/grant.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/grant.proto index 5c76753c3..c1028833d 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/pki/grant.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/pki/grant.proto @@ -9,5 +9,6 @@ message Grant { string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; int64 time = 2; // number of nanoseconds elapsed since January 1, 1970 UTC string info = 3; + uint32 schemaVersion = 4; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/noc_root_certificates_by_vid_and_skid.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/noc_root_certificates_by_vid_and_skid.proto index 1b0b1fa02..beaf36cab 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/pki/noc_root_certificates_by_vid_and_skid.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/pki/noc_root_certificates_by_vid_and_skid.proto @@ -10,7 +10,7 @@ message NocRootCertificatesByVidAndSkid { int32 vid = 1 [(gogoproto.moretags) = "validate:\"gte=1,lte=65535\""]; string subjectKeyId = 2; repeated Certificate certs = 3; - float tq = 4; - + float tq = 4; + uint32 schemaVersion = 5; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/pki_revocation_distribution_points_by_issuer_subject_key_id.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/pki_revocation_distribution_points_by_issuer_subject_key_id.proto index c42657167..dc2e97ed4 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/pki/pki_revocation_distribution_points_by_issuer_subject_key_id.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/pki/pki_revocation_distribution_points_by_issuer_subject_key_id.proto @@ -8,5 +8,6 @@ import "zigbeealliance/distributedcomplianceledger/pki/pki_revocation_distributi message PkiRevocationDistributionPointsByIssuerSubjectKeyID { string issuerSubjectKeyID = 1; repeated PkiRevocationDistributionPoint points = 2; + uint32 schemaVersion = 3; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/revoked_noc_root_certificates.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/revoked_noc_root_certificates.proto index c5f34aef5..65388af3a 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/pki/revoked_noc_root_certificates.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/pki/revoked_noc_root_certificates.proto @@ -8,5 +8,6 @@ import "zigbeealliance/distributedcomplianceledger/pki/certificate.proto"; message RevokedNocRootCertificates { string subject = 1; string subjectKeyId = 2; - repeated Certificate certs = 3; + repeated Certificate certs = 3; + uint32 schemaVersion = 4; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/revoked_root_certificates.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/revoked_root_certificates.proto index 9ee282896..8ffe97491 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/pki/revoked_root_certificates.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/pki/revoked_root_certificates.proto @@ -6,5 +6,6 @@ option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/ import "zigbeealliance/distributedcomplianceledger/pki/certificate_identifier.proto"; message RevokedRootCertificates { - repeated CertificateIdentifier certs = 1; + repeated CertificateIdentifier certs = 1; + uint32 schemaVersion = 2; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/tx.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/tx.proto index bd3f8cb8d..2ab24944a 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/pki/tx.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/pki/tx.proto @@ -38,7 +38,6 @@ message MsgProposeAddX509RootCert { int64 time = 4; int32 vid = 5 [(gogoproto.moretags) = "validate:\"gte=1,lte=65535,required\""]; uint32 certSchemaVersion = 6 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""]; - uint32 schemaVersion = 7 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""]; } message MsgProposeAddX509RootCertResponse { @@ -61,7 +60,6 @@ message MsgAddX509Cert { string info = 3 [(gogoproto.moretags) = "validate:\"max=4096\""]; int64 time = 4; uint32 certSchemaVersion = 5 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""]; - uint32 schemaVersion = 6 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""]; } message MsgAddX509CertResponse { @@ -75,7 +73,6 @@ message MsgProposeRevokeX509RootCert { int64 time = 5; string serialNumber = 6; bool revokeChild = 7; - uint32 schemaVersion = 8 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""]; } message MsgProposeRevokeX509RootCertResponse { @@ -101,7 +98,6 @@ message MsgRevokeX509Cert { int64 time = 5; string serialNumber = 6; bool revokeChild = 7; - uint32 schemaVersion = 8 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""]; } message MsgRevokeX509CertResponse { @@ -113,7 +109,6 @@ message MsgRejectAddX509RootCert { string subjectKeyId = 3 [(gogoproto.moretags) = "validate:\"required,max=256\""]; string info = 4 [(gogoproto.moretags) = "validate:\"max=4096\""]; int64 time = 5; - uint32 schemaVersion = 6 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""]; } message MsgRejectAddX509RootCertResponse { @@ -180,7 +175,6 @@ message MsgAddNocX509RootCert { string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString", (gogoproto.moretags) = "validate:\"required\""]; string cert = 2 [(gogoproto.moretags) = "validate:\"required,max=10485760\""]; uint32 certSchemaVersion = 4 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""]; - uint32 schemaVersion = 5 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""]; } message MsgAddNocX509RootCertResponse { @@ -200,7 +194,6 @@ message MsgAddNocX509IcaCert { string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString", (gogoproto.moretags) = "validate:\"required\""]; string cert = 2 [(gogoproto.moretags) = "validate:\"required,max=10485760\""]; uint32 certSchemaVersion = 3 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""]; - uint32 schemaVersion = 4 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""]; } message MsgAddNocX509IcaCertResponse { @@ -214,7 +207,6 @@ message MsgRevokeNocX509RootCert { string info = 5 [(gogoproto.moretags) = "validate:\"max=4096\""]; int64 time = 6; bool revokeChild = 7; - uint32 schemaVersion = 8 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""]; } message MsgRevokeNocX509RootCertResponse { @@ -228,7 +220,6 @@ message MsgRevokeNocX509IcaCert { string info = 5 [(gogoproto.moretags) = "validate:\"max=4096\""]; int64 time = 6; bool revokeChild = 7; - uint32 schemaVersion = 8 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""]; } message MsgRevokeNocX509IcaCertResponse { diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/unique_certificate.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/unique_certificate.proto index 211fa2d24..261ac0e5a 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/pki/unique_certificate.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/pki/unique_certificate.proto @@ -6,7 +6,7 @@ option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/ message UniqueCertificate { string issuer = 1; string serialNumber = 2; - bool present = 3; - + bool present = 3; + uint32 schemaVersion = 4; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/validator/description.proto b/proto/zigbeealliance/distributedcomplianceledger/validator/description.proto index cab63b793..d7c79954a 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/validator/description.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/validator/description.proto @@ -17,5 +17,6 @@ message Description { // optional website link. string website = 3; // optional details. - string details = 4; + string details = 4; + uint32 schemaVersion = 5; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/validator/disabled_validator.proto b/proto/zigbeealliance/distributedcomplianceledger/validator/disabled_validator.proto index 550a18a39..288131bc7 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/validator/disabled_validator.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/validator/disabled_validator.proto @@ -11,6 +11,7 @@ message DisabledValidator { string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated Grant approvals = 3; bool disabledByNodeAdmin = 4; - repeated Grant rejects = 5; + repeated Grant rejects = 5; + uint32 schemaVersion = 6; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/validator/grant.proto b/proto/zigbeealliance/distributedcomplianceledger/validator/grant.proto index 3284611f9..d11ad361e 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/validator/grant.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/validator/grant.proto @@ -9,4 +9,5 @@ message Grant { string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; int64 time = 2; // number of nanoseconds elapsed since January 1, 1970 UTC string info = 3; + uint32 schemaVersion = 4; } \ No newline at end of file diff --git a/proto/zigbeealliance/distributedcomplianceledger/validator/last_validator_power.proto b/proto/zigbeealliance/distributedcomplianceledger/validator/last_validator_power.proto index bae289aa3..675d7b30a 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/validator/last_validator_power.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/validator/last_validator_power.proto @@ -13,7 +13,7 @@ message LastValidatorPower { option (gogoproto.goproto_getters) = false; string owner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - int32 power = 2; - + int32 power = 2; + uint32 schemaVersion = 3; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/validator/proposed_disable_validator.proto b/proto/zigbeealliance/distributedcomplianceledger/validator/proposed_disable_validator.proto index 63e5f7a93..829d6a56d 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/validator/proposed_disable_validator.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/validator/proposed_disable_validator.proto @@ -10,6 +10,7 @@ message ProposedDisableValidator { string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated Grant approvals = 3; - repeated Grant rejects = 4; + repeated Grant rejects = 4; + uint32 schemaVersion = 5; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/validator/rejected_validator.proto b/proto/zigbeealliance/distributedcomplianceledger/validator/rejected_validator.proto index 9c596bfa8..cc2b1397c 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/validator/rejected_validator.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/validator/rejected_validator.proto @@ -10,6 +10,7 @@ message RejectedDisableValidator { string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated Grant approvals = 3; - repeated Grant rejects = 4; + repeated Grant rejects = 4; + uint32 schemaVersion = 5; } diff --git a/proto/zigbeealliance/distributedcomplianceledger/validator/validator.proto b/proto/zigbeealliance/distributedcomplianceledger/validator/validator.proto index 521ae9751..8bac8c3a7 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/validator/validator.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/validator/validator.proto @@ -25,7 +25,7 @@ message Validator { // has the validator been removed from validator set bool jailed = 5; // the reason of validator jailing - string jailedReason = 6; - + string jailedReason = 6; + uint32 schemaVersion = 7; } diff --git a/x/compliance/types/certified_model.pb.go b/x/compliance/types/certified_model.pb.go index 59527d345..f851f4d48 100644 --- a/x/compliance/types/certified_model.pb.go +++ b/x/compliance/types/certified_model.pb.go @@ -28,6 +28,7 @@ type CertifiedModel struct { SoftwareVersion uint32 `protobuf:"varint,3,opt,name=softwareVersion,proto3" json:"softwareVersion,omitempty"` CertificationType string `protobuf:"bytes,4,opt,name=certificationType,proto3" json:"certificationType,omitempty"` Value bool `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"` + SchemaVersion uint32 `protobuf:"varint,6,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *CertifiedModel) Reset() { *m = CertifiedModel{} } @@ -98,6 +99,13 @@ func (m *CertifiedModel) GetValue() bool { return false } +func (m *CertifiedModel) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*CertifiedModel)(nil), "zigbeealliance.distributedcomplianceledger.compliance.CertifiedModel") } @@ -107,24 +115,25 @@ func init() { } var fileDescriptor_7be90d472c8a2fef = []byte{ - // 272 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xbf, 0x4a, 0xc4, 0x30, - 0x1c, 0xc7, 0x1b, 0xcf, 0x8a, 0x06, 0xfc, 0x57, 0x1c, 0x3a, 0x85, 0xe2, 0x94, 0xc1, 0xb6, 0x83, - 0xf8, 0x02, 0x3a, 0x1e, 0x2e, 0x45, 0x1c, 0x5c, 0x24, 0x6d, 0x7e, 0x57, 0x7f, 0x90, 0x6b, 0x42, - 0x9a, 0x9e, 0x9e, 0x4f, 0xe1, 0x33, 0xf8, 0x34, 0x8e, 0x37, 0x3a, 0x4a, 0xfb, 0x22, 0x52, 0x7b, - 0x52, 0xff, 0xe1, 0x96, 0x7c, 0x02, 0x1f, 0xf2, 0xfd, 0xd0, 0xe9, 0x23, 0x96, 0x39, 0x80, 0x50, - 0x0a, 0x45, 0x55, 0x40, 0x2a, 0xb1, 0x76, 0x16, 0xf3, 0xc6, 0x81, 0x2c, 0xf4, 0xdc, 0x0c, 0x54, - 0x81, 0x2c, 0xc1, 0xa6, 0x23, 0x48, 0x0b, 0xb0, 0x0e, 0x67, 0x08, 0xf2, 0x76, 0xae, 0x25, 0xa8, - 0xc4, 0x58, 0xed, 0x74, 0x70, 0xf6, 0x5d, 0x96, 0xfc, 0x23, 0x4b, 0x46, 0x70, 0xfc, 0x4c, 0xe8, - 0xde, 0xc5, 0xa7, 0xf0, 0xb2, 0xf7, 0x05, 0x07, 0x74, 0xb2, 0x40, 0x19, 0x92, 0x88, 0x70, 0x3f, - 0xeb, 0x8f, 0x3d, 0x31, 0x28, 0xc3, 0x8d, 0x81, 0x18, 0x94, 0x01, 0xa7, 0xfb, 0xb5, 0x9e, 0xb9, - 0x7b, 0x61, 0xe1, 0x1a, 0x6c, 0x8d, 0xba, 0x0a, 0x27, 0x11, 0xe1, 0xbb, 0xd9, 0x4f, 0x1c, 0x9c, - 0xd0, 0xc3, 0xf5, 0x87, 0x0b, 0xe1, 0x50, 0x57, 0x57, 0x4b, 0x03, 0xe1, 0x66, 0x44, 0xf8, 0x4e, - 0xf6, 0xfb, 0x21, 0x38, 0xa2, 0xfe, 0x42, 0xa8, 0x06, 0x42, 0x3f, 0x22, 0x7c, 0x3b, 0x1b, 0x2e, - 0xe7, 0xf0, 0xd2, 0x32, 0xb2, 0x6a, 0x19, 0x79, 0x6b, 0x19, 0x79, 0xea, 0x98, 0xb7, 0xea, 0x98, - 0xf7, 0xda, 0x31, 0xef, 0x66, 0x5a, 0xa2, 0xbb, 0x6b, 0xf2, 0x7e, 0x51, 0x3a, 0x04, 0x88, 0xff, - 0xca, 0x19, 0x8f, 0x8b, 0xe3, 0x75, 0xd0, 0x87, 0xaf, 0x49, 0xdd, 0xd2, 0x40, 0x9d, 0x6f, 0x7d, - 0x94, 0x3c, 0x7d, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x49, 0x94, 0xb3, 0x98, 0x01, 0x00, 0x00, + // 288 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xbd, 0x4e, 0xf3, 0x30, + 0x14, 0x40, 0xeb, 0xaf, 0x5f, 0x2b, 0xb0, 0x54, 0x7e, 0x2c, 0x86, 0x4c, 0x56, 0x84, 0x18, 0x32, + 0x90, 0x64, 0x40, 0xbc, 0x00, 0x8c, 0x15, 0x4b, 0x84, 0x18, 0x58, 0x90, 0x13, 0xdf, 0xa6, 0x57, + 0x4a, 0x62, 0xcb, 0x71, 0x0a, 0xe5, 0x29, 0x78, 0xac, 0x8e, 0x1d, 0x19, 0x51, 0xf2, 0x22, 0x28, + 0x4d, 0xab, 0x50, 0x40, 0x6c, 0xf6, 0xb1, 0x74, 0xae, 0xef, 0xa1, 0xd3, 0x57, 0x4c, 0x63, 0x00, + 0x91, 0x65, 0x28, 0x8a, 0x04, 0x42, 0x89, 0xa5, 0x35, 0x18, 0x57, 0x16, 0x64, 0xa2, 0x72, 0xdd, + 0xd1, 0x0c, 0x64, 0x0a, 0x26, 0xec, 0x41, 0x98, 0x80, 0xb1, 0x38, 0x43, 0x90, 0x4f, 0xb9, 0x92, + 0x90, 0x05, 0xda, 0x28, 0xab, 0xd8, 0xf5, 0xbe, 0x2c, 0xf8, 0x43, 0x16, 0xf4, 0xe0, 0x7c, 0x45, + 0xe8, 0xd1, 0xed, 0x4e, 0x78, 0xd7, 0xfa, 0xd8, 0x09, 0x1d, 0x2e, 0x50, 0x3a, 0xc4, 0x25, 0xde, + 0x28, 0x6a, 0x8f, 0x2d, 0xd1, 0x28, 0x9d, 0x7f, 0x1d, 0xd1, 0x28, 0x99, 0x47, 0x8f, 0x4b, 0x35, + 0xb3, 0xcf, 0xc2, 0xc0, 0x03, 0x98, 0x12, 0x55, 0xe1, 0x0c, 0x5d, 0xe2, 0x4d, 0xa2, 0xef, 0x98, + 0x5d, 0xd2, 0xd3, 0xed, 0x87, 0x13, 0x61, 0x51, 0x15, 0xf7, 0x4b, 0x0d, 0xce, 0x7f, 0x97, 0x78, + 0x87, 0xd1, 0xcf, 0x07, 0x76, 0x46, 0x47, 0x0b, 0x91, 0x55, 0xe0, 0x8c, 0x5c, 0xe2, 0x1d, 0x44, + 0xdd, 0x85, 0x5d, 0xd0, 0x49, 0x99, 0xcc, 0x21, 0x17, 0xbb, 0x59, 0xe3, 0xcd, 0xac, 0x7d, 0x78, + 0x03, 0xab, 0x9a, 0x93, 0x75, 0xcd, 0xc9, 0x47, 0xcd, 0xc9, 0x5b, 0xc3, 0x07, 0xeb, 0x86, 0x0f, + 0xde, 0x1b, 0x3e, 0x78, 0x9c, 0xa6, 0x68, 0xe7, 0x55, 0xdc, 0xee, 0x1d, 0x76, 0x99, 0xfc, 0xdf, + 0xa2, 0xfb, 0x7d, 0x17, 0x7f, 0x9b, 0xfd, 0xe5, 0x6b, 0x78, 0xbb, 0xd4, 0x50, 0xc6, 0xe3, 0x4d, + 0xef, 0xab, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x74, 0x97, 0x5e, 0xc2, 0xbe, 0x01, 0x00, 0x00, } func (m *CertifiedModel) Marshal() (dAtA []byte, err error) { @@ -147,6 +156,11 @@ func (m *CertifiedModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintCertifiedModel(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x30 + } if m.Value { i-- if m.Value { @@ -215,6 +229,9 @@ func (m *CertifiedModel) Size() (n int) { if m.Value { n += 2 } + if m.SchemaVersion != 0 { + n += 1 + sovCertifiedModel(uint64(m.SchemaVersion)) + } return n } @@ -362,6 +379,25 @@ func (m *CertifiedModel) Unmarshal(dAtA []byte) error { } } m.Value = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCertifiedModel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipCertifiedModel(dAtA[iNdEx:]) diff --git a/x/compliance/types/compliance_history_item.pb.go b/x/compliance/types/compliance_history_item.pb.go index 9559e01f1..ad83b6cfa 100644 --- a/x/compliance/types/compliance_history_item.pb.go +++ b/x/compliance/types/compliance_history_item.pb.go @@ -27,6 +27,7 @@ type ComplianceHistoryItem struct { Date string `protobuf:"bytes,2,opt,name=date,proto3" json:"date,omitempty"` Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` CDVersionNumber uint32 `protobuf:"varint,4,opt,name=cDVersionNumber,proto3" json:"cDVersionNumber,omitempty"` + SchemaVersion uint32 `protobuf:"varint,5,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *ComplianceHistoryItem) Reset() { *m = ComplianceHistoryItem{} } @@ -90,6 +91,13 @@ func (m *ComplianceHistoryItem) GetCDVersionNumber() uint32 { return 0 } +func (m *ComplianceHistoryItem) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*ComplianceHistoryItem)(nil), "zigbeealliance.distributedcomplianceledger.compliance.ComplianceHistoryItem") } @@ -99,24 +107,25 @@ func init() { } var fileDescriptor_e9a4634fe5730cca = []byte{ - // 275 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x31, 0x4b, 0xc3, 0x40, - 0x14, 0x80, 0x73, 0x5a, 0x0a, 0x1e, 0x88, 0x70, 0xa0, 0x64, 0x3a, 0x4a, 0xa7, 0x2c, 0x49, 0x06, - 0xf1, 0x0f, 0x58, 0x07, 0x45, 0xe8, 0xd0, 0x82, 0x83, 0x4b, 0xb9, 0x24, 0xaf, 0xe9, 0x83, 0x24, - 0x17, 0xee, 0x5e, 0xd0, 0xfa, 0x2b, 0xfc, 0x43, 0xee, 0x8e, 0x1d, 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, 0xff, 0xb7, 0xe2, 0xfe, 0x10, 0xc3, 0xef, 0x9b, 0x3f, 0xee, 0x57, 0xa7, 0x6d, 0x09, - 0x36, 0x1a, 0xb7, 0x91, 0xcf, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4a, 0xe3, 0x3e, 0x94, 0xbb, + // 291 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xc1, 0x4a, 0xf3, 0x40, + 0x10, 0xc7, 0xbb, 0xdf, 0x57, 0x0b, 0x2e, 0x14, 0x61, 0x41, 0xc9, 0x69, 0x29, 0xc5, 0x43, 0x2f, + 0x49, 0x0e, 0xe2, 0x0b, 0x58, 0x0f, 0x8a, 0xd0, 0x43, 0x0b, 0x1e, 0xbc, 0x94, 0x4d, 0x32, 0x4d, + 0x06, 0x92, 0x6c, 0xd8, 0x9d, 0xa0, 0xf5, 0x29, 0x7c, 0x2c, 0x8f, 0x3d, 0x7a, 0x94, 0xe4, 0x45, + 0xc4, 0x24, 0x98, 0x56, 0x44, 0xbc, 0xcd, 0xfc, 0x18, 0xfe, 0x03, 0xff, 0x1f, 0x5f, 0x3d, 0x63, + 0x1c, 0x00, 0xa8, 0x34, 0x45, 0x95, 0x87, 0xe0, 0x47, 0x68, 0xc9, 0x60, 0x50, 0x12, 0x44, 0xa1, + 0xce, 0x8a, 0x96, 0xa6, 0x10, 0xc5, 0x60, 0xfc, 0x1e, 0xec, 0x8d, 0xeb, 0x04, 0x2d, 0x69, 0xb3, + 0x5d, 0x23, 0x41, 0xe6, 0x15, 0x46, 0x93, 0x16, 0x97, 0x87, 0xa1, 0xde, 0x2f, 0xa1, 0x5e, 0x0f, + 0xa6, 0x35, 0xe3, 0xa7, 0xf3, 0xaf, 0xf5, 0xa6, 0xcd, 0xbd, 0x25, 0xc8, 0xc4, 0x82, 0x4f, 0xad, + 0xde, 0xd0, 0xa3, 0x32, 0x70, 0x0f, 0xc6, 0xa2, 0xce, 0xe7, 0x60, 0x08, 0x37, 0x18, 0x2a, 0x42, + 0x9d, 0xaf, 0x48, 0x51, 0x69, 0x1d, 0x36, 0x61, 0xb3, 0xf1, 0xf2, 0x0f, 0x97, 0x42, 0xf0, 0x61, + 0xa4, 0x08, 0x9c, 0x7f, 0x13, 0x36, 0x3b, 0x5e, 0x36, 0xb3, 0x38, 0xe3, 0x23, 0x03, 0xca, 0xea, + 0xdc, 0xf9, 0xdf, 0xd0, 0x6e, 0x13, 0x33, 0x7e, 0x12, 0x5e, 0x77, 0x59, 0x8b, 0x32, 0x0b, 0xc0, + 0x38, 0xc3, 0xe6, 0xd1, 0x77, 0x2c, 0xce, 0xf9, 0xd8, 0x86, 0x09, 0x64, 0xaa, 0xc3, 0xce, 0x51, + 0x73, 0x77, 0x08, 0xaf, 0xe0, 0xb5, 0x92, 0x6c, 0x57, 0x49, 0xf6, 0x5e, 0x49, 0xf6, 0x52, 0xcb, + 0xc1, 0xae, 0x96, 0x83, 0xb7, 0x5a, 0x0e, 0x1e, 0xee, 0x62, 0xa4, 0xa4, 0x0c, 0x3e, 0x2b, 0xf1, + 0xdb, 0x06, 0xdd, 0x9f, 0xbc, 0xb8, 0x7d, 0x65, 0x6e, 0x67, 0xe6, 0x69, 0xdf, 0x0d, 0x6d, 0x0b, + 0xb0, 0xc1, 0xa8, 0x51, 0x71, 0xf1, 0x11, 0x00, 0x00, 0xff, 0xff, 0xdd, 0x67, 0xae, 0x72, 0xe1, 0x01, 0x00, 0x00, } @@ -140,6 +149,11 @@ func (m *ComplianceHistoryItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintComplianceHistoryItem(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x28 + } if m.CDVersionNumber != 0 { i = encodeVarintComplianceHistoryItem(dAtA, i, uint64(m.CDVersionNumber)) i-- @@ -198,6 +212,9 @@ func (m *ComplianceHistoryItem) Size() (n int) { if m.CDVersionNumber != 0 { n += 1 + sovComplianceHistoryItem(uint64(m.CDVersionNumber)) } + if m.SchemaVersion != 0 { + n += 1 + sovComplianceHistoryItem(uint64(m.SchemaVersion)) + } return n } @@ -338,6 +355,25 @@ func (m *ComplianceHistoryItem) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceHistoryItem + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipComplianceHistoryItem(dAtA[iNdEx:]) diff --git a/x/compliance/types/device_software_compliance.pb.go b/x/compliance/types/device_software_compliance.pb.go index 794ba444e..96dcbd068 100644 --- a/x/compliance/types/device_software_compliance.pb.go +++ b/x/compliance/types/device_software_compliance.pb.go @@ -25,6 +25,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type DeviceSoftwareCompliance struct { CDCertificateId string `protobuf:"bytes,1,opt,name=cDCertificateId,proto3" json:"cDCertificateId,omitempty"` ComplianceInfo []*ComplianceInfo `protobuf:"bytes,2,rep,name=complianceInfo,proto3" json:"complianceInfo,omitempty"` + SchemaVersion uint32 `protobuf:"varint,3,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *DeviceSoftwareCompliance) Reset() { *m = DeviceSoftwareCompliance{} } @@ -74,6 +75,13 @@ func (m *DeviceSoftwareCompliance) GetComplianceInfo() []*ComplianceInfo { return nil } +func (m *DeviceSoftwareCompliance) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*DeviceSoftwareCompliance)(nil), "zigbeealliance.distributedcomplianceledger.compliance.DeviceSoftwareCompliance") } @@ -83,23 +91,25 @@ func init() { } var fileDescriptor_2c74e1bdb764c708 = []byte{ - // 252 bytes of a gzipped FileDescriptorProto + // 279 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x0a, 0xab, 0xca, 0x4c, 0x4f, 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x23, 0x04, 0xf4, 0x53, 0x52, 0xcb, 0x32, 0x93, 0x53, 0xe3, 0x8b, 0xf3, 0xd3, 0x4a, 0xca, 0x13, 0x8b, 0x52, 0xe3, 0x11, 0x52, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xa6, 0xa8, 0xe6, 0xea, 0xe1, 0x31, 0x57, 0x0f, 0x21, 0x20, 0xe5, 0x4d, 0x9e, 0x73, 0x10, 0xcc, 0xf8, - 0xcc, 0xbc, 0xb4, 0x7c, 0x88, 0x1b, 0x94, 0x36, 0x33, 0x72, 0x49, 0xb8, 0x80, 0x1d, 0x1a, 0x0c, + 0xcc, 0xbc, 0xb4, 0x7c, 0x88, 0x1b, 0x94, 0x6e, 0x32, 0x72, 0x49, 0xb8, 0x80, 0x1d, 0x1a, 0x0c, 0x75, 0xa7, 0x33, 0x5c, 0x9d, 0x90, 0x06, 0x17, 0x7f, 0xb2, 0x8b, 0x73, 0x6a, 0x51, 0x49, 0x66, 0x5a, 0x66, 0x72, 0x62, 0x49, 0xaa, 0x67, 0x8a, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0xba, 0xb0, 0x50, 0x2e, 0x17, 0x1f, 0xc2, 0x7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0x40, 0x5d, 0x6c, 0xc1, 0xa9, 0x8b, 0xb0, 0x56, 0x17, 0x1a, 0xa0, 0x15, 0xc8, 0x41, 0x5a, 0x52, + 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x0e, 0x49, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, + 0x9b, 0xf5, 0x82, 0x27, 0x02, 0x00, 0x00, } func (m *DeviceSoftwareCompliance) Marshal() (dAtA []byte, err error) { @@ -122,6 +132,11 @@ func (m *DeviceSoftwareCompliance) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintDeviceSoftwareCompliance(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x18 + } if len(m.ComplianceInfo) > 0 { for iNdEx := len(m.ComplianceInfo) - 1; iNdEx >= 0; iNdEx-- { { @@ -173,6 +188,9 @@ func (m *DeviceSoftwareCompliance) Size() (n int) { n += 1 + l + sovDeviceSoftwareCompliance(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovDeviceSoftwareCompliance(uint64(m.SchemaVersion)) + } return n } @@ -277,6 +295,25 @@ func (m *DeviceSoftwareCompliance) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDeviceSoftwareCompliance + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipDeviceSoftwareCompliance(dAtA[iNdEx:]) diff --git a/x/compliance/types/provisional_model.pb.go b/x/compliance/types/provisional_model.pb.go index d92e59e6f..f9eea4067 100644 --- a/x/compliance/types/provisional_model.pb.go +++ b/x/compliance/types/provisional_model.pb.go @@ -28,6 +28,7 @@ type ProvisionalModel struct { SoftwareVersion uint32 `protobuf:"varint,3,opt,name=softwareVersion,proto3" json:"softwareVersion,omitempty"` CertificationType string `protobuf:"bytes,4,opt,name=certificationType,proto3" json:"certificationType,omitempty"` Value bool `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"` + SchemaVersion uint32 `protobuf:"varint,6,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *ProvisionalModel) Reset() { *m = ProvisionalModel{} } @@ -98,6 +99,13 @@ func (m *ProvisionalModel) GetValue() bool { return false } +func (m *ProvisionalModel) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*ProvisionalModel)(nil), "zigbeealliance.distributedcomplianceledger.compliance.ProvisionalModel") } @@ -107,25 +115,26 @@ func init() { } var fileDescriptor_7ee36b89c15e0be3 = []byte{ - // 274 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xbf, 0x4a, 0xc5, 0x30, - 0x18, 0x47, 0x1b, 0xaf, 0x15, 0x0d, 0x88, 0xd7, 0xe2, 0xd0, 0x29, 0x14, 0xa7, 0x0e, 0xb6, 0x1d, - 0xc4, 0x17, 0x70, 0x95, 0x0b, 0x52, 0xc4, 0xc1, 0x45, 0xd2, 0xe6, 0xbb, 0xf5, 0x83, 0xdc, 0x26, - 0xa4, 0x69, 0xf5, 0xfa, 0x14, 0x3e, 0x84, 0x0f, 0xe3, 0x78, 0x47, 0x47, 0x69, 0x5f, 0x44, 0x62, - 0x85, 0xfa, 0x0f, 0xb7, 0xe4, 0x84, 0x1c, 0xf8, 0x1d, 0xba, 0x78, 0xc4, 0xaa, 0x00, 0xe0, 0x52, - 0x22, 0xaf, 0x4b, 0xc8, 0x04, 0x36, 0xd6, 0x60, 0xd1, 0x5a, 0x10, 0xa5, 0x5a, 0xe9, 0x91, 0x4a, - 0x10, 0x15, 0x98, 0x6c, 0x02, 0x99, 0x36, 0xaa, 0xc3, 0x06, 0x55, 0xcd, 0xe5, 0xed, 0x4a, 0x09, - 0x90, 0xa9, 0x36, 0xca, 0xaa, 0xe0, 0xec, 0xbb, 0x2e, 0xfd, 0x47, 0x97, 0x4e, 0xe0, 0xf8, 0x99, - 0xd0, 0xf9, 0xe5, 0xa4, 0x5c, 0x38, 0x63, 0x30, 0xa7, 0xb3, 0x0e, 0x45, 0x48, 0x22, 0x12, 0xfb, - 0xb9, 0x3b, 0x3a, 0xa2, 0x51, 0x84, 0x5b, 0x23, 0xd1, 0x28, 0x82, 0x98, 0x1e, 0x34, 0x6a, 0x69, - 0xef, 0xb9, 0x81, 0x6b, 0x30, 0xee, 0x77, 0x38, 0x8b, 0x48, 0xbc, 0x9f, 0xff, 0xc4, 0xc1, 0x09, - 0x3d, 0x2c, 0xc1, 0x58, 0x5c, 0x62, 0xc9, 0x2d, 0xaa, 0xfa, 0x6a, 0xad, 0x21, 0xdc, 0x8e, 0x48, - 0xbc, 0x97, 0xff, 0x7e, 0x08, 0x8e, 0xa8, 0xdf, 0x71, 0xd9, 0x42, 0xe8, 0x47, 0x24, 0xde, 0xcd, - 0xc7, 0xcb, 0x39, 0xbc, 0xf4, 0x8c, 0x6c, 0x7a, 0x46, 0xde, 0x7a, 0x46, 0x9e, 0x06, 0xe6, 0x6d, - 0x06, 0xe6, 0xbd, 0x0e, 0xcc, 0xbb, 0xb9, 0xa8, 0xd0, 0xde, 0xb5, 0x85, 0xdb, 0x94, 0x8d, 0x09, - 0x92, 0xbf, 0x92, 0x26, 0xd3, 0xe6, 0xe4, 0x33, 0xea, 0xc3, 0xd7, 0xac, 0x76, 0xad, 0xa1, 0x29, - 0x76, 0x3e, 0x5a, 0x9e, 0xbe, 0x07, 0x00, 0x00, 0xff, 0xff, 0x91, 0xd3, 0x94, 0x27, 0x9c, 0x01, - 0x00, 0x00, + // 291 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x41, 0x4b, 0xf3, 0x30, + 0x18, 0x80, 0x97, 0x6f, 0xdf, 0x86, 0x06, 0x86, 0x33, 0x78, 0xe8, 0x29, 0x14, 0xf1, 0xd0, 0x83, + 0x5b, 0x0f, 0xe2, 0x1f, 0xf0, 0x2a, 0x03, 0x29, 0xe2, 0xc1, 0x8b, 0xa4, 0xcd, 0xbb, 0xee, 0x85, + 0xb4, 0x09, 0x69, 0x5a, 0x9d, 0xbf, 0xc2, 0x9f, 0x25, 0x9e, 0x76, 0xf4, 0x28, 0xed, 0x1f, 0x91, + 0xae, 0x4a, 0x9d, 0x8a, 0xb7, 0xe4, 0x09, 0x79, 0x5e, 0xde, 0x87, 0x2e, 0x1e, 0x31, 0x8d, 0x01, + 0x84, 0x52, 0x28, 0xf2, 0x04, 0x42, 0x89, 0x85, 0xb3, 0x18, 0x97, 0x0e, 0x64, 0xa2, 0x33, 0xd3, + 0x51, 0x05, 0x32, 0x05, 0x1b, 0xf6, 0x20, 0x34, 0x56, 0x57, 0x58, 0xa0, 0xce, 0x85, 0xba, 0xcb, + 0xb4, 0x04, 0x35, 0x37, 0x56, 0x3b, 0xcd, 0xce, 0x77, 0x75, 0xf3, 0x3f, 0x74, 0xf3, 0x1e, 0x1c, + 0xbf, 0x10, 0x3a, 0xbd, 0xea, 0x95, 0x8b, 0xd6, 0xc8, 0xa6, 0x74, 0x58, 0xa1, 0xf4, 0x88, 0x4f, + 0x82, 0x51, 0xd4, 0x1e, 0x5b, 0x62, 0x50, 0x7a, 0xff, 0x3a, 0x62, 0x50, 0xb2, 0x80, 0x1e, 0x14, + 0x7a, 0xe9, 0xee, 0x85, 0x85, 0x1b, 0xb0, 0xed, 0x6f, 0x6f, 0xe8, 0x93, 0x60, 0x12, 0x7d, 0xc7, + 0xec, 0x94, 0x1e, 0x26, 0x60, 0x1d, 0x2e, 0x31, 0x11, 0x0e, 0x75, 0x7e, 0xbd, 0x36, 0xe0, 0xfd, + 0xf7, 0x49, 0xb0, 0x1f, 0xfd, 0x7c, 0x60, 0x47, 0x74, 0x54, 0x09, 0x55, 0x82, 0x37, 0xf2, 0x49, + 0xb0, 0x17, 0x75, 0x17, 0x76, 0x42, 0x27, 0x45, 0xb2, 0x82, 0x4c, 0x7c, 0xce, 0x1a, 0x6f, 0x67, + 0xed, 0xc2, 0x0b, 0x78, 0xae, 0x39, 0xd9, 0xd4, 0x9c, 0xbc, 0xd5, 0x9c, 0x3c, 0x35, 0x7c, 0xb0, + 0x69, 0xf8, 0xe0, 0xb5, 0xe1, 0x83, 0xdb, 0xcb, 0x14, 0xdd, 0xaa, 0x8c, 0xdb, 0xcd, 0xc3, 0x2e, + 0xd4, 0xec, 0xb7, 0xf0, 0xb3, 0xbe, 0xcc, 0xec, 0x23, 0xfd, 0xc3, 0xd7, 0xf8, 0x6e, 0x6d, 0xa0, + 0x88, 0xc7, 0xdb, 0xe2, 0x67, 0xef, 0x01, 0x00, 0x00, 0xff, 0xff, 0x27, 0xe6, 0xa8, 0xfc, 0xc2, + 0x01, 0x00, 0x00, } func (m *ProvisionalModel) Marshal() (dAtA []byte, err error) { @@ -148,6 +157,11 @@ func (m *ProvisionalModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintProvisionalModel(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x30 + } if m.Value { i-- if m.Value { @@ -216,6 +230,9 @@ func (m *ProvisionalModel) Size() (n int) { if m.Value { n += 2 } + if m.SchemaVersion != 0 { + n += 1 + sovProvisionalModel(uint64(m.SchemaVersion)) + } return n } @@ -363,6 +380,25 @@ func (m *ProvisionalModel) Unmarshal(dAtA []byte) error { } } m.Value = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvisionalModel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipProvisionalModel(dAtA[iNdEx:]) diff --git a/x/compliance/types/revoked_model.pb.go b/x/compliance/types/revoked_model.pb.go index 91b82a80e..ac9794467 100644 --- a/x/compliance/types/revoked_model.pb.go +++ b/x/compliance/types/revoked_model.pb.go @@ -28,6 +28,7 @@ type RevokedModel struct { SoftwareVersion uint32 `protobuf:"varint,3,opt,name=softwareVersion,proto3" json:"softwareVersion,omitempty"` CertificationType string `protobuf:"bytes,4,opt,name=certificationType,proto3" json:"certificationType,omitempty"` Value bool `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"` + SchemaVersion uint32 `protobuf:"varint,6,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *RevokedModel) Reset() { *m = RevokedModel{} } @@ -98,6 +99,13 @@ func (m *RevokedModel) GetValue() bool { return false } +func (m *RevokedModel) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*RevokedModel)(nil), "zigbeealliance.distributedcomplianceledger.compliance.RevokedModel") } @@ -107,24 +115,26 @@ func init() { } var fileDescriptor_8ce0c072c0981ccd = []byte{ - // 272 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xbf, 0x4a, 0xc5, 0x30, - 0x14, 0x87, 0x1b, 0xaf, 0x15, 0x0d, 0x8a, 0x5a, 0x1c, 0x3a, 0x85, 0xe2, 0xd4, 0xc1, 0xb6, 0x83, - 0xf8, 0x02, 0x6e, 0x22, 0x2e, 0x45, 0x1c, 0x5c, 0x24, 0x6d, 0xce, 0xad, 0x07, 0x73, 0x9b, 0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, 0x7b, 0xdb, 0x16, 0xe3, 0x9e, 0xcc, 0xcd, 0x4f, 0xfe, - 0x4a, 0x99, 0x4c, 0x7b, 0x93, 0xcf, 0x98, 0x0f, 0x5f, 0x73, 0xda, 0xa5, 0x86, 0xa6, 0xd8, 0xf8, - 0xe8, 0x78, 0xfc, 0x1e, 0x00, 0x00, 0xff, 0xff, 0x06, 0xe1, 0x80, 0xfc, 0x94, 0x01, 0x00, 0x00, + // 289 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x31, 0x4b, 0xf4, 0x30, + 0x1c, 0x87, 0x2f, 0xef, 0xbd, 0x77, 0x68, 0xf0, 0x50, 0x83, 0x43, 0xa7, 0x50, 0xc4, 0xa1, 0x83, + 0x6d, 0x07, 0xf1, 0x0b, 0xb8, 0x89, 0xb8, 0x14, 0x71, 0x70, 0x91, 0xb4, 0xf9, 0x5f, 0xef, 0x8f, + 0x6d, 0x13, 0xd2, 0xb4, 0x7a, 0x7e, 0x0a, 0x3f, 0x95, 0x38, 0xde, 0xe8, 0x28, 0xed, 0x17, 0x91, + 0x5e, 0x95, 0x7a, 0x2a, 0x6e, 0xc9, 0x13, 0x78, 0x7e, 0xe4, 0xa1, 0xe7, 0x8f, 0x98, 0xc6, 0x00, + 0x22, 0xcb, 0x50, 0x14, 0x09, 0x84, 0x12, 0x4b, 0x6b, 0x30, 0xae, 0x2c, 0xc8, 0x44, 0xe5, 0xba, + 0xa7, 0x19, 0xc8, 0x14, 0x4c, 0x38, 0x80, 0xd0, 0x40, 0xad, 0xee, 0x40, 0xde, 0xe6, 0x4a, 0x42, + 0x16, 0x68, 0xa3, 0xac, 0x62, 0xa7, 0x9b, 0xaa, 0xe0, 0x0f, 0x55, 0x30, 0x80, 0xc3, 0x67, 0x42, + 0x77, 0xa2, 0x5e, 0x77, 0xd9, 0xd9, 0xd8, 0x1e, 0x1d, 0xd7, 0x28, 0x1d, 0xe2, 0x12, 0x6f, 0x12, + 0x75, 0xc7, 0x8e, 0x68, 0x94, 0xce, 0xbf, 0x9e, 0x68, 0x94, 0xcc, 0xa3, 0xbb, 0xa5, 0x9a, 0xdb, + 0x7b, 0x61, 0xe0, 0x1a, 0x4c, 0x89, 0xaa, 0x70, 0xc6, 0x2e, 0xf1, 0x66, 0xd1, 0x77, 0xcc, 0x8e, + 0xe9, 0x7e, 0x02, 0xc6, 0xe2, 0x1c, 0x13, 0x61, 0x51, 0x15, 0x57, 0x4b, 0x0d, 0xce, 0x7f, 0x97, + 0x78, 0xdb, 0xd1, 0xcf, 0x07, 0x76, 0x40, 0x27, 0xb5, 0xc8, 0x2a, 0x70, 0x26, 0x2e, 0xf1, 0xb6, + 0xa2, 0xfe, 0xc2, 0x8e, 0xe8, 0xac, 0x4c, 0x16, 0x90, 0x8b, 0xcf, 0xad, 0xe9, 0x7a, 0x6b, 0x13, + 0x9e, 0xc1, 0x4b, 0xc3, 0xc9, 0xaa, 0xe1, 0xe4, 0xad, 0xe1, 0xe4, 0xa9, 0xe5, 0xa3, 0x55, 0xcb, + 0x47, 0xaf, 0x2d, 0x1f, 0xdd, 0x5c, 0xa4, 0x68, 0x17, 0x55, 0xdc, 0xfd, 0x3a, 0xec, 0x23, 0xf9, + 0xbf, 0x05, 0xf7, 0x87, 0x2a, 0xfe, 0x47, 0xf2, 0x87, 0xaf, 0xd1, 0xed, 0x52, 0x43, 0x19, 0x4f, + 0xd7, 0xb5, 0x4f, 0xde, 0x03, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x6b, 0x6f, 0x7d, 0xba, 0x01, 0x00, + 0x00, } func (m *RevokedModel) Marshal() (dAtA []byte, err error) { @@ -147,6 +157,11 @@ func (m *RevokedModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintRevokedModel(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x30 + } if m.Value { i-- if m.Value { @@ -215,6 +230,9 @@ func (m *RevokedModel) Size() (n int) { if m.Value { n += 2 } + if m.SchemaVersion != 0 { + n += 1 + sovRevokedModel(uint64(m.SchemaVersion)) + } return n } @@ -362,6 +380,25 @@ func (m *RevokedModel) Unmarshal(dAtA []byte) error { } } m.Value = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRevokedModel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipRevokedModel(dAtA[iNdEx:]) diff --git a/x/dclauth/types/account.pb.go b/x/dclauth/types/account.pb.go index 1af0124b4..7f34663ef 100644 --- a/x/dclauth/types/account.pb.go +++ b/x/dclauth/types/account.pb.go @@ -30,11 +30,12 @@ type Account struct { // NOTE. we do not user AccountRoles casting here to preserve repeated form // so protobuf takes care about repeated items in generated code, // (but that might be not the final solution) - Roles []AccountRole `protobuf:"bytes,2,rep,name=roles,proto3,casttype=AccountRole" json:"roles,omitempty"` - Approvals []*Grant `protobuf:"bytes,3,rep,name=approvals,proto3" json:"approvals,omitempty"` - VendorID int32 `protobuf:"varint,4,opt,name=vendorID,proto3" json:"vendorID,omitempty"` - Rejects []*Grant `protobuf:"bytes,5,rep,name=rejects,proto3" json:"rejects,omitempty"` - ProductIDs []*types1.Uint16Range `protobuf:"bytes,6,rep,name=productIDs,proto3" json:"productIDs,omitempty"` + Roles []AccountRole `protobuf:"bytes,2,rep,name=roles,proto3,casttype=AccountRole" json:"roles,omitempty"` + Approvals []*Grant `protobuf:"bytes,3,rep,name=approvals,proto3" json:"approvals,omitempty"` + VendorID int32 `protobuf:"varint,4,opt,name=vendorID,proto3" json:"vendorID,omitempty"` + Rejects []*Grant `protobuf:"bytes,5,rep,name=rejects,proto3" json:"rejects,omitempty"` + ProductIDs []*types1.Uint16Range `protobuf:"bytes,6,rep,name=productIDs,proto3" json:"productIDs,omitempty"` + SchemaVersion uint32 `protobuf:"varint,7,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *Account) Reset() { *m = Account{} } @@ -78,34 +79,35 @@ func init() { } var fileDescriptor_b313ddcde3a636dd = []byte{ - // 420 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0x4f, 0xeb, 0xd3, 0x30, - 0x1c, 0xc6, 0x5b, 0xfb, 0xdb, 0xef, 0x4f, 0x2a, 0x08, 0xc5, 0x43, 0xd9, 0xa1, 0x2d, 0x82, 0xd0, - 0xcb, 0x52, 0x36, 0x41, 0xd0, 0xc3, 0xd0, 0x32, 0xd0, 0x5d, 0x2b, 0x22, 0x78, 0x70, 0x24, 0xe9, - 0x97, 0xae, 0xd2, 0x36, 0x25, 0x49, 0x87, 0xfa, 0x0a, 0x3c, 0x7a, 0xf4, 0xb8, 0x77, 0xe0, 0xdb, - 0xf0, 0xb8, 0xa3, 0xa7, 0x21, 0xdb, 0xbb, 0xf0, 0x24, 0x6d, 0xb3, 0x4d, 0x41, 0x84, 0xe9, 0x2d, - 0xc9, 0x97, 0x7c, 0x9e, 0x3c, 0x79, 0x1e, 0xf4, 0xe4, 0x43, 0x9e, 0x51, 0x00, 0x52, 0x14, 0x39, - 0xa9, 0x18, 0x44, 0x69, 0x2e, 0x95, 0xc8, 0x69, 0xa3, 0x20, 0x65, 0xbc, 0xac, 0xfb, 0xd3, 0x02, - 0xd2, 0x0c, 0x44, 0x94, 0xb2, 0x82, 0x34, 0x6a, 0x19, 0x11, 0xc6, 0x78, 0x53, 0x29, 0x5c, 0x0b, - 0xae, 0xb8, 0x33, 0xf9, 0x9d, 0x80, 0xff, 0x42, 0xc0, 0x9a, 0x30, 0xb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 0xd4, 0x7c, 0x26, 0xdd, 0xcb, 0x8e, 0x3b, 0x3d, 0x87, 0xdb, 0x47, 0x8c, 0x5f, 0x76, - 0x11, 0x27, 0x6d, 0xc2, 0xc9, 0x2f, 0xc4, 0xc7, 0xd7, 0x1f, 0xd7, 0xbe, 0xf1, 0x79, 0xed, 0x1b, - 0x31, 0xfd, 0xba, 0xf3, 0xcc, 0xcd, 0xce, 0x33, 0xbf, 0xef, 0x3c, 0xf3, 0xd3, 0xde, 0x33, 0x36, - 0x7b, 0xcf, 0xf8, 0xb6, 0xf7, 0x8c, 0xd7, 0xcf, 0xb3, 0x5c, 0x2d, 0x1b, 0xda, 0xa2, 0xa2, 0x5e, - 0x79, 0xf4, 0xa7, 0x5e, 0x8c, 0x4e, 0xda, 0x23, 0xdd, 0x8c, 0x77, 0xc7, 0x6e, 0xa8, 0xf7, 0x35, - 0x48, 0x7a, 0xd9, 0x95, 0xe3, 0xc1, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xce, 0x0c, 0xab, 0xc9, - 0x50, 0x03, 0x00, 0x00, + // 443 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0x41, 0x8b, 0xd3, 0x40, + 0x14, 0xc7, 0x13, 0xbb, 0xdd, 0xee, 0x4e, 0x5d, 0x84, 0xe0, 0x21, 0xf4, 0x90, 0x06, 0x51, 0xc8, + 0xa5, 0x13, 0x5a, 0x41, 0xd0, 0xc3, 0xa2, 0xa5, 0xa0, 0xbd, 0x8e, 0xa8, 0xe0, 0xc1, 0x65, 0x66, + 0xf2, 0x48, 0x23, 0x49, 0x5e, 0x98, 0x99, 0x14, 0xf5, 0x13, 0x78, 0xf4, 0xe8, 0x71, 0x3f, 0x8e, + 0xc7, 0x5e, 0x04, 0x4f, 0x8b, 0xb4, 0xdf, 0xc2, 0x93, 0x34, 0x99, 0xdd, 0xba, 0x20, 0x42, 0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x00, } func (m *Account) Marshal() (dAtA []byte, err error) { @@ -128,6 +130,11 @@ func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintAccount(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x38 + } if len(m.ProductIDs) > 0 { for iNdEx := len(m.ProductIDs) - 1; iNdEx >= 0; iNdEx-- { { @@ -247,6 +254,9 @@ func (m *Account) Size() (n int) { n += 1 + l + sovAccount(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovAccount(uint64(m.SchemaVersion)) + } return n } @@ -474,6 +484,25 @@ func (m *Account) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAccount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipAccount(dAtA[iNdEx:]) diff --git a/x/dclauth/types/account_stat.pb.go b/x/dclauth/types/account_stat.pb.go index 2d0f2506d..9e8392e36 100644 --- a/x/dclauth/types/account_stat.pb.go +++ b/x/dclauth/types/account_stat.pb.go @@ -23,7 +23,8 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type AccountStat struct { - Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` + Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` + SchemaVersion uint32 `protobuf:"varint,2,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *AccountStat) Reset() { *m = AccountStat{} } @@ -66,6 +67,13 @@ func (m *AccountStat) GetNumber() uint64 { return 0 } +func (m *AccountStat) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*AccountStat)(nil), "zigbeealliance.distributedcomplianceledger.dclauth.AccountStat") } @@ -75,20 +83,21 @@ func init() { } var fileDescriptor_3193f134e215a09e = []byte{ - // 198 bytes of a gzipped FileDescriptorProto + // 224 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0xad, 0xca, 0x4c, 0x4f, 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0xa7, 0x24, 0xe7, 0x24, 0x96, 0x96, 0x64, 0xe8, 0x27, 0x26, 0x27, 0xe7, 0x97, 0xe6, 0x95, 0xc4, 0x17, 0x97, 0x24, 0x96, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x19, 0xa1, - 0x1a, 0xa3, 0x87, 0xc7, 0x18, 0x3d, 0xa8, 0x31, 0x4a, 0xaa, 0x5c, 0xdc, 0x8e, 0x10, 0x93, 0x82, + 0x1a, 0xa3, 0x87, 0xc7, 0x18, 0x3d, 0xa8, 0x31, 0x4a, 0xde, 0x5c, 0xdc, 0x8e, 0x10, 0x93, 0x82, 0x4b, 0x12, 0x4b, 0x84, 0xc4, 0xb8, 0xd8, 0xf2, 0x4a, 0x73, 0x93, 0x52, 0x8b, 0x24, 0x18, 0x15, - 0x18, 0x35, 0x58, 0x82, 0xa0, 0x3c, 0xa7, 0xa4, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, - 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, - 0x63, 0x88, 0xf2, 0x48, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x87, 0xd8, - 0xaf, 0x8b, 0xcd, 0x1f, 0xba, 0x08, 0x17, 0xe8, 0x42, 0x7d, 0x52, 0x01, 0xf7, 0x4b, 0x49, 0x65, - 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0x17, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xef, 0xc4, - 0xb0, 0x14, 0x0e, 0x01, 0x00, 0x00, + 0x18, 0x35, 0x58, 0x82, 0xa0, 0x3c, 0x21, 0x15, 0x2e, 0xde, 0xe2, 0xe4, 0x8c, 0xd4, 0xdc, 0xc4, + 0xb0, 0xd4, 0xa2, 0xe2, 0xcc, 0xfc, 0x3c, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xde, 0x20, 0x54, 0x41, + 0xa7, 0xa4, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, + 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xf2, 0x48, 0xcf, 0x2c, + 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x87, 0xb8, 0x52, 0x17, 0x9b, 0x6f, 0x75, 0x11, + 0xee, 0xd4, 0x85, 0xfa, 0xb7, 0x02, 0xee, 0xe3, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, + 0x5f, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x94, 0x74, 0x71, 0x60, 0x34, 0x01, 0x00, 0x00, } func (m *AccountStat) Marshal() (dAtA []byte, err error) { @@ -111,6 +120,11 @@ func (m *AccountStat) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintAccountStat(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x10 + } if m.Number != 0 { i = encodeVarintAccountStat(dAtA, i, uint64(m.Number)) i-- @@ -139,6 +153,9 @@ func (m *AccountStat) Size() (n int) { if m.Number != 0 { n += 1 + sovAccountStat(uint64(m.Number)) } + if m.SchemaVersion != 0 { + n += 1 + sovAccountStat(uint64(m.SchemaVersion)) + } return n } @@ -196,6 +213,25 @@ func (m *AccountStat) Unmarshal(dAtA []byte) error { break } } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAccountStat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipAccountStat(dAtA[iNdEx:]) diff --git a/x/dclauth/types/grant.pb.go b/x/dclauth/types/grant.pb.go index 20e513f18..b2066a082 100644 --- a/x/dclauth/types/grant.pb.go +++ b/x/dclauth/types/grant.pb.go @@ -24,9 +24,10 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Grant struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Time int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` - Info string `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Time int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` + Info string `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` + SchemaVersion uint32 `protobuf:"varint,4,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *Grant) Reset() { *m = Grant{} } @@ -83,6 +84,13 @@ func (m *Grant) GetInfo() string { return "" } +func (m *Grant) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*Grant)(nil), "zigbeealliance.distributedcomplianceledger.dclauth.Grant") } @@ -92,23 +100,25 @@ func init() { } var fileDescriptor_86ef6cca43825bdb = []byte{ - // 251 bytes of a gzipped FileDescriptorProto + // 278 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0xab, 0xca, 0x4c, 0x4f, 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0xa7, 0x24, 0xe7, 0x24, 0x96, 0x96, 0x64, 0xe8, 0xa7, 0x17, 0x25, 0xe6, 0x95, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x19, 0xa1, 0xea, 0xd7, 0xc3, 0xa3, 0x5f, 0x0f, 0xaa, 0x5f, 0x4a, 0x32, 0x39, 0xbf, 0x38, 0x37, 0xbf, 0x38, 0x1e, 0x6c, 0x82, 0x3e, 0x84, 0x03, 0x31, - 0x4e, 0x29, 0x99, 0x8b, 0xd5, 0x1d, 0x64, 0xba, 0x90, 0x11, 0x17, 0x7b, 0x62, 0x4a, 0x4a, 0x51, - 0x6a, 0x71, 0xb1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xa7, 0x93, 0xc4, 0xa5, 0x2d, 0xba, 0x22, 0x50, - 0xb5, 0x8e, 0x10, 0x99, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0xf4, 0x20, 0x98, 0x42, 0x21, 0x21, 0x2e, - 0x96, 0x92, 0xcc, 0xdc, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xe6, 0x20, 0x30, 0x1b, 0x24, 0x96, - 0x99, 0x97, 0x96, 0x2f, 0xc1, 0x0c, 0x32, 0x24, 0x08, 0xcc, 0x76, 0x4a, 0x3a, 0xf1, 0x48, 0x8e, - 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, - 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x8f, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, - 0xfc, 0x5c, 0x7d, 0x88, 0xc7, 0x74, 0xb1, 0x85, 0x8c, 0x2e, 0xc2, 0x6b, 0xba, 0xd0, 0xb0, 0xa9, - 0x80, 0x87, 0x4e, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0x3f, 0xc6, 0x80, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x0f, 0xb6, 0x99, 0x19, 0x60, 0x01, 0x00, 0x00, + 0x4e, 0xa9, 0x93, 0x91, 0x8b, 0xd5, 0x1d, 0x64, 0xbc, 0x90, 0x11, 0x17, 0x7b, 0x62, 0x4a, 0x4a, + 0x51, 0x6a, 0x71, 0xb1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xa7, 0x93, 0xc4, 0xa5, 0x2d, 0xba, 0x22, + 0x50, 0xc5, 0x8e, 0x10, 0x99, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0xf4, 0x20, 0x98, 0x42, 0x21, 0x21, + 0x2e, 0x96, 0x92, 0xcc, 0xdc, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xe6, 0x20, 0x30, 0x1b, 0x24, + 0x96, 0x99, 0x97, 0x96, 0x2f, 0xc1, 0x0c, 0x32, 0x24, 0x08, 0xcc, 0x16, 0x52, 0xe1, 0xe2, 0x2d, + 0x4e, 0xce, 0x48, 0xcd, 0x4d, 0x0c, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0x93, 0x60, 0x51, 0x60, + 0xd4, 0xe0, 0x0d, 0x42, 0x15, 0x74, 0x4a, 0x3a, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, + 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, + 0x86, 0x28, 0x8f, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0x88, 0xff, + 0x75, 0xb1, 0x05, 0xa0, 0x2e, 0x22, 0x04, 0x74, 0xa1, 0x41, 0x58, 0x01, 0x0f, 0xc4, 0x92, 0xca, + 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xb7, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x69, 0xd8, + 0x78, 0xa0, 0x87, 0x01, 0x00, 0x00, } func (m *Grant) Marshal() (dAtA []byte, err error) { @@ -131,6 +141,11 @@ func (m *Grant) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintGrant(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x20 + } if len(m.Info) > 0 { i -= len(m.Info) copy(dAtA[i:], m.Info) @@ -181,6 +196,9 @@ func (m *Grant) Size() (n int) { if l > 0 { n += 1 + l + sovGrant(uint64(l)) } + if m.SchemaVersion != 0 { + n += 1 + sovGrant(uint64(m.SchemaVersion)) + } return n } @@ -302,6 +320,25 @@ func (m *Grant) Unmarshal(dAtA []byte) error { } m.Info = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGrant(dAtA[iNdEx:]) diff --git a/x/dclauth/types/pending_account.pb.go b/x/dclauth/types/pending_account.pb.go index fb5cfb34e..210638afb 100644 --- a/x/dclauth/types/pending_account.pb.go +++ b/x/dclauth/types/pending_account.pb.go @@ -24,7 +24,8 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type PendingAccount struct { - *Account `protobuf:"bytes,1,opt,name=account,proto3,embedded=account" json:"account,omitempty"` + *Account `protobuf:"bytes,1,opt,name=account,proto3,embedded=account" json:"account,omitempty"` + PendingAccountSchemaVersion uint32 `protobuf:"varint,2,opt,name=pendingAccountSchemaVersion,proto3" json:"pendingAccountSchemaVersion,omitempty"` } func (m *PendingAccount) Reset() { *m = PendingAccount{} } @@ -60,6 +61,13 @@ func (m *PendingAccount) XXX_DiscardUnknown() { var xxx_messageInfo_PendingAccount proto.InternalMessageInfo +func (m *PendingAccount) GetPendingAccountSchemaVersion() uint32 { + if m != nil { + return m.PendingAccountSchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*PendingAccount)(nil), "zigbeealliance.distributedcomplianceledger.dclauth.PendingAccount") } @@ -69,7 +77,7 @@ func init() { } var fileDescriptor_0beda4bc7537ece0 = []byte{ - // 231 bytes of a gzipped FileDescriptorProto + // 262 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0xa8, 0xca, 0x4c, 0x4f, 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, @@ -77,14 +85,16 @@ var fileDescriptor_0beda4bc7537ece0 = []byte{ 0xe6, 0xa5, 0xc7, 0x27, 0x26, 0x27, 0xe7, 0x97, 0xe6, 0x95, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x19, 0xa1, 0x9a, 0xa4, 0x87, 0xc7, 0x24, 0x3d, 0xa8, 0x49, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xed, 0xfa, 0x20, 0x16, 0xc4, 0x24, 0x29, 0x07, 0x32, 0xdc, 0x84, 0xe2, 0x16, 0xa5, - 0x5c, 0x2e, 0xbe, 0x00, 0x88, 0x23, 0x1d, 0x21, 0xe2, 0x42, 0xd1, 0x5c, 0xec, 0x50, 0x25, 0x12, - 0x8c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0xd6, 0x7a, 0xa4, 0xbb, 0x57, 0x0f, 0x6a, 0x9a, 0x13, 0xcb, - 0x85, 0x7b, 0xf2, 0x8c, 0x41, 0x30, 0x13, 0x9d, 0x92, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, - 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, - 0x58, 0x8e, 0x21, 0xca, 0x23, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, - 0x62, 0x9f, 0x2e, 0x36, 0x6f, 0xe9, 0x22, 0x6c, 0xd4, 0x85, 0x7a, 0xac, 0x02, 0xee, 0xb5, 0x92, - 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xcf, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x25, - 0xd3, 0x88, 0xfd, 0xb1, 0x01, 0x00, 0x00, + 0xf5, 0x8c, 0x5c, 0x7c, 0x01, 0x10, 0x57, 0x3a, 0x42, 0x24, 0x84, 0xa2, 0xb9, 0xd8, 0xa1, 0x6a, + 0x24, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0xac, 0xf5, 0x48, 0x77, 0xb0, 0x1e, 0xd4, 0x34, 0x27, + 0x96, 0x0b, 0xf7, 0xe4, 0x19, 0x83, 0x60, 0x26, 0x0a, 0x39, 0x70, 0x49, 0x17, 0xa0, 0x58, 0x17, + 0x9c, 0x9c, 0x91, 0x9a, 0x9b, 0x18, 0x96, 0x5a, 0x54, 0x9c, 0x99, 0x9f, 0x27, 0xc1, 0xa4, 0xc0, + 0xa8, 0xc1, 0x1b, 0x84, 0x4f, 0x89, 0x53, 0xd2, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, + 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, + 0x31, 0x44, 0x79, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x43, 0x5c, + 0xac, 0x8b, 0x2d, 0x64, 0x74, 0x11, 0x6e, 0xd6, 0x85, 0x86, 0x4d, 0x05, 0x3c, 0x74, 0x4a, 0x2a, + 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x81, 0x63, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x35, 0x01, + 0x1f, 0xf7, 0xf4, 0x01, 0x00, 0x00, } func (m *PendingAccount) Marshal() (dAtA []byte, err error) { @@ -107,6 +117,11 @@ func (m *PendingAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.PendingAccountSchemaVersion != 0 { + i = encodeVarintPendingAccount(dAtA, i, uint64(m.PendingAccountSchemaVersion)) + i-- + dAtA[i] = 0x10 + } if m.Account != nil { { size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) @@ -143,6 +158,9 @@ func (m *PendingAccount) Size() (n int) { l = m.Account.Size() n += 1 + l + sovPendingAccount(uint64(l)) } + if m.PendingAccountSchemaVersion != 0 { + n += 1 + sovPendingAccount(uint64(m.PendingAccountSchemaVersion)) + } return n } @@ -217,6 +235,25 @@ func (m *PendingAccount) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingAccountSchemaVersion", wireType) + } + m.PendingAccountSchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPendingAccount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PendingAccountSchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipPendingAccount(dAtA[iNdEx:]) diff --git a/x/dclauth/types/pending_account_revocation.pb.go b/x/dclauth/types/pending_account_revocation.pb.go index 97216b7e9..95acc9e7e 100644 --- a/x/dclauth/types/pending_account_revocation.pb.go +++ b/x/dclauth/types/pending_account_revocation.pb.go @@ -25,8 +25,9 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type PendingAccountRevocation struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Approvals []*Grant `protobuf:"bytes,2,rep,name=approvals,proto3" json:"approvals,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Approvals []*Grant `protobuf:"bytes,2,rep,name=approvals,proto3" json:"approvals,omitempty"` + SchemaVersion uint32 `protobuf:"varint,3,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *PendingAccountRevocation) Reset() { *m = PendingAccountRevocation{} } @@ -75,6 +76,13 @@ func (m *PendingAccountRevocation) GetApprovals() []*Grant { return nil } +func (m *PendingAccountRevocation) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*PendingAccountRevocation)(nil), "zigbeealliance.distributedcomplianceledger.dclauth.PendingAccountRevocation") } @@ -84,27 +92,28 @@ func init() { } var fileDescriptor_4187fdc153f14fe6 = []byte{ - // 311 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x0a, 0xae, 0xca, 0x4c, 0x4f, - 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, - 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, - 0xa7, 0x16, 0xe9, 0xa7, 0x24, 0xe7, 0x24, 0x96, 0x96, 0x64, 0xe8, 0x17, 0xa4, 0xe6, 0xa5, 0x64, - 0xe6, 0xa5, 0xc7, 0x27, 0x26, 0x27, 0xe7, 0x97, 0xe6, 0x95, 0xc4, 0x17, 0xa5, 0x96, 0xe5, 0x27, - 0x27, 0x96, 0x64, 0xe6, 0xe7, 0xe9, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x19, 0xa1, 0x1a, 0xaa, - 0x87, 0xc7, 0x50, 0x3d, 0xa8, 0xa1, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xed, 0xfa, 0x20, - 0x16, 0xc4, 0x24, 0x29, 0xc9, 0xe4, 0xfc, 0xe2, 0xdc, 0xfc, 0xe2, 0x78, 0x88, 0x04, 0x84, 0x03, - 0x95, 0xb2, 0x23, 0xc3, 0xe5, 0xe9, 0x45, 0x89, 0x79, 0x25, 0x10, 0xfd, 0x4a, 0x6b, 0x19, 0xb9, - 0x24, 0x02, 0x20, 0x3e, 0x71, 0x84, 0x78, 0x24, 0x08, 0xee, 0x0f, 0x21, 0x23, 0x2e, 0xf6, 0xc4, - 0x94, 0x94, 0xa2, 0xd4, 0xe2, 0x62, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x4e, 0x27, 0x89, 0x4b, 0x5b, - 0x74, 0x45, 0xa0, 0xf6, 0x3b, 0x42, 0x64, 0x82, 0x4b, 0x8a, 0x32, 0xf3, 0xd2, 0x83, 0x60, 0x0a, - 0x85, 0xc2, 0xb9, 0x38, 0x13, 0x0b, 0x0a, 0x8a, 0xf2, 0xcb, 0x12, 0x73, 0x8a, 0x25, 0x98, 0x14, - 0x98, 0x35, 0xb8, 0x8d, 0x2c, 0xf5, 0x48, 0x0f, 0x09, 0x3d, 0x77, 0x90, 0x23, 0x83, 0x10, 0x66, - 0x59, 0xb1, 0xcc, 0x58, 0x20, 0xcf, 0xe0, 0x94, 0x74, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, - 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, - 0x72, 0x0c, 0x51, 0x1e, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x10, - 0xfb, 0x74, 0xb1, 0x85, 0x8a, 0x2e, 0xc2, 0x46, 0x5d, 0x68, 0xb8, 0x54, 0xc0, 0x43, 0xa6, 0xa4, - 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0x34, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x22, - 0x02, 0xac, 0x8a, 0x16, 0x02, 0x00, 0x00, + // 333 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0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 0x63, 0x42, 0xd4, 0x45, 0xbd, 0xe6, 0x30, 0x7c, 0x7d, 0x8e, 0xdb, 0xf5, 0xff, 0x03, 0xa7, + 0x8c, 0xac, 0x16, 0x92, 0x67, 0x5f, 0x0f, 0x83, 0x6b, 0xbf, 0x89, 0x95, 0xd2, 0x30, 0xc5, 0x85, + 0x09, 0xff, 0x75, 0x1b, 0xbd, 0xbd, 0xfe, 0x49, 0xf2, 0x7b, 0x12, 0xc9, 0xf9, 0x32, 0x64, 0xb6, + 0xf1, 0x0a, 0x8e, 0xfc, 0x96, 0x21, 0x13, 0x56, 0xe2, 0x2b, 0xa6, 0x8d, 0x00, 0x19, 0x36, 0xba, + 0xa8, 0xd7, 0xca, 0xb6, 0x87, 0xa7, 0xff, 0x1f, 0x9f, 0x0e, 0xbc, 0x61, 0xfe, 0x32, 0x8f, 0xd0, + 0x6c, 0x1e, 0xa1, 0x8f, 0x79, 0x84, 0x1e, 0x16, 0x91, 0x37, 0x5b, 0x44, 0xde, 0xfb, 0x22, 0xf2, + 0x6e, 0x2e, 0xb8, 0xb0, 0x93, 0x2a, 0x4f, 0x08, 0x94, 0xa9, 0x4b, 0x15, 0x7f, 0xc7, 0x2e, 0xde, + 0xe4, 0x8a, 0x6b, 0x7a, 0xb7, 0x6b, 0x7e, 0xf6, 0x4e, 0x31, 0x93, 0xef, 0xac, 0x00, 0x1e, 0x7f, + 0x06, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xb5, 0x2e, 0xb9, 0x3c, 0x02, 0x00, 0x00, } func (m *PendingAccountRevocation) Marshal() (dAtA []byte, err error) { @@ -127,6 +136,11 @@ func (m *PendingAccountRevocation) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintPendingAccountRevocation(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x18 + } if len(m.Approvals) > 0 { for iNdEx := len(m.Approvals) - 1; iNdEx >= 0; iNdEx-- { { @@ -178,6 +192,9 @@ func (m *PendingAccountRevocation) Size() (n int) { n += 1 + l + sovPendingAccountRevocation(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovPendingAccountRevocation(uint64(m.SchemaVersion)) + } return n } @@ -282,6 +299,25 @@ func (m *PendingAccountRevocation) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPendingAccountRevocation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipPendingAccountRevocation(dAtA[iNdEx:]) diff --git a/x/dclauth/types/rejected_account.pb.go b/x/dclauth/types/rejected_account.pb.go index 6de4a8b57..0fe3cbd0c 100644 --- a/x/dclauth/types/rejected_account.pb.go +++ b/x/dclauth/types/rejected_account.pb.go @@ -24,7 +24,8 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type RejectedAccount struct { - *Account `protobuf:"bytes,1,opt,name=account,proto3,embedded=account" json:"account,omitempty"` + *Account `protobuf:"bytes,1,opt,name=account,proto3,embedded=account" json:"account,omitempty"` + RejectedAccountSchemaVersion uint32 `protobuf:"varint,2,opt,name=rejectedAccountSchemaVersion,proto3" json:"rejectedAccountSchemaVersion,omitempty"` } func (m *RejectedAccount) Reset() { *m = RejectedAccount{} } @@ -60,6 +61,13 @@ func (m *RejectedAccount) XXX_DiscardUnknown() { var xxx_messageInfo_RejectedAccount proto.InternalMessageInfo +func (m *RejectedAccount) GetRejectedAccountSchemaVersion() uint32 { + if m != nil { + return m.RejectedAccountSchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*RejectedAccount)(nil), "zigbeealliance.distributedcomplianceledger.dclauth.RejectedAccount") } @@ -69,7 +77,7 @@ func init() { } var fileDescriptor_013608431c2fa3ea = []byte{ - // 232 bytes of a gzipped FileDescriptorProto + // 263 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0xac, 0xca, 0x4c, 0x4f, 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, @@ -77,14 +85,16 @@ var fileDescriptor_013608431c2fa3ea = []byte{ 0x97, 0xa4, 0xa6, 0xc4, 0x27, 0x26, 0x27, 0xe7, 0x97, 0xe6, 0x95, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x19, 0xa1, 0x1a, 0xa5, 0x87, 0xc7, 0x28, 0x3d, 0xa8, 0x51, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xed, 0xfa, 0x20, 0x16, 0xc4, 0x24, 0x29, 0x07, 0x32, 0x1c, 0x85, 0xe2, 0x16, - 0xa5, 0x3c, 0x2e, 0xfe, 0x20, 0xa8, 0x2b, 0x1d, 0x21, 0x12, 0x42, 0xd1, 0x5c, 0xec, 0x50, 0x35, - 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0xd6, 0x7a, 0xa4, 0x3b, 0x58, 0x0f, 0x6a, 0x9a, 0x13, - 0xcb, 0x85, 0x7b, 0xf2, 0x8c, 0x41, 0x30, 0x13, 0x9d, 0x92, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, - 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, - 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x23, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, - 0x1f, 0x62, 0x9f, 0x2e, 0x36, 0x7f, 0xe9, 0x22, 0x6c, 0xd4, 0x85, 0xfa, 0xac, 0x02, 0xee, 0xb7, - 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xd7, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x8a, 0x18, 0x2a, 0x46, 0xb3, 0x01, 0x00, 0x00, + 0xa5, 0x4d, 0x8c, 0x5c, 0xfc, 0x41, 0x50, 0x67, 0x3a, 0x42, 0x64, 0x84, 0xa2, 0xb9, 0xd8, 0xa1, + 0x8a, 0x24, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0xac, 0xf5, 0x48, 0x77, 0xb1, 0x1e, 0xd4, 0x34, + 0x27, 0x96, 0x0b, 0xf7, 0xe4, 0x19, 0x83, 0x60, 0x26, 0x0a, 0x39, 0x71, 0xc9, 0x14, 0xa1, 0xda, + 0x17, 0x9c, 0x9c, 0x91, 0x9a, 0x9b, 0x18, 0x96, 0x5a, 0x54, 0x9c, 0x99, 0x9f, 0x27, 0xc1, 0xa4, + 0xc0, 0xa8, 0xc1, 0x1b, 0x84, 0x57, 0x8d, 0x53, 0xd2, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, + 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, + 0xcb, 0x31, 0x44, 0x79, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x43, + 0xdc, 0xac, 0x8b, 0x2d, 0x70, 0x74, 0x11, 0xae, 0xd6, 0x85, 0x06, 0x4f, 0x05, 0x3c, 0x80, 0x4a, + 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xe1, 0x63, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x48, + 0x46, 0x57, 0xe6, 0xf8, 0x01, 0x00, 0x00, } func (m *RejectedAccount) Marshal() (dAtA []byte, err error) { @@ -107,6 +117,11 @@ func (m *RejectedAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.RejectedAccountSchemaVersion != 0 { + i = encodeVarintRejectedAccount(dAtA, i, uint64(m.RejectedAccountSchemaVersion)) + i-- + dAtA[i] = 0x10 + } if m.Account != nil { { size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) @@ -143,6 +158,9 @@ func (m *RejectedAccount) Size() (n int) { l = m.Account.Size() n += 1 + l + sovRejectedAccount(uint64(l)) } + if m.RejectedAccountSchemaVersion != 0 { + n += 1 + sovRejectedAccount(uint64(m.RejectedAccountSchemaVersion)) + } return n } @@ -217,6 +235,25 @@ func (m *RejectedAccount) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RejectedAccountSchemaVersion", wireType) + } + m.RejectedAccountSchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRejectedAccount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RejectedAccountSchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipRejectedAccount(dAtA[iNdEx:]) diff --git a/x/dclauth/types/revoked_account.pb.go b/x/dclauth/types/revoked_account.pb.go index 23f14536c..be6e76734 100644 --- a/x/dclauth/types/revoked_account.pb.go +++ b/x/dclauth/types/revoked_account.pb.go @@ -49,9 +49,10 @@ func (RevokedAccount_Reason) EnumDescriptor() ([]byte, []int) { } type RevokedAccount struct { - *Account `protobuf:"bytes,1,opt,name=account,proto3,embedded=account" json:"account,omitempty"` - RevokeApprovals []*Grant `protobuf:"bytes,2,rep,name=revokeApprovals,proto3" json:"revokeApprovals,omitempty"` - Reason RevokedAccount_Reason `protobuf:"varint,3,opt,name=reason,proto3,enum=zigbeealliance.distributedcomplianceledger.dclauth.RevokedAccount_Reason" json:"reason,omitempty"` + *Account `protobuf:"bytes,1,opt,name=account,proto3,embedded=account" json:"account,omitempty"` + RevokeApprovals []*Grant `protobuf:"bytes,2,rep,name=revokeApprovals,proto3" json:"revokeApprovals,omitempty"` + Reason RevokedAccount_Reason `protobuf:"varint,3,opt,name=reason,proto3,enum=zigbeealliance.distributedcomplianceledger.dclauth.RevokedAccount_Reason" json:"reason,omitempty"` + RevokedAccountSchemaVersion uint32 `protobuf:"varint,4,opt,name=revokedAccountSchemaVersion,proto3" json:"revokedAccountSchemaVersion,omitempty"` } func (m *RevokedAccount) Reset() { *m = RevokedAccount{} } @@ -101,6 +102,13 @@ func (m *RevokedAccount) GetReason() RevokedAccount_Reason { return RevokedAccount_TrusteeVoting } +func (m *RevokedAccount) GetRevokedAccountSchemaVersion() uint32 { + if m != nil { + return m.RevokedAccountSchemaVersion + } + return 0 +} + func init() { proto.RegisterEnum("zigbeealliance.distributedcomplianceledger.dclauth.RevokedAccount_Reason", RevokedAccount_Reason_name, RevokedAccount_Reason_value) proto.RegisterType((*RevokedAccount)(nil), "zigbeealliance.distributedcomplianceledger.dclauth.RevokedAccount") @@ -111,29 +119,31 @@ func init() { } var fileDescriptor_0da4e0e6766e981b = []byte{ - // 345 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0xd1, 0xb1, 0x4a, 0x03, 0x31, - 0x18, 0x07, 0xf0, 0x4b, 0x2b, 0x15, 0x52, 0xac, 0x35, 0x88, 0x94, 0x0e, 0x67, 0xe9, 0xd4, 0xa5, - 0x39, 0xb8, 0x4e, 0x22, 0x88, 0xed, 0x62, 0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0x69, 0x46, - 0x52, 0x15, 0xb7, 0xaa, 0x1d, 0xd0, 0x6b, 0xf8, 0x97, 0x65, 0xec, 0xe2, 0x56, 0x70, 0xb0, 0x01, - 0x83, 0x1c, 0xee, 0x0e, 0x60, 0xcd, 0xde, 0xa0, 0x03, 0xb8, 0x77, 0xad, 0xb3, 0xd4, 0x30, 0x36, - 0x51, 0x46, 0xc4, 0xbc, 0xe9, 0xa0, 0x23, 0x88, 0xae, 0x88, 0x14, 0x54, 0xa8, 0x2c, 0x9d, 0x10, - 0x29, 0x22, 0x62, 0x94, 0x6e, 0x82, 0x51, 0xf8, 0xb2, 0x74, 0xc1, 0x62, 0xe9, 0x82, 0xf7, 0xa5, - 0x0b, 0x9e, 0x57, 0xae, 0xb3, 0x58, 0xb9, 0xce, 0xeb, 0xca, 0x75, 0x6e, 0xc6, 0x5c, 0x98, 0x69, - 0x16, 0x62, 0xaa, 0x66, 0x9e, 0xcd, 0xda, 0xff, 0xad, 0xd2, 0xfe, 0x77, 0xda, 0x7e, 0x5e, 0xea, - 0xc3, 0x57, 0xad, 0xe6, 0x31, 0x61, 0x69, 0x58, 0xdb, 0xf4, 0x3a, 0xf8, 0x0c, 0x00, 0x00, 0xff, - 0xff, 0x98, 0x8f, 0x5d, 0xaf, 0xef, 0x02, 0x00, 0x00, + // 374 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0xd2, 0xc1, 0x4a, 0xe3, 0x40, + 0x18, 0x07, 0xf0, 0xcc, 0xb6, 0x74, 0x61, 0x4a, 0xbb, 0xdd, 0x61, 0x59, 0x42, 0x85, 0x18, 0x7a, + 0xca, 0xa5, 0x09, 0xa4, 0x27, 0x11, 0xa4, 0xed, 0xc5, 0x7a, 0xf0, 0x12, 0xa5, 0x07, 0x3d, 0xc8, + 0x64, 0x32, 0xa4, 0x83, 0x69, 0xbe, 0x30, 0x99, 0x14, 0xf5, 0x29, 0x7c, 0x10, 0x1f, 0xc4, 0x63, + 0x8f, 0x9e, 0x44, 0xda, 0x17, 0x91, 0x36, 0xa9, 0x12, 0x91, 0x82, 0xb9, 0x85, 0x30, 0xf3, 0x9b, + 0xef, 0xff, 0xf1, 0xc7, 0x93, 0x07, 0x11, 0xfa, 0x9c, 0xd3, 0x28, 0x12, 0x34, 0x66, 0xdc, 0x09, + 0x44, 0xaa, 0xa4, 0xf0, 0x33, 0xc5, 0x03, 0x06, 0xf3, 0x24, 0xff, 0x1b, 0xf1, 0x20, 0xe4, 0xd2, + 0x09, 0x58, 0x44, 0x33, 0x35, 0x73, 0x24, 0x5f, 0xc0, 0x2d, 0x0f, 0x6e, 0x28, 0x63, 0x90, 0xc5, + 0xca, 0x4e, 0x24, 0x28, 0x20, 0x6e, 0x59, 0xb2, 0xf7, 0x48, 0x76, 0x21, 0x75, 0xff, 0x85, 0x10, + 0xc2, 0xf6, 0xba, 0xb3, 0xf9, 0xca, 0xa5, 0xee, 0xb0, 0xc2, 0x4c, 0xa5, 0x59, 0xba, 0x27, 0x15, + 0x84, 0x50, 0xd2, 0xdd, 0xfd, 0xde, 0x53, 0x0d, 0xb7, 0xbd, 0x3c, 0xe5, 0x28, 0x87, 0xc9, 0x35, + 0xfe, 0x5d, 0xbc, 0xa1, 0x23, 0x13, 0x59, 0x4d, 0xf7, 0xd8, 0xfe, 0x79, 0x60, 0xbb, 0xd0, 0xc6, + 0xf5, 0xe5, 0xeb, 0x21, 0xf2, 0x76, 0x22, 0x61, 0xf8, 0x4f, 0xbe, 0xd4, 0x51, 0x92, 0x48, 0x58, + 0xd0, 0x28, 0xd5, 0x7f, 0x99, 0x35, 0xab, 0xe9, 0x1e, 0x55, 0x79, 0xe4, 0x74, 0x93, 0xc4, 0xfb, + 0x2a, 0x12, 0x8a, 0x1b, 0x92, 0xd3, 0x14, 0x62, 0xbd, 0x66, 0x22, 0xab, 0xed, 0x9e, 0x55, 0xb1, + 0xcb, 0x5b, 0xb1, 0xbd, 0x2d, 0xe8, 0x15, 0x30, 0x19, 0xe2, 0x03, 0x59, 0x3a, 0x70, 0xc1, 0x66, + 0x7c, 0x4e, 0xa7, 0x5c, 0xa6, 0x02, 0x62, 0xbd, 0x6e, 0x22, 0xab, 0xe5, 0xed, 0x3b, 0xd2, 0x1b, + 0xe0, 0x46, 0x6e, 0x92, 0xbf, 0xb8, 0x75, 0x29, 0xb3, 0x54, 0x71, 0x3e, 0x05, 0x25, 0xe2, 0xb0, + 0xa3, 0x91, 0xff, 0x98, 0x9c, 0xd3, 0x48, 0x30, 0x01, 0x59, 0x3a, 0xa5, 0x91, 0x08, 0xa8, 0x02, + 0xd9, 0x41, 0x63, 0xff, 0x79, 0x65, 0xa0, 0xe5, 0xca, 0x40, 0x6f, 0x2b, 0x03, 0x3d, 0xae, 0x0d, + 0x6d, 0xb9, 0x36, 0xb4, 0x97, 0xb5, 0xa1, 0x5d, 0x4d, 0x42, 0xa1, 0x66, 0x99, 0x6f, 0x33, 0x98, + 0x3b, 0x79, 0xda, 0xfe, 0x77, 0xa5, 0xe8, 0x7f, 0xe6, 0xed, 0x17, 0xb5, 0xb8, 0xfb, 0x28, 0x86, + 0xba, 0x4f, 0x78, 0xea, 0x37, 0xb6, 0xcd, 0x18, 0xbc, 0x07, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x03, + 0xd3, 0x47, 0x31, 0x03, 0x00, 0x00, } func (m *RevokedAccount) Marshal() (dAtA []byte, err error) { @@ -156,6 +166,11 @@ func (m *RevokedAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.RevokedAccountSchemaVersion != 0 { + i = encodeVarintRevokedAccount(dAtA, i, uint64(m.RevokedAccountSchemaVersion)) + i-- + dAtA[i] = 0x20 + } if m.Reason != 0 { i = encodeVarintRevokedAccount(dAtA, i, uint64(m.Reason)) i-- @@ -220,6 +235,9 @@ func (m *RevokedAccount) Size() (n int) { if m.Reason != 0 { n += 1 + sovRevokedAccount(uint64(m.Reason)) } + if m.RevokedAccountSchemaVersion != 0 { + n += 1 + sovRevokedAccount(uint64(m.RevokedAccountSchemaVersion)) + } return n } @@ -347,6 +365,25 @@ func (m *RevokedAccount) Unmarshal(dAtA []byte) error { break } } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RevokedAccountSchemaVersion", wireType) + } + m.RevokedAccountSchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRevokedAccount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RevokedAccountSchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipRevokedAccount(dAtA[iNdEx:]) diff --git a/x/dclupgrade/types/approved_upgrade.pb.go b/x/dclupgrade/types/approved_upgrade.pb.go index a987bd2c4..6cfa0bb7d 100644 --- a/x/dclupgrade/types/approved_upgrade.pb.go +++ b/x/dclupgrade/types/approved_upgrade.pb.go @@ -26,10 +26,11 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ApprovedUpgrade struct { - Plan types.Plan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan"` - Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` - Approvals []*Grant `protobuf:"bytes,3,rep,name=approvals,proto3" json:"approvals,omitempty"` - Rejects []*Grant `protobuf:"bytes,4,rep,name=rejects,proto3" json:"rejects,omitempty"` + Plan types.Plan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan"` + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` + Approvals []*Grant `protobuf:"bytes,3,rep,name=approvals,proto3" json:"approvals,omitempty"` + Rejects []*Grant `protobuf:"bytes,4,rep,name=rejects,proto3" json:"rejects,omitempty"` + SchemaVersion uint32 `protobuf:"varint,5,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *ApprovedUpgrade) Reset() { *m = ApprovedUpgrade{} } @@ -93,6 +94,13 @@ func (m *ApprovedUpgrade) GetRejects() []*Grant { return nil } +func (m *ApprovedUpgrade) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*ApprovedUpgrade)(nil), "zigbeealliance.distributedcomplianceledger.dclupgrade.ApprovedUpgrade") } @@ -102,30 +110,31 @@ func init() { } var fileDescriptor_fb4c43c47cec3bb3 = []byte{ - // 359 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0xbf, 0x4e, 0x2a, 0x41, - 0x14, 0xc6, 0x77, 0x81, 0x5c, 0xc2, 0x52, 0xdc, 0x64, 0x43, 0xb1, 0x12, 0xb3, 0x12, 0x63, 0x41, - 0xb3, 0xb3, 0x01, 0xa3, 0x95, 0x0d, 0x34, 0x16, 0x5a, 0x18, 0x8c, 0x16, 0x34, 0x64, 0x76, 0xe7, - 0x64, 0x5c, 0x33, 0xec, 0x4c, 0x66, 0x06, 0xa2, 0x3e, 0x85, 0xaf, 0x62, 0xe2, 0x43, 0x50, 0x12, - 0x2b, 0x2b, 0x63, 0xe0, 0x45, 0x0c, 0xcc, 0x6c, 0x90, 0xc4, 0x58, 0x10, 0xbb, 0x39, 0x7f, 0xe6, - 0x77, 0xbe, 0x73, 0x3e, 0xef, 0xf2, 0x29, 0xa3, 0x09, 0x00, 0x66, 0x2c, 0xc3, 0x79, 0x0a, 0x31, - 0xc9, 0x94, 0x96, 0x59, 0x32, 0xd1, 0x40, 0x52, 0x3e, 0x16, 0x26, 0xcb, 0x80, 0x50, 0x90, 0x31, - 0x49, 0xd9, 0x44, 0x50, 0x89, 0x09, 0xc4, 0x58, 0x08, 0xc9, 0xa7, 0x40, 0x46, 0x36, 0x81, 0x84, - 0xe4, 0x9a, 0xfb, 0x27, 0xdb, 0x34, 0xf4, 0x0b, 0x0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0x9b, 0x24, 0x28, - 0xe5, 0xe3, 0xd8, 0x8c, 0x8a, 0x7e, 0x32, 0x27, 0xda, 0x0c, 0x8b, 0xac, 0x3d, 0x0f, 0xdf, 0x0d, - 0xd2, 0x8f, 0x02, 0x54, 0xf2, 0x6f, 0xed, 0xd0, 0xf1, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, - 0x50, 0xeb, 0x45, 0xc2, 0x02, 0x00, 0x00, + // 381 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0x3f, 0x6f, 0xda, 0x40, + 0x18, 0xc6, 0x6d, 0xa0, 0x45, 0x18, 0xa1, 0x4a, 0x16, 0x83, 0x8b, 0x2a, 0xd7, 0xaa, 0x18, 0xbc, + 0xf8, 0x2c, 0xa8, 0xda, 0xa9, 0x0b, 0x2c, 0x1d, 0xda, 0x21, 0x72, 0x14, 0x06, 0x16, 0x74, 0xbe, + 0x7b, 0x75, 0x38, 0xb2, 0x7d, 0xd6, 0xdd, 0x81, 0x92, 0x7c, 0x8a, 0x7c, 0x98, 0x7c, 0x08, 0x46, + 0x94, 0x25, 0x99, 0xa2, 0x08, 0xbe, 0x48, 0x04, 0x67, 0x8b, 0x20, 0x45, 0x19, 0x50, 0x36, 0xbf, + 0x7f, 0xfc, 0xbb, 0xe7, 0x79, 0x1f, 0xeb, 0xff, 0x4d, 0xc2, 0x62, 0x00, 0x9c, 0xa6, 0x09, 0xce, + 0x09, 0x84, 0x34, 0x91, 0x4a, 0x24, 0xf1, 0x42, 0x01, 0x25, 0x3c, 0x2b, 0x74, 0x37, 0x05, 0xca, + 0x40, 0x84, 0x94, 0xa4, 0x8b, 0x82, 0x09, 0x4c, 0x21, 0xc4, 0x45, 0x21, 0xf8, 0x12, 0xe8, 0xac, + 0x6c, 0xa0, 0x42, 0x70, 0xc5, 0xed, 0x5f, 0xc7, 0x34, 0xf4, 0x0e, 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71, 0xcd, 0xe7, 0x8d, 0x6b, 0xde, 0x6e, 0x5d, 0x63, 0xbd, 0x75, 0x8d, 0xc7, 0xad, 0x6b, 0x4c, + 0xff, 0xb1, 0x44, 0xcd, 0x17, 0x31, 0x22, 0x3c, 0x0b, 0xb5, 0xa0, 0xe0, 0xad, 0x08, 0x83, 0x83, + 0xa4, 0xa0, 0x0c, 0xf1, 0xea, 0x75, 0x8c, 0xea, 0xba, 0x00, 0x19, 0x7f, 0xde, 0xe7, 0xf8, 0xf3, + 0x25, 0x00, 0x00, 0xff, 0xff, 0xdf, 0xa1, 0x5e, 0x4e, 0xe8, 0x02, 0x00, 0x00, } func (m *ApprovedUpgrade) Marshal() (dAtA []byte, err error) { @@ -148,6 +157,11 @@ func (m *ApprovedUpgrade) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintApprovedUpgrade(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x28 + } if len(m.Rejects) > 0 { for iNdEx := len(m.Rejects) - 1; iNdEx >= 0; iNdEx-- { { @@ -231,6 +245,9 @@ func (m *ApprovedUpgrade) Size() (n int) { n += 1 + l + sovApprovedUpgrade(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovApprovedUpgrade(uint64(m.SchemaVersion)) + } return n } @@ -402,6 +419,25 @@ func (m *ApprovedUpgrade) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApprovedUpgrade + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipApprovedUpgrade(dAtA[iNdEx:]) diff --git a/x/dclupgrade/types/grant.pb.go b/x/dclupgrade/types/grant.pb.go index 29d4f2e60..96583e6ab 100644 --- a/x/dclupgrade/types/grant.pb.go +++ b/x/dclupgrade/types/grant.pb.go @@ -24,9 +24,10 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Grant struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Time int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` - Info string `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Time int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` + Info string `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` + SchemaVersion uint32 `protobuf:"varint,4,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *Grant) Reset() { *m = Grant{} } @@ -83,6 +84,13 @@ func (m *Grant) GetInfo() string { return "" } +func (m *Grant) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*Grant)(nil), "zigbeealliance.distributedcomplianceledger.dclupgrade.Grant") } @@ -92,23 +100,25 @@ func init() { } var fileDescriptor_a749b46e32743c76 = []byte{ - // 254 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0xac, 0xca, 0x4c, 0x4f, - 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, - 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, - 0xa7, 0x16, 0xe9, 0xa7, 0x24, 0xe7, 0x94, 0x16, 0xa4, 0x17, 0x25, 0xa6, 0xa4, 0xea, 0xa7, 0x17, - 0x25, 0xe6, 0x95, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x99, 0xa2, 0x1a, 0xa1, 0x87, 0xc7, - 0x08, 0x3d, 0x84, 0x11, 0x52, 0x92, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0x60, 0x43, 0xf4, - 0x21, 0x1c, 0x88, 0x89, 0x4a, 0xc9, 0x5c, 0xac, 0xee, 0x20, 0x0b, 0x84, 0x8c, 0xb8, 0xd8, 0x13, - 0x53, 0x52, 0x8a, 0x52, 0x8b, 0x8b, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x9d, 0x24, 0x2e, 0x6d, - 0xd1, 0x15, 0x81, 0xaa, 0x75, 0x84, 0xc8, 0x04, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x07, 0xc1, 0x14, - 0x0a, 0x09, 0x71, 0xb1, 0x94, 0x64, 0xe6, 0xa6, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0x30, 0x07, 0x81, - 0xd9, 0x20, 0xb1, 0xcc, 0xbc, 0xb4, 0x7c, 0x09, 0x66, 0x90, 0x21, 0x41, 0x60, 0xb6, 0x53, 0xea, - 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, - 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x79, 0xa7, 0x67, 0x96, 0x64, 0x94, - 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x43, 0xfc, 0xa6, 0x8b, 0x2d, 0x7c, 0x74, 0x11, 0xbe, 0xd3, - 0x85, 0x86, 0x50, 0x05, 0x72, 0x18, 0x95, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xbd, 0x64, - 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xea, 0x91, 0x79, 0x3d, 0x69, 0x01, 0x00, 0x00, + // 280 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x4a, 0xc4, 0x30, + 0x1c, 0xc6, 0x1b, 0xef, 0x54, 0x2c, 0xdc, 0x52, 0x1c, 0xaa, 0x43, 0x28, 0xe2, 0xd0, 0xa5, 0x2d, + 0x28, 0x3e, 0xc0, 0xdd, 0xe2, 0xe0, 0x56, 0xc1, 0xc1, 0x45, 0xd2, 0xe4, 0x6f, 0x2e, 0xd0, 0x24, + 0x25, 0x49, 0x41, 0x7d, 0x03, 0x37, 0x1f, 0xc6, 0x87, 0x70, 0x3c, 0x9c, 0x1c, 0xa5, 0x7d, 0x11, + 0x69, 0x73, 0x72, 0x1e, 0xc8, 0x6d, 0x5f, 0xbe, 0x7c, 0xfc, 0x42, 0x7e, 0xe1, 0xfc, 0x45, 0xf0, + 0x0a, 0x80, 0xd4, 0xb5, 0x20, 0x8a, 0x42, 0xc1, 0x84, 0x75, 0x46, 0x54, 0xad, 0x03, 0x46, 0xb5, + 0x6c, 0x7c, 0x5b, 0x03, 0xe3, 0x60, 0x0a, 0x46, 0xeb, 0xb6, 0xe1, 0x86, 0x30, 0x28, 0xb8, 0x21, + 0xca, 0xe5, 0x8d, 0xd1, 0x4e, 0x47, 0x57, 0xdb, 0x88, 0x7c, 0x07, 0x22, 0xdf, 0x20, 0x4e, 0x4f, + 0xa8, 0xb6, 0x52, 0xdb, 0x87, 0x11, 0x52, 0xf8, 0x83, 0x27, 0x9e, 0xbd, 0xa2, 0x70, 0xff, 0x7a, + 0x78, 0x21, 0xba, 0x08, 0x0f, 0x09, 0x63, 0x06, 0xac, 0x8d, 0x51, 0x82, 0xd2, 0xa3, 0x45, 0xfc, + 0xf9, 0x9e, 0x1d, 0xaf, 0xc7, 0x73, 0x7f, 0x73, 0xeb, 0x8c, 0x50, 0xbc, 0xfc, 0x1d, 0x46, 0x51, + 0x38, 0x75, 0x42, 0x42, 0xbc, 0x97, 0xa0, 0x74, 0x52, 0x8e, 0x79, 0xe8, 0x84, 0x7a, 0xd4, 0xf1, + 0x64, 0x80, 0x94, 0x63, 0x8e, 0xce, 0xc3, 0x99, 0xa5, 0x4b, 0x90, 0xe4, 0x0e, 0x8c, 0x15, 0x5a, + 0xc5, 0xd3, 0x04, 0xa5, 0xb3, 0x72, 0xbb, 0x5c, 0xc0, 0x47, 0x87, 0xd1, 0xaa, 0xc3, 0xe8, 0xbb, + 0xc3, 0xe8, 0xad, 0xc7, 0xc1, 0xaa, 0xc7, 0xc1, 0x57, 0x8f, 0x83, 0xfb, 0x1b, 0x2e, 0xdc, 0xb2, + 0xad, 0x72, 0xaa, 0x65, 0xe1, 0x15, 0x64, 0xff, 0x69, 0xcc, 0x36, 0x12, 0xb2, 0xb5, 0xc8, 0xa7, + 0xbf, 0x2a, 0xdd, 0x73, 0x03, 0xb6, 0x3a, 0x18, 0x7f, 0x7e, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, + 0x67, 0x33, 0x51, 0x41, 0x90, 0x01, 0x00, 0x00, } func (m *Grant) Marshal() (dAtA []byte, err error) { @@ -131,6 +141,11 @@ func (m *Grant) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintGrant(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x20 + } if len(m.Info) > 0 { i -= len(m.Info) copy(dAtA[i:], m.Info) @@ -181,6 +196,9 @@ func (m *Grant) Size() (n int) { if l > 0 { n += 1 + l + sovGrant(uint64(l)) } + if m.SchemaVersion != 0 { + n += 1 + sovGrant(uint64(m.SchemaVersion)) + } return n } @@ -302,6 +320,25 @@ func (m *Grant) Unmarshal(dAtA []byte) error { } m.Info = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGrant(dAtA[iNdEx:]) diff --git a/x/dclupgrade/types/proposed_upgrade.pb.go b/x/dclupgrade/types/proposed_upgrade.pb.go index 75e733569..75e2db7ea 100644 --- a/x/dclupgrade/types/proposed_upgrade.pb.go +++ b/x/dclupgrade/types/proposed_upgrade.pb.go @@ -26,10 +26,11 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ProposedUpgrade struct { - Plan types.Plan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan"` - Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` - Approvals []*Grant `protobuf:"bytes,3,rep,name=approvals,proto3" json:"approvals,omitempty"` - Rejects []*Grant `protobuf:"bytes,4,rep,name=rejects,proto3" json:"rejects,omitempty"` + Plan types.Plan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan"` + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` + Approvals []*Grant `protobuf:"bytes,3,rep,name=approvals,proto3" json:"approvals,omitempty"` + Rejects []*Grant `protobuf:"bytes,4,rep,name=rejects,proto3" json:"rejects,omitempty"` + SchemaVersion uint32 `protobuf:"varint,5,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *ProposedUpgrade) Reset() { *m = ProposedUpgrade{} } @@ -93,6 +94,13 @@ func (m *ProposedUpgrade) GetRejects() []*Grant { return nil } +func (m *ProposedUpgrade) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*ProposedUpgrade)(nil), "zigbeealliance.distributedcomplianceledger.dclupgrade.ProposedUpgrade") } @@ -102,30 +110,31 @@ func init() { } var fileDescriptor_0325dd5a8e62f2be = []byte{ - // 361 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0xbf, 0x4e, 0x2a, 0x41, - 0x14, 0xc6, 0x77, 0x81, 0x5c, 0xc2, 0x52, 0xdc, 0x64, 0x43, 0xb1, 0x97, 0xdc, 0xac, 0xc4, 0x58, - 0xd0, 0xec, 0x6c, 0xc0, 0x68, 0x65, 0x03, 0x8d, 0x85, 0x16, 0x04, 0xa3, 0x05, 0x0d, 0x99, 0xdd, - 0x39, 0x19, 0xd7, 0x0c, 0x3b, 0x93, 0x99, 0x81, 0xa8, 0x4f, 0xe1, 0xab, 0x98, 0xf8, 0x10, 0x94, - 0xc4, 0xca, 0xca, 0x18, 0x78, 0x11, 0x03, 0x33, 0x1b, 0x24, 0x31, 0x16, 0xc4, 0x6e, 0xcf, 0x9f, - 0xfd, 0x9d, 0xef, 0x9b, 0xcf, 0xbb, 0x7c, 0xcc, 0x68, 0x02, 0x80, 0x19, 0xcb, 0x70, 0x9e, 0x42, - 0x4c, 0x32, 0xa5, 0x65, 0x96, 0x4c, 0x35, 0x90, 0x94, 0x4f, 0x84, 0xe9, 0x32, 0x20, 0x14, 0x64, - 0x4c, 0x52, 0x36, 0x15, 0x54, 0x62, 0x02, 0xb1, 0x90, 0x5c, 0x70, 0x05, 0x64, 0x6c, 0x1b, 0x48, - 0x48, 0xae, 0xb9, 0x7f, 0xb2, 0x4b, 0x43, 0x3f, 0xd0, 0xd0, 0x96, 0xd6, 0x6c, 0x50, 0x4e, 0xf9, - 0x86, 0x10, 0xaf, 0xbf, 0x0c, 0xac, 0xf9, 0x2f, 0xe5, 0x6a, 0xc2, 0xd5, 0xd8, 0x0c, 0x4c, 0x61, - 0x47, 0x47, 0xa6, 0x8a, 0x0b, 0x39, 0xb3, 0x4e, 0x02, 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00, 0xff, - 0xff, 0x3c, 0x63, 0x17, 0x3a, 0xc2, 0x02, 0x00, 0x00, + // 382 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0x3f, 0x8f, 0xda, 0x30, + 0x18, 0xc6, 0x13, 0xa0, 0x45, 0x04, 0xa1, 0x4a, 0x11, 0x43, 0x8a, 0xaa, 0x34, 0xaa, 0x18, 0xb2, + 0xc4, 0x11, 0x54, 0xed, 0xd4, 0x05, 0x96, 0x0e, 0xed, 0x80, 0x52, 0x95, 0x81, 0x05, 0x39, 0xf6, + 0x2b, 0x93, 0x2a, 0x89, 0x2d, 0xdb, 0xa0, 0xb6, 0x9f, 0xa2, 0x1f, 0xa6, 0x1f, 0x82, 0x11, 0x75, + 0xe9, 0x4d, 0xa7, 0x13, 0x7c, 0x91, 0x13, 0x38, 0x11, 0x87, 0x74, 0xba, 0x01, 0xdd, 0xe6, 0xf7, + 0x8f, 0x7f, 0x7e, 0x1e, 0x3f, 0xce, 0xd7, 0xdf, 0x19, 0x4b, 0x01, 0x70, 0x9e, 0x67, 0xb8, 0x24, + 0x10, 0xd3, 0x4c, 0x69, 0x99, 0xa5, 0x6b, 0x0d, 0x94, 0xf0, 0x42, 0x98, 0x6e, 0x0e, 0x94, 0x81, + 0x8c, 0x29, 0xc9, 0xd7, 0x82, 0x49, 0x4c, 0x21, 0x16, 0x92, 0x0b, 0xae, 0x80, 0x2e, 0xab, 0x06, + 0x12, 0x92, 0x6b, 0xee, 0x7e, 0xb8, 0xa4, 0xa1, 0x27, 0x68, 0xe8, 0x4c, 0x1b, 0xf4, 0x19, 0x67, + 0xfc, 0x44, 0x88, 0x8f, 0x27, 0x03, 0x1b, 0xbc, 0x26, 0x5c, 0x15, 0x5c, 0x2d, 0xcd, 0xc0, 0x14, + 0xd5, 0x68, 0x68, 0xaa, 0xb8, 0x96, 0xb3, 0x19, 0xa5, 0xa0, 0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d1, + 0x59, 0x52, 0x54, 0x85, 0xf8, 0xf3, 0x61, 0x8c, 0xfa, 0x97, 0x00, 0x95, 0xbe, 0x3c, 0xe5, 0xf8, + 0xfe, 0x3e, 0x00, 0x00, 0xff, 0xff, 0x04, 0xd7, 0xc0, 0x12, 0xe8, 0x02, 0x00, 0x00, } func (m *ProposedUpgrade) Marshal() (dAtA []byte, err error) { @@ -148,6 +157,11 @@ func (m *ProposedUpgrade) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintProposedUpgrade(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x28 + } if len(m.Rejects) > 0 { for iNdEx := len(m.Rejects) - 1; iNdEx >= 0; iNdEx-- { { @@ -231,6 +245,9 @@ func (m *ProposedUpgrade) Size() (n int) { n += 1 + l + sovProposedUpgrade(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovProposedUpgrade(uint64(m.SchemaVersion)) + } return n } @@ -402,6 +419,25 @@ func (m *ProposedUpgrade) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposedUpgrade + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipProposedUpgrade(dAtA[iNdEx:]) diff --git a/x/dclupgrade/types/rejected_upgrade.pb.go b/x/dclupgrade/types/rejected_upgrade.pb.go index 5eda1c429..5a848c7b2 100644 --- a/x/dclupgrade/types/rejected_upgrade.pb.go +++ b/x/dclupgrade/types/rejected_upgrade.pb.go @@ -26,10 +26,11 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type RejectedUpgrade struct { - Plan types.Plan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan"` - Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` - Approvals []*Grant `protobuf:"bytes,3,rep,name=approvals,proto3" json:"approvals,omitempty"` - Rejects []*Grant `protobuf:"bytes,4,rep,name=rejects,proto3" json:"rejects,omitempty"` + Plan types.Plan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan"` + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` + Approvals []*Grant `protobuf:"bytes,3,rep,name=approvals,proto3" json:"approvals,omitempty"` + Rejects []*Grant `protobuf:"bytes,4,rep,name=rejects,proto3" json:"rejects,omitempty"` + SchemaVersion uint32 `protobuf:"varint,5,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *RejectedUpgrade) Reset() { *m = RejectedUpgrade{} } @@ -93,6 +94,13 @@ func (m *RejectedUpgrade) GetRejects() []*Grant { return nil } +func (m *RejectedUpgrade) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*RejectedUpgrade)(nil), "zigbeealliance.distributedcomplianceledger.dclupgrade.RejectedUpgrade") } @@ -102,30 +110,31 @@ func init() { } var fileDescriptor_9591340410a3709a = []byte{ - // 360 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0xbf, 0x4a, 0x2b, 0x41, - 0x14, 0xc6, 0x77, 0x93, 0x70, 0x43, 0x36, 0xc5, 0x85, 0x25, 0xc5, 0xde, 0x70, 0xd9, 0x1b, 0x2e, - 0x16, 0x69, 0x76, 0x96, 0x44, 0xb4, 0xb2, 0x49, 0x1a, 0x0b, 0x2d, 0x64, 0x45, 0x8b, 0x34, 0x61, - 0x76, 0xe7, 0x30, 0xae, 0x4c, 0x76, 0x86, 0x99, 0x49, 0x50, 0x9f, 0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2, 0x7f, 0x0f, 0x08, 0x91, 0xa0, 0xd4, 0xa5, 0x96, 0x79, 0x41, 0x93, 0x72, 0xd1, - 0x1f, 0x79, 0x0d, 0x2c, 0x84, 0xe4, 0x33, 0xcc, 0x54, 0x50, 0xed, 0x54, 0xbb, 0xcd, 0xfe, 0x09, - 0xda, 0xeb, 0x91, 0xd1, 0xe9, 0xda, 0x56, 0xb2, 0xc5, 0xf9, 0xd7, 0x5e, 0xdd, 0xc4, 0xa8, 0x82, - 0xda, 0x0f, 0x90, 0x4b, 0xd8, 0x10, 0xe6, 0xcb, 0xd0, 0x5d, 0x2c, 0x43, 0xf7, 0x7d, 0x19, 0xba, - 0x8f, 0xab, 0xd0, 0x59, 0xac, 0x42, 0xe7, 0x75, 0x15, 0x3a, 0xa3, 0x33, 0x9a, 0xeb, 0x9b, 0x69, - 0x8a, 0x32, 0x3e, 0x89, 0xcd, 0xa9, 0xe8, 0xab, 0x70, 0xa2, 0xed, 0xb1, 0xc8, 0xc6, 0x73, 0xf7, - 0x39, 0x20, 0x7d, 0x2f, 0x40, 0xa5, 0xbf, 0x36, 0x09, 0x1d, 0x7e, 0x04, 0x00, 0x00, 0xff, 0xff, - 0x94, 0x47, 0x47, 0xfc, 0xc2, 0x02, 0x00, 0x00, + // 381 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0x3f, 0x6f, 0xda, 0x40, + 0x18, 0xc6, 0x6d, 0xa0, 0x45, 0x18, 0xa1, 0x4a, 0x16, 0x83, 0x8b, 0x2a, 0xd7, 0xaa, 0x18, 0xbc, + 0xf8, 0x2c, 0xa8, 0xda, 0xa9, 0x0b, 0x2c, 0x1d, 0xda, 0x21, 0x72, 0x14, 0x06, 0x16, 0x74, 0xbe, + 0x7b, 0x75, 0x38, 0xb2, 0x7d, 0xd6, 0xdd, 0x81, 0x92, 0x7c, 0x8a, 0x7c, 0x98, 0x7c, 0x08, 0x46, + 0x94, 0x25, 0x99, 0xa2, 0x08, 0xbe, 0x48, 0x04, 0x67, 0x8b, 0x20, 0x45, 0x19, 0x50, 0xb6, 0x7b, + 0xff, 0xdc, 0xef, 0x9e, 0xe7, 0x1e, 0xeb, 0xff, 0x4d, 0xc2, 0x62, 0x00, 0x9c, 0xa6, 0x09, 0xce, + 0x09, 0x84, 0x34, 0x91, 0x4a, 0x24, 0xf1, 0x42, 0x01, 0x25, 0x3c, 0x2b, 0x74, 0x37, 0x05, 0xca, + 0x40, 0x84, 0x94, 0xa4, 0x8b, 0x82, 0x09, 0x4c, 0x21, 0x14, 0x70, 0x09, 0x44, 0x01, 0x9d, 0x95, + 0x0d, 0x54, 0x08, 0xae, 0xb8, 0xfd, 0xeb, 0x98, 0x86, 0xde, 0xa1, 0xa1, 0x03, 0xad, 0xd7, 0x65, + 0x9c, 0xf1, 0x3d, 0x21, 0xdc, 0x9d, 0x34, 0xac, 0xf7, 0x95, 0x70, 0x99, 0x71, 0x39, 0xd3, 0x03, + 0x5d, 0x94, 0xa3, 0xbe, 0xae, 0xc2, 0x4a, 0xce, 0x72, 0x10, 0x83, 0xc2, 0x83, 0xf0, 0x48, 0x4d, + 0x6f, 0x74, 0x9a, 0x37, 0x26, 0x70, 0xae, 0x34, 0xe2, 0xc7, 0x43, 0xcd, 0xfa, 0x12, 0x95, 0x5e, + 0x2f, 0xf4, 0xdc, 0xfe, 0x6d, 0x35, 0x8a, 0x14, 0xe7, 0x8e, 0xe9, 0x99, 0x7e, 0x7b, 0xf8, 0x0d, + 0x95, 0xca, 0xaa, 0xb7, 0x4b, 0x2d, 0xe8, 0x2c, 0xc5, 0xf9, 0xb8, 0xb1, 0x7a, 0xfa, 0x6e, 0x44, + 0xfb, 0x7d, 0x7b, 0x68, 0x35, 0x89, 0x00, 0xac, 0xb8, 0x70, 0x6a, 0x9e, 0xe9, 0xb7, 0xc6, 0xce, + 0xfd, 0x5d, 0xd0, 0x2d, 0x6f, 0x8f, 0x28, 0x15, 0x20, 0xe5, 0xb9, 0x12, 0x49, 0xce, 0xa2, 0x6a, + 0xd1, 0x9e, 0x5a, 0x2d, 0x5c, 0x14, 0x82, 0x2f, 0x71, 0x2a, 0x9d, 0xba, 0x57, 0xf7, 0xdb, 0xc3, + 0x3f, 0xe8, 0xa4, 0x4f, 0x46, 0x7f, 0x77, 0xb6, 0xa2, 0x03, 0xce, 0x9e, 0x58, 0x4d, 0x1d, 0xa3, + 0x74, 0x1a, 0x1f, 0x40, 0xae, 0x60, 0x76, 0xdf, 0xea, 0x48, 0x32, 0x87, 0x0c, 0x4f, 0x40, 0xc8, + 0x84, 0xe7, 0xce, 0x27, 0xcf, 0xf4, 0x3b, 0xd1, 0x71, 0x73, 0x0c, 0xab, 0x8d, 0x6b, 0xae, 0x37, + 0xae, 0xf9, 0xbc, 0x71, 0xcd, 0xdb, 0xad, 0x6b, 0xac, 0xb7, 0xae, 0xf1, 0xb8, 0x75, 0x8d, 0xe9, + 0x3f, 0x96, 0xa8, 0xf9, 0x22, 0x46, 0x84, 0x67, 0xa1, 0x16, 0x14, 0xbc, 0x15, 0x61, 0x70, 0x90, + 0x14, 0x94, 0x21, 0x5e, 0xbd, 0x8e, 0x51, 0x5d, 0x17, 0x20, 0xe3, 0xcf, 0xfb, 0x1c, 0x7f, 0xbe, + 0x04, 0x00, 0x00, 0xff, 0xff, 0x48, 0x08, 0xf6, 0xfa, 0xe8, 0x02, 0x00, 0x00, } func (m *RejectedUpgrade) Marshal() (dAtA []byte, err error) { @@ -148,6 +157,11 @@ func (m *RejectedUpgrade) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintRejectedUpgrade(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x28 + } if len(m.Rejects) > 0 { for iNdEx := len(m.Rejects) - 1; iNdEx >= 0; iNdEx-- { { @@ -231,6 +245,9 @@ func (m *RejectedUpgrade) Size() (n int) { n += 1 + l + sovRejectedUpgrade(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovRejectedUpgrade(uint64(m.SchemaVersion)) + } return n } @@ -402,6 +419,25 @@ func (m *RejectedUpgrade) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRejectedUpgrade + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipRejectedUpgrade(dAtA[iNdEx:]) diff --git a/x/model/types/model_versions.pb.go b/x/model/types/model_versions.pb.go index e0f41bb99..c8144fea9 100644 --- a/x/model/types/model_versions.pb.go +++ b/x/model/types/model_versions.pb.go @@ -26,6 +26,7 @@ type ModelVersions struct { Vid int32 `protobuf:"varint,1,opt,name=vid,proto3" json:"vid,omitempty"` Pid int32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"` SoftwareVersions []uint32 `protobuf:"varint,3,rep,packed,name=softwareVersions,proto3" json:"softwareVersions,omitempty"` + SchemaVersion uint32 `protobuf:"varint,4,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *ModelVersions) Reset() { *m = ModelVersions{} } @@ -82,6 +83,13 @@ func (m *ModelVersions) GetSoftwareVersions() []uint32 { return nil } +func (m *ModelVersions) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*ModelVersions)(nil), "zigbeealliance.distributedcomplianceledger.model.ModelVersions") } @@ -91,21 +99,23 @@ func init() { } var fileDescriptor_eb2b229077d76c14 = []byte{ - // 224 bytes of a gzipped FileDescriptorProto + // 246 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00,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e, 0x36, 0xff, 0xeb, 0x22, - 0x5c, 0xae, 0x0b, 0x0d, 0x81, 0x0a, 0x68, 0x18, 0x94, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, - 0xfd, 0x6e, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x24, 0x4a, 0xd5, 0x21, 0x44, 0x01, 0x00, 0x00, + 0xa3, 0x07, 0x36, 0x40, 0xa9, 0x95, 0x91, 0x8b, 0xd7, 0x17, 0xc4, 0x0a, 0x83, 0x9a, 0x24, 0x24, + 0xc0, 0xc5, 0x5c, 0x96, 0x99, 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x1a, 0x04, 0x62, 0x82, 0x44, + 0x0a, 0x32, 0x53, 0x24, 0x98, 0x20, 0x22, 0x05, 0x99, 0x29, 0x42, 0x5a, 0x5c, 0x02, 0xc5, 0xf9, + 0x69, 0x25, 0xe5, 0x89, 0x45, 0xa9, 0x30, 0x7d, 0x12, 0xcc, 0x0a, 0xcc, 0x1a, 0xbc, 0x41, 0x18, + 0xe2, 0x42, 0x2a, 0x5c, 0xbc, 0xc5, 0xc9, 0x19, 0xa9, 0xb9, 0x89, 0x50, 0x11, 0x09, 0x16, 0x05, + 0x46, 0x0d, 0xde, 0x20, 0x54, 0x41, 0xa7, 0x84, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, + 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, + 0x63, 0x88, 0x72, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x87, 0x78, + 0x4f, 0x17, 0x5b, 0x30, 0xe9, 0x22, 0x3c, 0xa8, 0x0b, 0x0d, 0xa8, 0x0a, 0x68, 0x50, 0x95, 0x54, + 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x83, 0xc8, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x46, 0xfc, + 0xca, 0x89, 0x6b, 0x01, 0x00, 0x00, } func (m *ModelVersions) Marshal() (dAtA []byte, err error) { @@ -128,6 +138,11 @@ func (m *ModelVersions) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintModelVersions(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x20 + } if len(m.SoftwareVersions) > 0 { dAtA2 := make([]byte, len(m.SoftwareVersions)*10) var j1 int @@ -189,6 +204,9 @@ func (m *ModelVersions) Size() (n int) { } n += 1 + sovModelVersions(uint64(l)) + l } + if m.SchemaVersion != 0 { + n += 1 + sovModelVersions(uint64(m.SchemaVersion)) + } return n } @@ -341,6 +359,25 @@ func (m *ModelVersions) Unmarshal(dAtA []byte) error { } else { return fmt.Errorf("proto: wrong wireType = %d for field SoftwareVersions", wireType) } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModelVersions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipModelVersions(dAtA[iNdEx:]) diff --git a/x/model/types/product.pb.go b/x/model/types/product.pb.go index 43400f58f..f28506f7f 100644 --- a/x/model/types/product.pb.go +++ b/x/model/types/product.pb.go @@ -23,9 +23,10 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Product struct { - Pid int32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - PartNumber string `protobuf:"bytes,3,opt,name=partNumber,proto3" json:"partNumber,omitempty"` + Pid int32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + PartNumber string `protobuf:"bytes,3,opt,name=partNumber,proto3" json:"partNumber,omitempty"` + SchemaVersion uint32 `protobuf:"varint,4,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *Product) Reset() { *m = Product{} } @@ -82,6 +83,13 @@ func (m *Product) GetPartNumber() string { return "" } +func (m *Product) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*Product)(nil), "zigbeealliance.distributedcomplianceledger.model.Product") } @@ -91,21 +99,23 @@ func init() { } var fileDescriptor_a2362e9df72af44d = []byte{ - // 220 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0xab, 0xca, 0x4c, 0x4f, - 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, - 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, - 0xa7, 0x16, 0xe9, 0xe7, 0xe6, 0xa7, 0xa4, 0xe6, 0xe8, 0x17, 0x14, 0xe5, 0xa7, 0x94, 0x26, 0x97, - 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x19, 0xa0, 0xea, 0xd7, 0xc3, 0xa3, 0x5f, 0x0f, 0xac, - 0x5f, 0xc9, 0x9f, 0x8b, 0x3d, 0x00, 0x62, 0x84, 0x90, 0x00, 0x17, 0x73, 0x41, 0x66, 0x8a, 0x04, - 0xa3, 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x88, 0x29, 0x24, 0xc4, 0xc5, 0x92, 0x97, 0x98, 0x9b, 0x2a, - 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0x66, 0x0b, 0xc9, 0x71, 0x71, 0x15, 0x24, 0x16, 0x95, - 0xf8, 0x95, 0xe6, 0x26, 0xa5, 0x16, 0x49, 0x30, 0x83, 0x65, 0x90, 0x44, 0x9c, 0x12, 0x4e, 0x3c, - 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, - 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x2d, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, - 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0xe2, 0x4e, 0x5d, 0x6c, 0x1e, 0xd5, 0x45, 0xb8, 0x54, 0x17, 0xea, - 0xd5, 0x0a, 0xa8, 0x67, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x7e, 0x35, 0x06, 0x04, - 0x00, 0x00, 0xff, 0xff, 0x00, 0xaf, 0x53, 0x85, 0x2d, 0x01, 0x00, 0x00, + // 245 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xbd, 0x4a, 0xc4, 0x40, + 0x14, 0x85, 0x33, 0xee, 0xaa, 0x38, 0xb0, 0x20, 0x53, 0xa5, 0x1a, 0x82, 0x58, 0xa4, 0x49, 0x22, + 0xd8, 0x5b, 0x58, 0x58, 0x8a, 0xa4, 0xb0, 0xb0, 0x72, 0x7e, 0x2e, 0xd9, 0x81, 0x4c, 0x66, 0x98, + 0x1f, 0x50, 0x9f, 0xc2, 0xc7, 0xb2, 0xdc, 0xd2, 0x52, 0x92, 0x17, 0x11, 0x27, 0x0b, 0x1a, 0x90, + 0xed, 0x0e, 0xe7, 0xf2, 0x5d, 0x38, 0x1f, 0xbe, 0x79, 0x53, 0x1d, 0x07, 0x60, 0x7d, 0xaf, 0xd8, + 0x20, 0xa0, 0x91, 0xca, 0x07, 0xa7, 0x78, 0x0c, 0x20, 0x85, 0xd1, 0x76, 0x6e, 0x7b, 0x90, 0x1d, + 0xb8, 0x46, 0x1b, 0x09, 0x7d, 0x63, 0x9d, 0x91, 0x51, 0x84, 0xda, 0x3a, 0x13, 0x0c, 0xb9, 0x5a, + 0xf2, 0xf5, 0x01, 0xbe, 0x4e, 0xfc, 0x45, 0xc4, 0xa7, 0x0f, 0xf3, 0x0b, 0x72, 0x8e, 0x57, 0x56, + 0xc9, 0x1c, 0x15, 0xa8, 0x3c, 0x6e, 0x7f, 0x22, 0x21, 0x78, 0x3d, 0x30, 0x0d, 0xf9, 0x51, 0x81, + 0xca, 0xb3, 0x36, 0x65, 0x42, 0x31, 0xb6, 0xcc, 0x85, 0xfb, 0xa8, 0x39, 0xb8, 0x7c, 0x95, 0x2e, + 0x7f, 0x1a, 0x72, 0x89, 0x37, 0x5e, 0x6c, 0x41, 0xb3, 0x47, 0x70, 0x5e, 0x99, 0x21, 0x5f, 0x17, + 0xa8, 0xdc, 0xb4, 0xcb, 0xf2, 0xf6, 0xf9, 0x63, 0xa4, 0x68, 0x37, 0x52, 0xf4, 0x35, 0x52, 0xf4, + 0x3e, 0xd1, 0x6c, 0x37, 0xd1, 0xec, 0x73, 0xa2, 0xd9, 0xd3, 0x5d, 0xa7, 0xc2, 0x36, 0xf2, 0x5a, + 0x18, 0xdd, 0xcc, 0x6b, 0xaa, 0xff, 0x74, 0x54, 0xbf, 0x7b, 0xaa, 0xbd, 0x90, 0x97, 0xbd, 0x92, + 0xf0, 0x6a, 0xc1, 0xf3, 0x93, 0x64, 0xe4, 0xfa, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x9a, 0xa4, 0x88, + 0xb3, 0x53, 0x01, 0x00, 0x00, } func (m *Product) Marshal() (dAtA []byte, err error) { @@ -128,6 +138,11 @@ func (m *Product) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintProduct(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x20 + } if len(m.PartNumber) > 0 { i -= len(m.PartNumber) copy(dAtA[i:], m.PartNumber) @@ -178,6 +193,9 @@ func (m *Product) Size() (n int) { if l > 0 { n += 1 + l + sovProduct(uint64(l)) } + if m.SchemaVersion != 0 { + n += 1 + sovProduct(uint64(m.SchemaVersion)) + } return n } @@ -299,6 +317,25 @@ func (m *Product) Unmarshal(dAtA []byte) error { } m.PartNumber = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProduct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipProduct(dAtA[iNdEx:]) diff --git a/x/model/types/vendor_products.pb.go b/x/model/types/vendor_products.pb.go index 41bf1d9fb..55deacff0 100644 --- a/x/model/types/vendor_products.pb.go +++ b/x/model/types/vendor_products.pb.go @@ -23,8 +23,9 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type VendorProducts struct { - Vid int32 `protobuf:"varint,1,opt,name=vid,proto3" json:"vid,omitempty"` - Products []*Product `protobuf:"bytes,2,rep,name=products,proto3" json:"products,omitempty"` + Vid int32 `protobuf:"varint,1,opt,name=vid,proto3" json:"vid,omitempty"` + Products []*Product `protobuf:"bytes,2,rep,name=products,proto3" json:"products,omitempty"` + SchemaVersion uint32 `protobuf:"varint,3,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *VendorProducts) Reset() { *m = VendorProducts{} } @@ -74,6 +75,13 @@ func (m *VendorProducts) GetProducts() []*Product { return nil } +func (m *VendorProducts) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*VendorProducts)(nil), "zigbeealliance.distributedcomplianceledger.model.VendorProducts") } @@ -83,22 +91,23 @@ func init() { } var fileDescriptor_cccd801728ab4ad7 = []byte{ - // 228 bytes of a gzipped FileDescriptorProto + // 256 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0xab, 0xca, 0x4c, 0x4f, 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0xe7, 0xe6, 0xa7, 0xa4, 0xe6, 0xe8, 0x97, 0xa5, 0xe6, 0xa5, 0xe4, 0x17, 0xc5, 0x17, 0x14, 0xe5, 0xa7, 0x94, 0x26, 0x97, 0x14, 0xeb, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x19, 0xa0, 0x9a, 0xa3, 0x87, 0xc7, 0x1c, 0x3d, 0xb0, 0x39, 0x52, 0x76, 0x24, 0xdb, 0x0c, 0xb5, 0x12, - 0x62, 0xa3, 0x52, 0x25, 0x17, 0x5f, 0x18, 0xd8, 0x29, 0x01, 0x50, 0x97, 0x08, 0x09, 0x70, 0x31, - 0x97, 0x65, 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x06, 0x81, 0x98, 0x42, 0xa1, 0x5c, 0x1c, - 0x30, 0x77, 0x4a, 0x30, 0x29, 0x30, 0x6b, 0x70, 0x1b, 0x59, 0xea, 0x91, 0xea, 0x50, 0x3d, 0xa8, - 0xf9, 0x41, 0x70, 0xa3, 0x9c, 0x12, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, - 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, - 0xca, 0x2d, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0x62, 0x91, 0x2e, - 0x36, 0x0f, 0xea, 0x22, 0xac, 0xd2, 0x85, 0x7a, 0xb1, 0x02, 0xea, 0xc9, 0x92, 0xca, 0x82, 0xd4, - 0xe2, 0x24, 0x36, 0xb0, 0x1f, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf6, 0xc0, 0x77, 0xf1, - 0x9f, 0x01, 0x00, 0x00, + 0x62, 0xa3, 0xd2, 0x7c, 0x46, 0x2e, 0xbe, 0x30, 0xb0, 0x5b, 0x02, 0xa0, 0x4e, 0x11, 0x12, 0xe0, + 0x62, 0x2e, 0xcb, 0x4c, 0x91, 0x60, 0x54, 0x60, 0xd4, 0x60, 0x0d, 0x02, 0x31, 0x85, 0x42, 0xb9, + 0x38, 0x60, 0x0e, 0x95, 0x60, 0x52, 0x60, 0xd6, 0xe0, 0x36, 0xb2, 0xd4, 0x23, 0xd5, 0xa5, 0x7a, + 0x50, 0xf3, 0x83, 0xe0, 0x46, 0x09, 0xa9, 0x70, 0xf1, 0x16, 0x27, 0x67, 0xa4, 0xe6, 0x26, 0x86, + 0xa5, 0x16, 0x15, 0x67, 0xe6, 0xe7, 0x49, 0x30, 0x2b, 0x30, 0x6a, 0xf0, 0x06, 0xa1, 0x0a, 0x3a, + 0x25, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, + 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x5b, 0x7a, 0x66, 0x49, + 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xc4, 0x39, 0xba, 0xd8, 0xc2, 0x41, 0x17, 0xe1, + 0x20, 0x5d, 0x68, 0x48, 0x54, 0x40, 0xc3, 0xa2, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x1c, + 0x14, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x8d, 0x22, 0xbe, 0xc6, 0x01, 0x00, 0x00, } func (m *VendorProducts) Marshal() (dAtA []byte, err error) { @@ -121,6 +130,11 @@ func (m *VendorProducts) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintVendorProducts(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x18 + } if len(m.Products) > 0 { for iNdEx := len(m.Products) - 1; iNdEx >= 0; iNdEx-- { { @@ -169,6 +183,9 @@ func (m *VendorProducts) Size() (n int) { n += 1 + l + sovVendorProducts(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovVendorProducts(uint64(m.SchemaVersion)) + } return n } @@ -260,6 +277,25 @@ func (m *VendorProducts) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVendorProducts + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipVendorProducts(dAtA[iNdEx:]) diff --git a/x/pki/client/cli/tx_add_noc_x_509_cert.go b/x/pki/client/cli/tx_add_noc_x_509_cert.go index 00a637df9..db1273f5a 100644 --- a/x/pki/client/cli/tx_add_noc_x_509_cert.go +++ b/x/pki/client/cli/tx_add_noc_x_509_cert.go @@ -19,7 +19,6 @@ var _ = strconv.Itoa(0) func CmdAddNocX509IcaCert() *cobra.Command { var ( certSchemaVersion uint32 - schemaVersion uint32 ) cmd := &cobra.Command{ Use: "add-noc-x509-ica-cert", @@ -40,7 +39,6 @@ func CmdAddNocX509IcaCert() *cobra.Command { clientCtx.GetFromAddress().String(), cert, certSchemaVersion, - schemaVersion, ) // validate basic will be called in GenerateOrBroadcastTxCLI err = tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) @@ -54,8 +52,7 @@ func CmdAddNocX509IcaCert() *cobra.Command { cmd.Flags().StringP(FlagCertificate, FlagCertificateShortcut, "", "PEM encoded certificate (string or path to file containing data)") - cmd.Flags().Uint32Var(&certSchemaVersion, FlagCertificateSchemaVersion, 0, "Schema version of certificate") - cmd.Flags().Uint32Var(&schemaVersion, common.FlagSchemaVersion, 0, "Schema version") + cmd.Flags().Uint32Var(&certSchemaVersion, common.FlagSchemaVersion, 0, "Schema version of certificate") cli.AddTxFlagsToCmd(cmd) diff --git a/x/pki/client/cli/tx_add_noc_x_509_root_cert.go b/x/pki/client/cli/tx_add_noc_x_509_root_cert.go index b9edec499..deedcb619 100644 --- a/x/pki/client/cli/tx_add_noc_x_509_root_cert.go +++ b/x/pki/client/cli/tx_add_noc_x_509_root_cert.go @@ -18,7 +18,6 @@ var _ = strconv.Itoa(0) func CmdAddNocX509RootCert() *cobra.Command { var ( certSchemaVersion uint32 - schemaVersion uint32 ) cmd := &cobra.Command{ Use: "add-noc-x509-root-cert", @@ -39,7 +38,6 @@ func CmdAddNocX509RootCert() *cobra.Command { clientCtx.GetFromAddress().String(), cert, certSchemaVersion, - schemaVersion, ) // validate basic will be called in GenerateOrBroadcastTxCLI err = tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) @@ -53,8 +51,7 @@ func CmdAddNocX509RootCert() *cobra.Command { cmd.Flags().StringP(FlagCertificate, FlagCertificateShortcut, "", "PEM encoded certificate (string or path to file containing data)") - cmd.Flags().Uint32Var(&certSchemaVersion, FlagCertificateSchemaVersion, 0, "Schema version of certificate") - cmd.Flags().Uint32Var(&schemaVersion, common.FlagSchemaVersion, 0, "Schema version") + cmd.Flags().Uint32Var(&certSchemaVersion, common.FlagSchemaVersion, 0, "Schema version of certificate") cli.AddTxFlagsToCmd(cmd) diff --git a/x/pki/client/cli/tx_add_x_509_cert.go b/x/pki/client/cli/tx_add_x_509_cert.go index 5153f2198..d52387324 100644 --- a/x/pki/client/cli/tx_add_x_509_cert.go +++ b/x/pki/client/cli/tx_add_x_509_cert.go @@ -18,7 +18,6 @@ var _ = strconv.Itoa(0) func CmdAddX509Cert() *cobra.Command { var ( certSchemaVersion uint32 - schemaVersion uint32 ) cmd := &cobra.Command{ @@ -41,7 +40,6 @@ func CmdAddX509Cert() *cobra.Command { clientCtx.GetFromAddress().String(), cert, certSchemaVersion, - schemaVersion, ) // validate basic will be called in GenerateOrBroadcastTxCLI err = tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) @@ -55,8 +53,7 @@ func CmdAddX509Cert() *cobra.Command { cmd.Flags().StringP(FlagCertificate, FlagCertificateShortcut, "", "PEM encoded certificate (string or path to file containing data)") - cmd.Flags().Uint32Var(&certSchemaVersion, FlagCertificateSchemaVersion, 0, "Schema version of certificate") - cmd.Flags().Uint32Var(&schemaVersion, common.FlagSchemaVersion, 0, "Schema version") + cmd.Flags().Uint32Var(&certSchemaVersion, common.FlagSchemaVersion, 0, "Schema version of certificate") cli.AddTxFlagsToCmd(cmd) diff --git a/x/pki/client/cli/tx_propose_add_x_509_root_cert.go b/x/pki/client/cli/tx_propose_add_x_509_root_cert.go index 803258fa4..3f7e86d28 100644 --- a/x/pki/client/cli/tx_propose_add_x_509_root_cert.go +++ b/x/pki/client/cli/tx_propose_add_x_509_root_cert.go @@ -30,11 +30,10 @@ func CmdProposeAddX509RootCert() *cobra.Command { if err != nil { return err } - vid := viper.GetInt32(FlagVid) + vid := viper.GetInt32(FlagVid) info := viper.GetString(FlagInfo) - certSchemaVersion := viper.GetUint32(FlagCertificateSchemaVersion) - schemaVersion := viper.GetUint32(common.FlagSchemaVersion) + certSchemaVersion := viper.GetUint32(common.FlagSchemaVersion) msg := types.NewMsgProposeAddX509RootCert( clientCtx.GetFromAddress().String(), @@ -42,7 +41,6 @@ func CmdProposeAddX509RootCert() *cobra.Command { info, vid, certSchemaVersion, - schemaVersion, ) // validate basic will be called in GenerateOrBroadcastTxCLI err = tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) @@ -58,8 +56,7 @@ func CmdProposeAddX509RootCert() *cobra.Command { "PEM encoded certificate (string or path to file containing data)") cmd.Flags().String(FlagInfo, "", FlagInfoUsage) cmd.Flags().Int32(FlagVid, 0, "Model vendor ID (positive non-zero uint16)") - cmd.Flags().Uint32(FlagCertificateSchemaVersion, 0, "Schema version of certificate") - cmd.Flags().Uint32(common.FlagSchemaVersion, 0, "Schema version") + cmd.Flags().Uint32(common.FlagSchemaVersion, 0, "Schema version of certificate") cli.AddTxFlagsToCmd(cmd) diff --git a/x/pki/client/cli/tx_propose_revoke_x_509_root_cert.go b/x/pki/client/cli/tx_propose_revoke_x_509_root_cert.go index 50ec2c9e6..8616b6864 100644 --- a/x/pki/client/cli/tx_propose_revoke_x_509_root_cert.go +++ b/x/pki/client/cli/tx_propose_revoke_x_509_root_cert.go @@ -9,7 +9,6 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" "github.com/zigbee-alliance/distributed-compliance-ledger/utils/cli" - "github.com/zigbee-alliance/distributed-compliance-ledger/x/common" "github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types" ) @@ -33,7 +32,6 @@ func CmdProposeRevokeX509RootCert() *cobra.Command { info := viper.GetString(FlagInfo) serialNumber := viper.GetString(FlagSerialNumber) revokeChild := viper.GetBool(FlagRevokeChild) - schemaVersion := viper.GetUint32(common.FlagSchemaVersion) msg := types.NewMsgProposeRevokeX509RootCert( clientCtx.GetFromAddress().String(), @@ -42,7 +40,6 @@ func CmdProposeRevokeX509RootCert() *cobra.Command { serialNumber, revokeChild, info, - schemaVersion, ) // validate basic will be called in GenerateOrBroadcastTxCLI err = tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) @@ -59,7 +56,7 @@ func CmdProposeRevokeX509RootCert() *cobra.Command { cmd.Flags().StringP(FlagSerialNumber, FlagSerialNumberShortcut, "", "Certificate's serial number") cmd.Flags().StringP(FlagRevokeChild, FlagRevokeChildShortcut, "", "If flag is true then all the certificates in the subtree will be revoked as well - default is false") cmd.Flags().String(FlagInfo, "", FlagInfoUsage) - cmd.Flags().Uint32(common.FlagSchemaVersion, 0, "Schema version") + cli.AddTxFlagsToCmd(cmd) _ = cmd.MarkFlagRequired(FlagSubject) diff --git a/x/pki/client/cli/tx_reject_add_x_509_root_cert.go b/x/pki/client/cli/tx_reject_add_x_509_root_cert.go index 7bedc5092..0385a6d6a 100644 --- a/x/pki/client/cli/tx_reject_add_x_509_root_cert.go +++ b/x/pki/client/cli/tx_reject_add_x_509_root_cert.go @@ -9,7 +9,6 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" "github.com/zigbee-alliance/distributed-compliance-ledger/utils/cli" - "github.com/zigbee-alliance/distributed-compliance-ledger/x/common" "github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types" ) @@ -29,14 +28,12 @@ func CmdRejectAddX509RootCert() *cobra.Command { subject := viper.GetString(FlagSubject) subjectKeyID := viper.GetString(FlagSubjectKeyID) info := viper.GetString(FlagInfo) - schemaVersion := viper.GetUint32(common.FlagSchemaVersion) msg := types.NewMsgRejectAddX509RootCert( clientCtx.GetFromAddress().String(), subject, subjectKeyID, info, - schemaVersion, ) // validate basic will be called in GenerateOrBroadcastTxCLI err = tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) @@ -51,7 +48,7 @@ func CmdRejectAddX509RootCert() *cobra.Command { cmd.Flags().StringP(FlagSubject, FlagSubjectShortcut, "", "Certificate's subject") cmd.Flags().StringP(FlagSubjectKeyID, FlagSubjectKeyIDShortcut, "", "Certificate's subject key id (hex)") cmd.Flags().String(FlagInfo, "", FlagInfoUsage) - cmd.Flags().Uint32(common.FlagSchemaVersion, 0, "Schema version") + cli.AddTxFlagsToCmd(cmd) _ = cmd.MarkFlagRequired(FlagSubject) diff --git a/x/pki/client/cli/tx_revoke_noc_root_x_509_cert.go b/x/pki/client/cli/tx_revoke_noc_root_x_509_cert.go index 2ebe55c47..289a535f6 100644 --- a/x/pki/client/cli/tx_revoke_noc_root_x_509_cert.go +++ b/x/pki/client/cli/tx_revoke_noc_root_x_509_cert.go @@ -10,7 +10,6 @@ import ( "github.com/spf13/viper" "github.com/zigbee-alliance/distributed-compliance-ledger/utils/cli" - "github.com/zigbee-alliance/distributed-compliance-ledger/x/common" "github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types" ) @@ -34,7 +33,6 @@ func CmdRevokeNocX509RootCert() *cobra.Command { serialNumber := viper.GetString(FlagSerialNumber) revokeChild := viper.GetBool(FlagRevokeChild) infoArg := viper.GetString(FlagInfo) - schemaVersion := viper.GetUint32(common.FlagSchemaVersion) msg := types.NewMsgRevokeNocX509RootCert( clientCtx.GetFromAddress().String(), @@ -43,7 +41,6 @@ func CmdRevokeNocX509RootCert() *cobra.Command { serialNumber, infoArg, revokeChild, - schemaVersion, ) // validate basic will be called in GenerateOrBroadcastTxCLI err = tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) @@ -59,8 +56,8 @@ func CmdRevokeNocX509RootCert() *cobra.Command { cmd.Flags().StringP(FlagSubjectKeyID, FlagSubjectKeyIDShortcut, "", "Certificate's subject key id (hex)") cmd.Flags().StringP(FlagSerialNumber, FlagSerialNumberShortcut, "", "Certificate's serial number") cmd.Flags().StringP(FlagRevokeChild, FlagRevokeChildShortcut, "", "If flag is true then all the certificates in the subtree will be revoked as well - default is false") - cmd.Flags().Uint32(common.FlagSchemaVersion, 0, "Schema version") cmd.Flags().String(FlagInfo, "", FlagInfoUsage) + cli.AddTxFlagsToCmd(cmd) _ = cmd.MarkFlagRequired(FlagSubject) diff --git a/x/pki/client/cli/tx_revoke_noc_x_509_cert.go b/x/pki/client/cli/tx_revoke_noc_x_509_cert.go index 8bad187b1..c45e8cd00 100644 --- a/x/pki/client/cli/tx_revoke_noc_x_509_cert.go +++ b/x/pki/client/cli/tx_revoke_noc_x_509_cert.go @@ -10,7 +10,6 @@ import ( "github.com/spf13/viper" "github.com/zigbee-alliance/distributed-compliance-ledger/utils/cli" - "github.com/zigbee-alliance/distributed-compliance-ledger/x/common" "github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types" ) @@ -34,7 +33,6 @@ func CmdRevokeNocX509IcaCert() *cobra.Command { serialNumber := viper.GetString(FlagSerialNumber) revokeChild := viper.GetBool(FlagRevokeChild) infoArg := viper.GetString(FlagInfo) - schemaVersion := viper.GetUint32(common.FlagSchemaVersion) msg := types.NewMsgRevokeNocX509IcaCert( clientCtx.GetFromAddress().String(), @@ -43,7 +41,6 @@ func CmdRevokeNocX509IcaCert() *cobra.Command { serialNumber, infoArg, revokeChild, - schemaVersion, ) // validate basic will be called in GenerateOrBroadcastTxCLI err = tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) @@ -60,7 +57,7 @@ func CmdRevokeNocX509IcaCert() *cobra.Command { cmd.Flags().StringP(FlagSerialNumber, FlagSerialNumberShortcut, "", "Certificate's serial number") cmd.Flags().StringP(FlagRevokeChild, FlagRevokeChildShortcut, "", "If flag is true then all the certificates in the subtree will be revoked as well - default is false") cmd.Flags().String(FlagInfo, "", FlagInfoUsage) - cmd.Flags().Uint32(common.FlagSchemaVersion, 0, "Schema version") + cli.AddTxFlagsToCmd(cmd) _ = cmd.MarkFlagRequired(FlagSubject) diff --git a/x/pki/client/cli/tx_revoke_x_509_cert.go b/x/pki/client/cli/tx_revoke_x_509_cert.go index 080cf8452..53c5a0e90 100644 --- a/x/pki/client/cli/tx_revoke_x_509_cert.go +++ b/x/pki/client/cli/tx_revoke_x_509_cert.go @@ -9,7 +9,6 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" "github.com/zigbee-alliance/distributed-compliance-ledger/utils/cli" - "github.com/zigbee-alliance/distributed-compliance-ledger/x/common" "github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types" ) @@ -33,7 +32,6 @@ func CmdRevokeX509Cert() *cobra.Command { serialNumber := viper.GetString(FlagSerialNumber) revokeChild := viper.GetBool(FlagRevokeChild) infoArg := viper.GetString(FlagInfo) - schemaVersion := viper.GetUint32(common.FlagSchemaVersion) msg := types.NewMsgRevokeX509Cert( clientCtx.GetFromAddress().String(), @@ -42,7 +40,6 @@ func CmdRevokeX509Cert() *cobra.Command { serialNumber, revokeChild, infoArg, - schemaVersion, ) // validate basic will be called in GenerateOrBroadcastTxCLI err = tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) @@ -59,7 +56,7 @@ func CmdRevokeX509Cert() *cobra.Command { cmd.Flags().StringP(FlagSerialNumber, FlagSerialNumberShortcut, "", "Certificate's serial number") cmd.Flags().StringP(FlagRevokeChild, FlagRevokeChildShortcut, "", "If flag is true then all the certificates in the subtree will be revoked as well - default is false") cmd.Flags().String(FlagInfo, "", FlagInfoUsage) - cmd.Flags().Uint32(common.FlagSchemaVersion, 0, "Schema version") + cli.AddTxFlagsToCmd(cmd) _ = cmd.MarkFlagRequired(FlagSubject) diff --git a/x/pki/handler_add_noc_cert_test.go b/x/pki/handler_add_noc_cert_test.go index 1a05e4a02..9c1464e19 100644 --- a/x/pki/handler_add_noc_cert_test.go +++ b/x/pki/handler_add_noc_cert_test.go @@ -16,7 +16,7 @@ import ( func TestHandler_AddNocX509Cert_SenderNotVendor(t *testing.T) { setup := Setup(t) - addNocX509Cert := types.NewMsgAddNocX509IcaCert(setup.Trustee1.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert := types.NewMsgAddNocX509IcaCert(setup.Trustee1.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509Cert) require.ErrorIs(t, err, sdkerrors.ErrUnauthorized) @@ -33,7 +33,7 @@ func TestHandler_AddNocX509Cert_AddNew(t *testing.T) { addNocRootCertificate(setup, accAddress, testconstants.NocRootCert1, vid) // add the new NOC certificate - nocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + nocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, nocX509Cert) require.NoError(t, err) @@ -100,10 +100,10 @@ func TestHandler_AddNocX509Cert_Renew(t *testing.T) { ) newNocCertificate.SerialNumber = testconstants.TestSerialNumber - setup.Keeper.AddApprovedCertificate(setup.Ctx, newNocCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, newNocCertificate) setup.Keeper.AddApprovedCertificateBySubjectKeyID(setup.Ctx, newNocCertificate) setup.Keeper.AddApprovedCertificateBySubject(setup.Ctx, newNocCertificate.Subject, newNocCertificate.SubjectKeyId) - setup.Keeper.AddNocIcaCertificate(setup.Ctx, newNocCertificate, testconstants.SchemaVersion) + setup.Keeper.AddNocIcaCertificate(setup.Ctx, newNocCertificate) uniqueCertificate := types.UniqueCertificate{ Issuer: newNocCertificate.Issuer, SerialNumber: newNocCertificate.SerialNumber, @@ -112,7 +112,7 @@ func TestHandler_AddNocX509Cert_Renew(t *testing.T) { setup.Keeper.SetUniqueCertificate(setup.Ctx, uniqueCertificate) // add the new NOC certificate - addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) @@ -159,7 +159,7 @@ func TestHandler_AddNocX509Cert_Root_VID_Does_Not_Equal_To_AccountVID(t *testing setup.AddAccount(newAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, 1111) // try to add NOC certificate - nocX509Cert := types.NewMsgAddNocX509IcaCert(newAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + nocX509Cert := types.NewMsgAddNocX509IcaCert(newAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, nocX509Cert) require.ErrorIs(t, err, pkitypes.ErrCertVidNotEqualAccountVid) } @@ -172,7 +172,7 @@ func TestHandler_AddNocX509Cert_ForInvalidCertificate(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, vid) // add x509 certificate - addX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.StubCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.StubCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.ErrorIs(t, err, pkitypes.ErrInvalidCertificate) } @@ -185,7 +185,7 @@ func TestHandler_AddXNoc509Cert_ForNocRootCertificate(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, vid) // try to add root certificate x509 certificate - addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.ErrorIs(t, err, pkitypes.ErrNonRootCertificateSelfSigned) } @@ -208,7 +208,7 @@ func TestHandler_AddXNoc509Cert_ForRootNonNocCertificate(t *testing.T) { proposeAndApproveRootCertificate(setup, setup.Trustee1, rootCertOptions) // try to add root certificate x509 certificate - addX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.IntermediateCertWithVid1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.IntermediateCertWithVid1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.ErrorIs(t, err, pkitypes.ErrInappropriateCertificateType) } @@ -221,7 +221,7 @@ func TestHandler_AddXNoc509Cert_WhenNocRootCertIsAbsent(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, vid) // add the new NOC certificate - addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509Cert) require.ErrorIs(t, err, pkitypes.ErrCertificateDoesNotExist) @@ -344,7 +344,7 @@ func TestHandler_AddNocX509Cert_CertificateExist(t *testing.T) { addNocRootCertificate(setup, accAddress, testconstants.NocRootCert1, vid) // add the existing certificate - setup.Keeper.AddApprovedCertificate(setup.Ctx, *tc.existingCert, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, *tc.existingCert) uniqueCertificate := types.UniqueCertificate{ Issuer: tc.existingCert.Issuer, SerialNumber: tc.existingCert.SerialNumber, @@ -352,7 +352,7 @@ func TestHandler_AddNocX509Cert_CertificateExist(t *testing.T) { } setup.Keeper.SetUniqueCertificate(setup.Ctx, uniqueCertificate) - addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), tc.nocCert, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), tc.nocCert, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509Cert) require.ErrorIs(t, err, tc.err) }) @@ -361,7 +361,7 @@ func TestHandler_AddNocX509Cert_CertificateExist(t *testing.T) { func addNocRootCertificate(setup *TestSetup, address sdk.AccAddress, pemCert string, vid int32) { //nolint:unparam // add the new NOC root certificate - addNocX509RootCert := types.NewMsgAddNocX509RootCert(address.String(), pemCert, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(address.String(), pemCert, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(setup.T, err) diff --git a/x/pki/handler_add_noc_root_cert_test.go b/x/pki/handler_add_noc_root_cert_test.go index 31b0cf7ff..b9d2a2804 100644 --- a/x/pki/handler_add_noc_root_cert_test.go +++ b/x/pki/handler_add_noc_root_cert_test.go @@ -14,7 +14,7 @@ import ( func TestHandler_AddNocX509RootCert_SenderNotVendor(t *testing.T) { setup := Setup(t) - addNocX509RootCert := types.NewMsgAddNocX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.Error(t, err) @@ -59,7 +59,7 @@ func TestHandler_AddNocX509RootCert_InvalidCertificate(t *testing.T) { setup := Setup(t) setup.AddAccount(accAddress, []dclauthtypes.AccountRole{tc.accountRole}, tc.accountVid) - addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), tc.nocRoorCert, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), tc.nocRoorCert, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.ErrorIs(t, err, tc.err) }) @@ -143,7 +143,7 @@ func TestHandler_AddNocX509RootCert_CertificateExist(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add the existing certificate - setup.Keeper.AddApprovedCertificate(setup.Ctx, *tc.existingCert, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, *tc.existingCert) uniqueCertificate := types.UniqueCertificate{ Issuer: tc.existingCert.Issuer, SerialNumber: tc.existingCert.SerialNumber, @@ -151,7 +151,7 @@ func TestHandler_AddNocX509RootCert_CertificateExist(t *testing.T) { } setup.Keeper.SetUniqueCertificate(setup.Ctx, uniqueCertificate) - addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), tc.nocRoorCert, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), tc.nocRoorCert, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.ErrorIs(t, err, tc.err) }) @@ -171,7 +171,7 @@ func TestHandler_AddNocX509RootCert_AddNew(t *testing.T) { newNocCertificate.Rejects = nil // add the new NOC root certificate - addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), newNocCertificate.PemCert, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), newNocCertificate.PemCert, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) @@ -221,8 +221,8 @@ func TestHandler_AddNocX509RootCert_Renew(t *testing.T) { nocRootCertificate.Approvals = nil nocRootCertificate.Rejects = nil - setup.Keeper.AddApprovedCertificate(setup.Ctx, nocRootCertificate, testconstants.SchemaVersion) - setup.Keeper.AddNocRootCertificate(setup.Ctx, nocRootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, nocRootCertificate) + setup.Keeper.AddNocRootCertificate(setup.Ctx, nocRootCertificate) uniqueCertificate := types.UniqueCertificate{ Issuer: nocRootCertificate.Issuer, SerialNumber: nocRootCertificate.SerialNumber, @@ -237,7 +237,7 @@ func TestHandler_AddNocX509RootCert_Renew(t *testing.T) { newNocCertificate.Rejects = nil // add the new NOC root certificate - addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), newNocCertificate.PemCert, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), newNocCertificate.PemCert, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) diff --git a/x/pki/handler_add_non_root_cert_test.go b/x/pki/handler_add_non_root_cert_test.go index 7b7882062..1e7393a0a 100644 --- a/x/pki/handler_add_non_root_cert_test.go +++ b/x/pki/handler_add_non_root_cert_test.go @@ -18,13 +18,13 @@ func TestHandler_AddX509Cert(t *testing.T) { // store root certificate rootCertificate := rootCertificate(setup.Trustee1) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) accAddress := GenerateAccAddress() setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, 1) // add x509 certificate - addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -82,7 +82,7 @@ func TestHandler_AddX509Cert_ForInvalidCertificate(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, 1) // add x509 certificate - addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), testconstants.StubCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), testconstants.StubCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.ErrorIs(t, err, pkitypes.ErrInvalidCertificate) } @@ -94,7 +94,7 @@ func TestHandler_AddX509Cert_ForRootCertificate(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, 1) // add root certificate as leaf x509 certificate - addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), testconstants.RootCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), testconstants.RootCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.ErrorIs(t, err, pkitypes.ErrNonRootCertificateSelfSigned) } @@ -104,13 +104,13 @@ func TestHandler_AddX509Cert_ForDuplicate(t *testing.T) { // store root certificate rootCertificate := rootCertificate(setup.Trustee1) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) accAddress := GenerateAccAddress() setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, 1) // store intermediate certificate - addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -124,7 +124,7 @@ func TestHandler_AddX509Cert_ForExistingNocCertificate(t *testing.T) { // store root certificate rootCertificate := rootCertificate(setup.Trustee1) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) vendorAccAddress := GenerateAccAddress() setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) @@ -134,8 +134,8 @@ func TestHandler_AddX509Cert_ForExistingNocCertificate(t *testing.T) { nocCertificate.SerialNumber = testconstants.TestSerialNumber nocCertificate.IsNoc = true - setup.Keeper.AddApprovedCertificate(setup.Ctx, nocCertificate, testconstants.SchemaVersion) - setup.Keeper.AddNocIcaCertificate(setup.Ctx, nocCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, nocCertificate) + setup.Keeper.AddNocIcaCertificate(setup.Ctx, nocCertificate) uniqueCertificate := types.UniqueCertificate{ Issuer: nocCertificate.Issuer, SerialNumber: nocCertificate.SerialNumber, @@ -144,7 +144,7 @@ func TestHandler_AddX509Cert_ForExistingNocCertificate(t *testing.T) { setup.Keeper.SetUniqueCertificate(setup.Ctx, uniqueCertificate) // store intermediate certificate - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.ErrorIs(t, err, pkitypes.ErrInappropriateCertificateType) } @@ -157,10 +157,10 @@ func TestHandler_AddX509Cert_NoRootCert(t *testing.T) { // add intermediate certificate intermediateCertificate := intermediateCertificate(vendorAccAddress) - setup.Keeper.AddApprovedCertificate(setup.Ctx, intermediateCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, intermediateCertificate) // add leaf x509 certificate - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.ErrorIs(t, err, pkitypes.ErrInvalidCertificate) } @@ -172,12 +172,12 @@ func TestHandler_AddX509Cert_RootIsNoc(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.IntermediateCertWithVid1Vid) // Add NOC root certificate - addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.RootCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.RootCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) // add x509 certificate - addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addX509Cert) require.ErrorIs(t, err, pkitypes.ErrInappropriateCertificateType) } @@ -187,7 +187,7 @@ func TestHandler_AddX509Cert_ForDifferentSerialNumber(t *testing.T) { // store root certificate rootCertificate := rootCertificate(setup.Trustee1) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) vendorAccAddress := GenerateAccAddress() setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) @@ -199,10 +199,10 @@ func TestHandler_AddX509Cert_ForDifferentSerialNumber(t *testing.T) { setup.Ctx, uniqueCertificate(intermediateCertificate.Issuer, intermediateCertificate.SerialNumber), ) - setup.Keeper.AddApprovedCertificate(setup.Ctx, intermediateCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, intermediateCertificate) // store intermediate certificate second time - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -233,7 +233,7 @@ func TestHandler_AddX509Cert_ForAbsentDirectParentCert(t *testing.T) { setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add intermediate x509 certificate - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.ErrorIs(t, err, pkitypes.ErrCertificateDoesNotExist) } @@ -245,13 +245,13 @@ func TestHandler_AddX509Cert_ForFailedCertificateVerification(t *testing.T) { invalidRootCertificate := types.NewRootCertificate(testconstants.StubCertPem, testconstants.RootSubject, testconstants.RootSubjectAsText, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, setup.Trustee1.String(), []*types.Grant{}, []*types.Grant{}, testconstants.Vid, testconstants.SchemaVersion) - setup.Keeper.AddApprovedCertificate(setup.Ctx, invalidRootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, invalidRootCertificate) vendorAccAddress := GenerateAccAddress() setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add intermediate x509 certificate - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.ErrorIs(t, err, pkitypes.ErrInvalidCertificate) } @@ -267,12 +267,12 @@ func TestHandler_AddX509Cert_ForTree(t *testing.T) { setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add intermediate x509 certificate - addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIntermediateX509Cert) require.NoError(t, err) // add leaf x509 certificate - addLeafX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addLeafX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertPem, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addLeafX509Cert) require.NoError(t, err) @@ -319,14 +319,14 @@ func TestHandler_AddX509Cert_EachChildCertRefersToTwoParentCerts(t *testing.T) { // store root certificate rootCert := rootCertificate(setup.Trustee1) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCert, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCert) setup.Keeper.SetUniqueCertificate(setup.Ctx, uniqueCertificate(rootCert.Subject, rootCert.SerialNumber)) // store second root certificate rootCert = rootCertificate(setup.Trustee1) rootCert.SerialNumber = SerialNumber - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCert, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCert) setup.Keeper.SetUniqueCertificate(setup.Ctx, uniqueCertificate(rootCert.Subject, rootCert.SerialNumber)) vendorAccAddress := GenerateAccAddress() @@ -336,7 +336,7 @@ func TestHandler_AddX509Cert_EachChildCertRefersToTwoParentCerts(t *testing.T) { intermediateCertificate := intermediateCertificate(vendorAccAddress) intermediateCertificate.SerialNumber = SerialNumber - setup.Keeper.AddApprovedCertificate(setup.Ctx, intermediateCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, intermediateCertificate) setup.Keeper.SetUniqueCertificate( setup.Ctx, uniqueCertificate(intermediateCertificate.Issuer, intermediateCertificate.SerialNumber), @@ -351,12 +351,12 @@ func TestHandler_AddX509Cert_EachChildCertRefersToTwoParentCerts(t *testing.T) { setup.Keeper.SetChildCertificates(setup.Ctx, rootChildCertificates) // store second intermediate certificate (it refers to two parent certificates) - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) // store leaf certificate (it refers to two parent certificates) - addX509Cert = types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert = types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertPem, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -402,7 +402,7 @@ func TestHandler_AddX509Cert_ByNotOwnerButSameVendor(t *testing.T) { // store root certificate rootCertificate := rootCertificate(setup.Trustee1) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) // add first vendor account with VID = 1 vendorAccAddress1 := GenerateAccAddress() @@ -411,7 +411,7 @@ func TestHandler_AddX509Cert_ByNotOwnerButSameVendor(t *testing.T) { // Store an intermediate certificate with the first vendor account as the owner intermediateCertificate := intermediateCertificate(vendorAccAddress1) intermediateCertificate.SerialNumber = SerialNumber - setup.Keeper.AddApprovedCertificate(setup.Ctx, intermediateCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, intermediateCertificate) setup.Keeper.AddApprovedCertificateBySubjectKeyID(setup.Ctx, intermediateCertificate) setup.Keeper.SetUniqueCertificate( setup.Ctx, @@ -423,7 +423,7 @@ func TestHandler_AddX509Cert_ByNotOwnerButSameVendor(t *testing.T) { setup.AddAccount(vendorAccAddress2, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add an intermediate certificate with the same subject and SKID by second vendor account - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress2.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress2.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) } @@ -433,7 +433,7 @@ func TestHandler_AddX509Cert_ByOtherVendor(t *testing.T) { // store root certificate rootCertificate := rootCertificate(setup.Trustee1) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) // add first vendor account with VID = 1 vendorAccAddress1 := GenerateAccAddress() @@ -442,7 +442,7 @@ func TestHandler_AddX509Cert_ByOtherVendor(t *testing.T) { // Store an intermediate certificate with the first vendor account as the owner intermediateCertificate := intermediateCertificate(vendorAccAddress1) intermediateCertificate.SerialNumber = SerialNumber - setup.Keeper.AddApprovedCertificate(setup.Ctx, intermediateCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, intermediateCertificate) setup.Keeper.AddApprovedCertificateBySubjectKeyID(setup.Ctx, intermediateCertificate) setup.Keeper.SetUniqueCertificate( setup.Ctx, @@ -454,7 +454,7 @@ func TestHandler_AddX509Cert_ByOtherVendor(t *testing.T) { setup.AddAccount(vendorAccAddress2, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.VendorID1) // add an intermediate certificate with the same subject and SKID by second vendor account - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress2.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress2.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.ErrorIs(t, err, sdkerrors.ErrUnauthorized) } @@ -467,7 +467,7 @@ func TestHandler_AddX509Cert_SenderNotVendor(t *testing.T) { proposeAndApproveRootCertificate(setup, setup.Trustee1, rootCertOptions) // add x509 certificate - addX509Cert := types.NewMsgAddX509Cert(setup.Trustee1.String(), testconstants.IntermediateCertWithVid1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(setup.Trustee1.String(), testconstants.IntermediateCertWithVid1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.ErrorIs(t, err, sdkerrors.ErrUnauthorized) } @@ -483,7 +483,7 @@ func TestHandler_AddX509Cert_VIDScopedRoot(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.PAACertWithNumericVidVid) // add x509 certificate - addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), testconstants.PAICertWithNumericPidVid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), testconstants.PAICertWithNumericPidVid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -535,7 +535,7 @@ func TestHandler_AddX509Cert_NonVIDScopedRoot(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, tc.accountVid) // add x509 certificate - addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), tc.childCert, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), tc.childCert, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -586,7 +586,7 @@ func TestHandler_AddX509Cert_VIDScopedRoot_NegativeCases(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, tc.accountVid) // add x509 certificate - addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), tc.childCert, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), tc.childCert, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.ErrorIs(t, err, tc.err) }) @@ -629,7 +629,7 @@ func TestHandler_AddX509Cert_NonVIDScopedRoot_NegativeCases(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, tc.accountVid) // add x509 certificate - addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), tc.childCert, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(accAddress.String(), tc.childCert, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.ErrorIs(t, err, tc.err) }) diff --git a/x/pki/handler_remove_noc_ica_cert_test.go b/x/pki/handler_remove_noc_ica_cert_test.go index f756a1366..bfda016c9 100644 --- a/x/pki/handler_remove_noc_ica_cert_test.go +++ b/x/pki/handler_remove_noc_ica_cert_test.go @@ -25,15 +25,15 @@ func TestHandler_RemoveNocX509IcaCert_BySubjectAndSKID(t *testing.T) { addNocRootCertificate(setup, vendorAccAddress, testconstants.NocRootCert1, vid) // Add two intermediate certificates - addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIcaCert) require.NoError(t, err) - addIcaCert = types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1Copy, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIcaCert = types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1Copy, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addIcaCert) require.NoError(t, err) // Add a leaf certificate - addIcaLeafCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocLeafCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIcaLeafCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocLeafCert1, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addIcaLeafCert) require.NoError(t, err) @@ -89,17 +89,17 @@ func TestHandler_RemoveNocX509IcaCert_BySerialNumber(t *testing.T) { addNocRootCertificate(setup, vendorAccAddress, testconstants.NocRootCert1, vid) // Add ICA certificates - addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIcaCert) require.NoError(t, err) // Add ICA certificates with sam subject and SKID but different serial number - addIcaCert = types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1Copy, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIcaCert = types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1Copy, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addIcaCert) require.NoError(t, err) // Add a leaf certificate - addIcaLeafCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocLeafCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIcaLeafCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocLeafCert1, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addIcaLeafCert) require.NoError(t, err) @@ -175,7 +175,7 @@ func TestHandler_RemoveNocX509IcaCert_RevokedAndApprovedCertificate(t *testing.T addNocRootCertificate(setup, vendorAccAddress, testconstants.NocRootCert1, vid) // Add an intermediate certificate - addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIcaCert) require.NoError(t, err) @@ -193,13 +193,12 @@ func TestHandler_RemoveNocX509IcaCert_RevokedAndApprovedCertificate(t *testing.T testconstants.NocCert1SerialNumber, testconstants.Info, false, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeX509Cert) require.NoError(t, err) // Add an intermediate certificate with new serial number - addIcaCert = types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1Copy, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIcaCert = types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1Copy, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addIcaCert) require.NoError(t, err) @@ -251,7 +250,7 @@ func TestHandler_RemoveNocX509IcaCert_RevokedCertificate(t *testing.T) { addNocRootCertificate(setup, vendorAccAddress, testconstants.NocRootCert1, vid) // Add an intermediate certificate - addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIcaCert) require.NoError(t, err) @@ -268,7 +267,6 @@ func TestHandler_RemoveNocX509IcaCert_RevokedCertificate(t *testing.T) { testconstants.NocCert1SerialNumber, testconstants.Info, false, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeX509Cert) require.NoError(t, err) @@ -325,7 +323,7 @@ func TestHandler_RemoveNocX509IcaCert_ByNotOwnerButSameVendor(t *testing.T) { setup.AddAccount(vendorAccAddress1, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add ICA certificate by fist vendor account - addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress1.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress1.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIcaCert) require.NoError(t, err) @@ -423,7 +421,7 @@ func TestHandler_RemoveNocX509IcaCert_ByOtherVendor(t *testing.T) { setup.AddAccount(vendorAccAddress1, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add x509 certificate by `setup.Trustee` - addX509Cert := types.NewMsgAddNocX509IcaCert(vendorAccAddress1.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddNocX509IcaCert(vendorAccAddress1.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -451,7 +449,7 @@ func TestHandler_RemoveNocX509IcaCert_SenderNotVendor(t *testing.T) { addNocRootCertificate(setup, vendorAccAddress, testconstants.NocRootCert1, vid) // add x509 certificate - addX509Cert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -496,7 +494,7 @@ func TestHandler_RemoveNocX509IcaCert_InvalidSerialNumber(t *testing.T) { // add NOC root certificate addNocRootCertificate(setup, vendorAccAddress, testconstants.NocRootCert1, vid) - addX509Cert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) diff --git a/x/pki/handler_remove_noc_root_cert_test.go b/x/pki/handler_remove_noc_root_cert_test.go index c0b53e6fb..89ac032c7 100644 --- a/x/pki/handler_remove_noc_root_cert_test.go +++ b/x/pki/handler_remove_noc_root_cert_test.go @@ -26,7 +26,7 @@ func TestHandler_RemoveNocX509RootCert_BySubjectAndSKID(t *testing.T) { addNocRootCertificate(setup, vendorAccAddress, testconstants.NocRootCert1Copy, vid) // Add two intermediate certificates - addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIcaCert) require.NoError(t, err) @@ -89,7 +89,7 @@ func TestHandler_RemoveNocX509RootCert_BySerialNumber(t *testing.T) { addNocRootCertificate(setup, vendorAccAddress, testconstants.NocRootCert1Copy, vid) // Add ICA certificates - addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIcaCert) require.NoError(t, err) @@ -186,7 +186,7 @@ func TestHandler_RemoveNocX509RootCert_RevokedAndApprovedCertificate(t *testing. addNocRootCertificate(setup, vendorAccAddress, testconstants.NocRootCert1, vid) // Add an intermediate certificate - addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIcaCert) require.NoError(t, err) @@ -203,7 +203,6 @@ func TestHandler_RemoveNocX509RootCert_RevokedAndApprovedCertificate(t *testing. testconstants.NocRootCert1SerialNumber, testconstants.Info, false, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeX509Cert) require.NoError(t, err) @@ -307,7 +306,7 @@ func TestHandler_RemoveNocX509RootCert_RevokedCertificate(t *testing.T) { addNocRootCertificate(setup, vendorAccAddress, testconstants.NocRootCert1Copy, vid) // Add an intermediate certificate - addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIcaCert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIcaCert) require.NoError(t, err) @@ -324,7 +323,6 @@ func TestHandler_RemoveNocX509RootCert_RevokedCertificate(t *testing.T) { "", testconstants.Info, false, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeX509Cert) require.NoError(t, err) diff --git a/x/pki/handler_remove_non_root_cert_test.go b/x/pki/handler_remove_non_root_cert_test.go index f28486299..bd43e5f09 100644 --- a/x/pki/handler_remove_non_root_cert_test.go +++ b/x/pki/handler_remove_non_root_cert_test.go @@ -30,17 +30,17 @@ func TestHandler_RemoveX509Cert_BySerialNumber(t *testing.T) { setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.RootCertWithVidVid) // Add intermediate certificates - addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateWithSameSubjectAndSKID1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateWithSameSubjectAndSKID1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIntermediateX509Cert) require.NoError(t, err) // Add intermediate certificates with sam subject and SKID but different serial number - addIntermediateX509Cert = types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateWithSameSubjectAndSKID2, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIntermediateX509Cert = types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateWithSameSubjectAndSKID2, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addIntermediateX509Cert) require.NoError(t, err) // Add a leaf certificate - addLeafX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertWithSameSubjectAndSKID, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addLeafX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertWithSameSubjectAndSKID, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addLeafX509Cert) require.NoError(t, err) @@ -114,7 +114,7 @@ func TestHandler_RemoveX509Cert_RevokedAndApprovedCertificate(t *testing.T) { setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.RootCertWithVidVid) // Add an intermediate certificate - addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateWithSameSubjectAndSKID1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateWithSameSubjectAndSKID1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIntermediateX509Cert) require.NoError(t, err) @@ -135,7 +135,7 @@ func TestHandler_RemoveX509Cert_RevokedAndApprovedCertificate(t *testing.T) { require.NoError(t, err) // Add an intermediate certificate with new serial number - addIntermediateX509Cert = types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateWithSameSubjectAndSKID2, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIntermediateX509Cert = types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateWithSameSubjectAndSKID2, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addIntermediateX509Cert) require.NoError(t, err) @@ -188,7 +188,7 @@ func TestHandler_RemoveX509Cert_RevokedCertificate(t *testing.T) { setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.RootCertWithVidVid) // Add two intermediate certificates again - addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIntermediateX509Cert) require.NoError(t, err) @@ -205,7 +205,6 @@ func TestHandler_RemoveX509Cert_RevokedCertificate(t *testing.T) { testconstants.IntermediateSerialNumber, false, testconstants.Info, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeX509Cert) require.NoError(t, err) @@ -260,7 +259,7 @@ func TestHandler_RemoveX509Cert_EmptyCertificatesList(t *testing.T) { setup := Setup(t) rootCertificate := rootCertificate(setup.Trustee1) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) // Add vendor account vendorAccAddress := GenerateAccAddress() @@ -286,14 +285,14 @@ func TestHandler_RemoveX509Cert_ByNotOwnerButSameVendor(t *testing.T) { // store root certificate rootCertificate := rootCertificate(setup.Trustee1) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) // add first vendor account with VID = 1 vendorAccAddress1 := GenerateAccAddress() setup.AddAccount(vendorAccAddress1, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add x509 certificate by fist vendor account - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress1.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress1.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -336,14 +335,14 @@ func TestHandler_RemoveX509Cert_ByOtherVendor(t *testing.T) { // store root certificate rootCertificate := rootCertificate(setup.Trustee1) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) // add fist vendor account with VID = 1 vendorAccAddress1 := GenerateAccAddress() setup.AddAccount(vendorAccAddress1, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add x509 certificate by `setup.Trustee` - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress1.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress1.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -371,7 +370,7 @@ func TestHandler_RemoveX509Cert_SenderNotVendor(t *testing.T) { setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.RootCertWithVidVid) // add x509 certificate - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertWithVid1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertWithVid1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -409,7 +408,7 @@ func TestHandler_RemoveX509Cert_InvalidSerialNumber(t *testing.T) { vendorAccAddress := GenerateAccAddress() setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -437,15 +436,15 @@ func TestHandler_RemoveX509Cert_BySubjectAndSKID(t *testing.T) { setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.RootCertWithVidVid) // Add two intermediate certificates - addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateWithSameSubjectAndSKID1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateWithSameSubjectAndSKID1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIntermediateX509Cert) require.NoError(t, err) - addIntermediateX509Cert = types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateWithSameSubjectAndSKID2, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIntermediateX509Cert = types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateWithSameSubjectAndSKID2, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addIntermediateX509Cert) require.NoError(t, err) // Add a leaf certificate - addLeafX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertWithSameSubjectAndSKID, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addLeafX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertWithSameSubjectAndSKID, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addLeafX509Cert) require.NoError(t, err) @@ -494,7 +493,7 @@ func TestHandler_RemoveX509Cert_ForNocIcaCertificate(t *testing.T) { addNocRootCertificate(setup, vendorAccAddress, testconstants.NocRootCert1, vid) // Add ICA certificate - addX509Cert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddNocX509IcaCert(vendorAccAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) diff --git a/x/pki/handler_revoke_noc_cert_test.go b/x/pki/handler_revoke_noc_cert_test.go index dcab6a7df..2345380b8 100644 --- a/x/pki/handler_revoke_noc_cert_test.go +++ b/x/pki/handler_revoke_noc_cert_test.go @@ -21,7 +21,7 @@ func TestHandler_RevokeNocX509Cert_SenderNotVendor(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add the new NOC root certificate - addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) @@ -32,7 +32,6 @@ func TestHandler_RevokeNocX509Cert_SenderNotVendor(t *testing.T) { testconstants.NocCert1SerialNumber, "", false, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeCert) @@ -53,7 +52,6 @@ func TestHandler_RevokeNocX509Cert_CertificateDoesNotExist(t *testing.T) { testconstants.NocCert1SerialNumber, "", false, - testconstants.SchemaVersion, ) _, err := setup.Handler(setup.Ctx, revokeCert) @@ -138,7 +136,7 @@ func TestHandler_RevokeNocX509Cert_CertificateExists(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add the existing certificate - setup.Keeper.AddApprovedCertificate(setup.Ctx, *tc.existingCert, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, *tc.existingCert) uniqueCertificate := types.UniqueCertificate{ Issuer: tc.existingCert.Issuer, SerialNumber: tc.existingCert.SerialNumber, @@ -153,7 +151,6 @@ func TestHandler_RevokeNocX509Cert_CertificateExists(t *testing.T) { testconstants.NocCert1SerialNumber, "", false, - testconstants.SchemaVersion, ) _, err := setup.Handler(setup.Ctx, revokeCert) require.ErrorIs(t, err, tc.err) @@ -168,22 +165,22 @@ func TestHandler_RevokeNocX509Cert_RevokeDefault(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add the first NOC root certificate - addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) // add the first NOC non-root certificate - addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) // add the second NOC non-root certificate - addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1Copy, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1Copy, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) // add the NOC leaf certificate - addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocLeafCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocLeafCert1, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) @@ -195,7 +192,6 @@ func TestHandler_RevokeNocX509Cert_RevokeDefault(t *testing.T) { "", testconstants.Info, false, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeCert) require.NoError(t, err) @@ -257,22 +253,22 @@ func TestHandler_RevokeNocX509Cert_RevokeWithChild(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add the first NOC root certificate - addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) // add the first NOC non-root certificate - addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) // add the second NOC non-root certificate - addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1Copy, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1Copy, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) // add the NOC leaf certificate - addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocLeafCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocLeafCert1, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) @@ -284,7 +280,6 @@ func TestHandler_RevokeNocX509Cert_RevokeWithChild(t *testing.T) { "", testconstants.Info, true, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeCert) require.NoError(t, err) @@ -359,22 +354,22 @@ func TestHandler_RevokeNocX509Cert_RevokeBySerialNumber(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add the first NOC root certificate - addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) // add the first NOC non-root certificate - addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) // add the second NOC non-root certificate - addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1Copy, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1Copy, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) // add the NOC leaf certificate - addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocLeafCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocLeafCert1, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) @@ -386,7 +381,6 @@ func TestHandler_RevokeNocX509Cert_RevokeBySerialNumber(t *testing.T) { testconstants.NocCert1SerialNumber, testconstants.Info, false, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeCert) require.NoError(t, err) @@ -448,22 +442,22 @@ func TestHandler_RevokeNocX509Cert_RevokeBySerialNumberAndWithChild(t *testing.T setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add the first NOC root certificate - addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.SchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.SchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) // add the first NOC non-root certificate - addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.SchemaVersion, testconstants.SchemaVersion) + addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.SchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) // add the second NOC non-root certificate - addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1Copy, testconstants.SchemaVersion, testconstants.SchemaVersion) + addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1Copy, testconstants.SchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) // add the NOC leaf certificate - addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocLeafCert1, testconstants.SchemaVersion, testconstants.SchemaVersion) + addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocLeafCert1, testconstants.SchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) @@ -475,7 +469,6 @@ func TestHandler_RevokeNocX509Cert_RevokeBySerialNumberAndWithChild(t *testing.T testconstants.NocCert1SerialNumber, testconstants.Info, true, - testconstants.CertSchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeCert) require.NoError(t, err) diff --git a/x/pki/handler_revoke_noc_root_cert_test.go b/x/pki/handler_revoke_noc_root_cert_test.go index 153a5a1e0..2315f0c2d 100644 --- a/x/pki/handler_revoke_noc_root_cert_test.go +++ b/x/pki/handler_revoke_noc_root_cert_test.go @@ -21,7 +21,7 @@ func TestHandler_RevokeNocX509RootCert_SenderNotVendor(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add the new NOC root certificate - addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) @@ -32,7 +32,6 @@ func TestHandler_RevokeNocX509RootCert_SenderNotVendor(t *testing.T) { testconstants.NocRootCert1SerialNumber, "", false, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeCert) @@ -53,7 +52,6 @@ func TestHandler_RevokeNocX509RootCert_CertificateDoesNotExist(t *testing.T) { testconstants.NocRootCert1SerialNumber, "", false, - testconstants.SchemaVersion, ) _, err := setup.Handler(setup.Ctx, revokeCert) @@ -138,7 +136,7 @@ func TestHandler_RevokeNocX509RootCert_CertificateExists(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add the existing certificate - setup.Keeper.AddApprovedCertificate(setup.Ctx, *tc.existingCert, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, *tc.existingCert) uniqueCertificate := types.UniqueCertificate{ Issuer: tc.existingCert.Issuer, SerialNumber: tc.existingCert.SerialNumber, @@ -153,7 +151,6 @@ func TestHandler_RevokeNocX509RootCert_CertificateExists(t *testing.T) { testconstants.NocRootCert1SerialNumber, "", false, - testconstants.SchemaVersion, ) _, err := setup.Handler(setup.Ctx, revokeCert) require.ErrorIs(t, err, tc.err) @@ -168,27 +165,27 @@ func TestHandler_RevokeNocX509RootCert_RevokeDefault(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add the first NOC root certificate - addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) // add the second NOC root certificate - addNocX509RootCert = types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1Copy, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert = types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1Copy, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) // add the third NOC root certificate - addNocX509RootCert = types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert2, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert = types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert2, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) // add the first NOC non-root certificate - addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) // add the second NOC non-root certificate - addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert2, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert = types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert2, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) @@ -200,7 +197,6 @@ func TestHandler_RevokeNocX509RootCert_RevokeDefault(t *testing.T) { "", testconstants.Info, false, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeCert) require.NoError(t, err) @@ -284,17 +280,17 @@ func TestHandler_RevokeNocX509RootCert_RevokeWithChild(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add the first NOC root certificate - addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) // add the second NOC root certificate - addNocX509RootCert = types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1Copy, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert = types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1Copy, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) // add the first NOC non-root certificate - addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) @@ -306,7 +302,6 @@ func TestHandler_RevokeNocX509RootCert_RevokeWithChild(t *testing.T) { "", testconstants.Info, true, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeCert) require.NoError(t, err) @@ -393,17 +388,17 @@ func TestHandler_RevokeNocX509RootCert_RevokeWithSerialNumber(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add the first NOC root certificate - addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) // add the second NOC root certificate - addNocX509RootCert = types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1Copy, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert = types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1Copy, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) // add the first NOC non-root certificate - addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) @@ -415,7 +410,6 @@ func TestHandler_RevokeNocX509RootCert_RevokeWithSerialNumber(t *testing.T) { testconstants.NocRootCert1SerialNumber, testconstants.Info, false, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeCert) require.NoError(t, err) @@ -492,17 +486,17 @@ func TestHandler_RevokeNocX509RootCert_RevokeWithSerialNumberAndChild(t *testing setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add the first NOC root certificate - addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) // add the second NOC root certificate - addNocX509RootCert = types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1Copy, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509RootCert = types.NewMsgAddNocX509RootCert(accAddress.String(), testconstants.NocRootCert1Copy, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509RootCert) require.NoError(t, err) // add the first NOC non-root certificate - addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addNocX509Cert) require.NoError(t, err) @@ -514,7 +508,6 @@ func TestHandler_RevokeNocX509RootCert_RevokeWithSerialNumberAndChild(t *testing testconstants.NocRootCert1SerialNumber, testconstants.Info, true, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeCert) require.NoError(t, err) diff --git a/x/pki/handler_revoke_non_root_cert_test.go b/x/pki/handler_revoke_non_root_cert_test.go index 2bc6714a3..91df3932a 100644 --- a/x/pki/handler_revoke_non_root_cert_test.go +++ b/x/pki/handler_revoke_non_root_cert_test.go @@ -28,7 +28,6 @@ func TestHandler_RevokeX509Cert_CertificateDoesNotExist(t *testing.T) { testconstants.IntermediateSerialNumber, false, testconstants.Info, - testconstants.SchemaVersion, ) _, err := setup.Handler(setup.Ctx, revokeX509Cert) require.Error(t, err) @@ -46,7 +45,7 @@ func TestHandler_RevokeX509Cert_CertificateDoesNotExistBySerialNumber(t *testing setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // Add intermediate certificate - addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIntermediateX509Cert) require.NoError(t, err) @@ -58,7 +57,6 @@ func TestHandler_RevokeX509Cert_CertificateDoesNotExistBySerialNumber(t *testing "invalid", false, testconstants.Info, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeX509Cert) require.Error(t, err) @@ -84,7 +82,6 @@ func TestHandler_RevokeX509Cert_ForRootCertificate(t *testing.T) { testconstants.RootSerialNumber, false, testconstants.Info, - testconstants.SchemaVersion, ) _, err := setup.Handler(setup.Ctx, revokeX509Cert) require.Error(t, err) @@ -103,12 +100,12 @@ func TestHandler_RevokeX509Cert_ForTree(t *testing.T) { setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add intermediate x509 certificate - addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIntermediateX509Cert) require.NoError(t, err) // add leaf x509 certificate - addLeafX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addLeafX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertPem, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addLeafX509Cert) require.NoError(t, err) @@ -126,7 +123,6 @@ func TestHandler_RevokeX509Cert_ForTree(t *testing.T) { "", true, testconstants.Info, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeX509Cert) require.NoError(t, err) @@ -184,14 +180,14 @@ func TestHandler_RevokeX509Cert_ByNotOwnerButSameVendor(t *testing.T) { // store root certificate rootCertificate := rootCertificate(setup.Trustee1) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) // add first vendor account with VID = 1 vendorAccAddress1 := GenerateAccAddress() setup.AddAccount(vendorAccAddress1, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add x509 certificate by first vendor account - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress1.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress1.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -207,7 +203,6 @@ func TestHandler_RevokeX509Cert_ByNotOwnerButSameVendor(t *testing.T) { testconstants.IntermediateSerialNumber, false, testconstants.Info, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeX509Cert) require.NoError(t, err) @@ -244,14 +239,14 @@ func TestHandler_RevokeX509Cert_ByOtherVendor(t *testing.T) { // store root certificate rootCertificate := rootCertificate(setup.Trustee1) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) // add first vendor account with VID = 1 vendorAccAddress1 := GenerateAccAddress() setup.AddAccount(vendorAccAddress1, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add x509 certificate by first vendor account - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress1.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress1.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -267,7 +262,6 @@ func TestHandler_RevokeX509Cert_ByOtherVendor(t *testing.T) { testconstants.IntermediateSerialNumber, false, testconstants.Info, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeX509Cert) require.Error(t, err) @@ -286,7 +280,7 @@ func TestHandler_RevokeX509Cert_SenderNotVendor(t *testing.T) { setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.RootCertWithVidVid) // add x509 certificate - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertWithVid1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertWithVid1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -297,7 +291,6 @@ func TestHandler_RevokeX509Cert_SenderNotVendor(t *testing.T) { testconstants.IntermediateSerialNumber, false, testconstants.Info, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, removeX509Cert) require.Error(t, err) @@ -309,14 +302,14 @@ func TestHandler_RevokeX509Cert(t *testing.T) { // store root certificate rootCertificate := rootCertificate(setup.Trustee1) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) // Add vendor account vendorAccAddress := GenerateAccAddress() setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add x509 certificate - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) @@ -336,7 +329,6 @@ func TestHandler_RevokeX509Cert(t *testing.T) { "", false, testconstants.Info, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeX509Cert) require.NoError(t, err) @@ -385,19 +377,19 @@ func TestHandler_RevokeX509Cert_BySerialNumber(t *testing.T) { setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // Add two intermediate certificates - addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIntermediateX509Cert) require.NoError(t, err) intermediateCertificate := intermediateCertificate(vendorAccAddress) intermediateCertificate.SerialNumber = SerialNumber - setup.Keeper.AddApprovedCertificate(setup.Ctx, intermediateCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, intermediateCertificate) setup.Keeper.AddApprovedCertificateBySubjectKeyID(setup.Ctx, intermediateCertificate) setup.Keeper.SetUniqueCertificate( setup.Ctx, uniqueCertificate(intermediateCertificate.Issuer, intermediateCertificate.SerialNumber), ) // Add a leaf certificate - addLeafX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addLeafX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertPem, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addLeafX509Cert) require.NoError(t, err) @@ -415,7 +407,6 @@ func TestHandler_RevokeX509Cert_BySerialNumber(t *testing.T) { testconstants.IntermediateSerialNumber, false, testconstants.Info, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeX509Cert) require.NoError(t, err) @@ -451,7 +442,6 @@ func TestHandler_RevokeX509Cert_BySerialNumber(t *testing.T) { SerialNumber, true, testconstants.Info, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, revokeX509Cert) require.NoError(t, err) diff --git a/x/pki/handler_test.go b/x/pki/handler_test.go index 61592e4b0..425b478e4 100644 --- a/x/pki/handler_test.go +++ b/x/pki/handler_test.go @@ -147,7 +147,7 @@ func TestHandler_ProposeAddX509RootCert_ByNotTrustee(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{role}, 1) // propose x509 root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(accAddress.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(accAddress.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.ErrorIs(t, err, sdkerrors.ErrUnauthorized) } @@ -157,12 +157,12 @@ func TestHandler_ProposeAddAndRejectX509RootCert_ByTrustee(t *testing.T) { setup := Setup(t) // propose x509 root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) // reject x509 root certificate - rejectX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectX509RootCert) require.NoError(t, err) @@ -177,12 +177,12 @@ func TestHandler_ProposeAddAndRejectX509RootCert_ByAnotherTrustee(t *testing.T) setup := Setup(t) // propose x509 root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) // reject x509 root certificate - rejectX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectX509RootCert) require.NoError(t, err) @@ -207,9 +207,8 @@ func TestHandler_ProposeAddAndRejectX509RootCertWithApproval_ByTrustee(t *testin accAddress := GenerateAccAddress() setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Trustee}, 1) - var schemaVersion uint32 = 2 // propose x509 root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, schemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -220,7 +219,7 @@ func TestHandler_ProposeAddAndRejectX509RootCertWithApproval_ByTrustee(t *testin require.NoError(t, err) // reject x509 root certificate - rejectX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectX509RootCert) require.NoError(t, err) @@ -233,7 +232,6 @@ func TestHandler_ProposeAddAndRejectX509RootCertWithApproval_ByTrustee(t *testin require.Equal(t, testconstants.RootSubject, proposedCertificate.Subject) require.Equal(t, testconstants.RootSubjectKeyID, proposedCertificate.SubjectKeyId) require.Equal(t, testconstants.RootSerialNumber, proposedCertificate.SerialNumber) - require.Equal(t, schemaVersion, proposedCertificate.SchemaVersion) require.True(t, proposedCertificate.HasRejectFrom(setup.Trustee1.String())) require.True(t, proposedCertificate.HasApprovalFrom(setup.Trustee2.String())) @@ -246,7 +244,7 @@ func TestHandler_ProposeAddX509RootCert_ByTrustee(t *testing.T) { setup := Setup(t) // propose x509 root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -275,7 +273,7 @@ func TestHandler_ProposeAddX509RootCert_ForInvalidCertificate(t *testing.T) { setup := Setup(t) // propose x509 root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.StubCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.StubCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.Error(t, err) require.True(t, pkitypes.ErrInvalidCertificate.Is(err)) @@ -285,7 +283,7 @@ func TestHandler_ProposeAddX509RootCert_ForNonRootCertificate(t *testing.T) { setup := Setup(t) // propose x509 leaf certificate as root - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.LeafCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.LeafCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.Error(t, err) require.True(t, pkitypes.ErrInappropriateCertificateType.Is(err)) @@ -295,7 +293,7 @@ func TestHandler_ProposeAddX509RootCert_ProposedCertificateAlreadyExists(t *test setup := Setup(t) // propose adding of x509 root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -304,7 +302,7 @@ func TestHandler_ProposeAddX509RootCert_ProposedCertificateAlreadyExists(t *test setup.AddAccount(anotherAccount, []dclauthtypes.AccountRole{dclauthtypes.Trustee}, 1) // propose adding of the same x509 root certificate again - proposeAddX509RootCert = types.NewMsgProposeAddX509RootCert(anotherAccount.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert = types.NewMsgProposeAddX509RootCert(anotherAccount.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, proposeAddX509RootCert) require.Error(t, err) require.True(t, pkitypes.ErrProposedCertificateAlreadyExists.Is(err)) @@ -319,10 +317,10 @@ func TestHandler_ProposeAddX509RootCert_CertificateAlreadyExists(t *testing.T) { setup.Ctx, uniqueCertificate(rootCertificate.Subject, rootCertificate.SerialNumber), ) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) // propose adding of the same x509 root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.Error(t, err) require.True(t, pkitypes.ErrCertificateAlreadyExists.Is(err)) @@ -341,8 +339,8 @@ func TestHandler_ProposeAddX509RootCert_ForNocCertificate(t *testing.T) { nocRootCertificate.Approvals = nil nocRootCertificate.Rejects = nil - setup.Keeper.AddApprovedCertificate(setup.Ctx, nocRootCertificate, testconstants.SchemaVersion) - setup.Keeper.AddNocRootCertificate(setup.Ctx, nocRootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, nocRootCertificate) + setup.Keeper.AddNocRootCertificate(setup.Ctx, nocRootCertificate) uniqueCertificate := types.UniqueCertificate{ Issuer: nocRootCertificate.Issuer, SerialNumber: nocRootCertificate.SerialNumber, @@ -351,7 +349,7 @@ func TestHandler_ProposeAddX509RootCert_ForNocCertificate(t *testing.T) { setup.Keeper.SetUniqueCertificate(setup.Ctx, uniqueCertificate) // propose a new root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.True(t, pkitypes.ErrInappropriateCertificateType.Is(err)) } @@ -366,10 +364,10 @@ func TestHandler_ProposeAddX509RootCert_ForDifferentSerialNumber(t *testing.T) { setup.Ctx, uniqueCertificate(rootCertificate.Subject, rootCertificate.SerialNumber), ) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) // propose second root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -396,10 +394,10 @@ func TestHandler_ProposeAddX509RootCert_ForDifferentSerialNumberDifferentSigner( setup.Ctx, uniqueCertificate(rootCertificate.Subject, rootCertificate.SerialNumber), ) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) // propose second root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.Error(t, err) require.True(t, sdkerrors.ErrUnauthorized.Is(err)) @@ -413,7 +411,7 @@ func TestHandler_ApproveAddX509RootCert_ForNotEnoughApprovals(t *testing.T) { setup.AddAccount(nonTrustee, []dclauthtypes.AccountRole{dclauthtypes.Trustee}, 1) // propose x509 root certificate by account without trustee role - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(nonTrustee.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(nonTrustee.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -461,7 +459,7 @@ func TestHandler_TwoThirdApprovalsNeededForAddingRootCertification(t *testing.T) setup := Setup(t) // propose x509 root certificate by account without trustee role - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -514,7 +512,7 @@ func TestHandler_TwoThirdApprovalsNeededForRevokingRootCertification(t *testing. setup := Setup(t) // propose x509 root certificate by account without trustee role - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -547,7 +545,7 @@ func TestHandler_TwoThirdApprovalsNeededForRevokingRootCertification(t *testing. // Trustee1 proposes to revoke the certificate proposeRevokeX509RootCert := types.NewMsgProposeRevokeX509RootCert( - setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info, testconstants.SchemaVersion) + setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info) _, err = setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.NoError(t, err) @@ -597,7 +595,7 @@ func TestHandler_ApproveAddX509RootCert_ForEnoughApprovals(t *testing.T) { var schemaVersion uint32 // propose add x509 root certificate by trustee - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, schemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -646,7 +644,7 @@ func TestHandler_ApproveAddX509RootCert_ByNotTrustee(t *testing.T) { setup := Setup(t) // propose add x509 root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -675,7 +673,7 @@ func TestHandler_ApproveAddX509RootCert_Twice(t *testing.T) { setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Trustee}, 1) // propose add x509 root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(accAddress.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(accAddress.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -724,7 +722,7 @@ func TestHandler_ProposeRevokeX509RootCert_ByTrusteeOwner(t *testing.T) { // propose revocation of x509 root certificate by `setup.Trustee` proposeRevokeX509RootCert := types.NewMsgProposeRevokeX509RootCert( - setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info, testconstants.SchemaVersion) + setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info) _, err := setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.NoError(t, err) @@ -761,7 +759,7 @@ func TestHandler_ProposeRevokeX509RootCert_ByTrusteeNotOwner(t *testing.T) { // propose revocation of x509 root certificate by new trustee proposeRevokeX509RootCert := types.NewMsgProposeRevokeX509RootCert( - anotherTrustee.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info, testconstants.SchemaVersion) + anotherTrustee.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info) _, err := setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.NoError(t, err) @@ -802,7 +800,7 @@ func TestHandler_ProposeRevokeX509RootCert_ByNotTrustee(t *testing.T) { // propose revocation of x509 root certificate proposeRevokeX509RootCert := types.NewMsgProposeRevokeX509RootCert( - accAddress.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info, testconstants.SchemaVersion) + accAddress.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info) _, err := setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.Error(t, err) require.True(t, sdkerrors.ErrUnauthorized.Is(err)) @@ -814,7 +812,7 @@ func TestHandler_ProposeRevokeX509RootCert_CertificateDoesNotExist(t *testing.T) // propose revocation of not existing certificate proposeRevokeX509RootCert := types.NewMsgProposeRevokeX509RootCert( - setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info, testconstants.SchemaVersion) + setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info) _, err := setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.Error(t, err) require.True(t, pkitypes.ErrCertificateDoesNotExist.Is(err)) @@ -834,7 +832,6 @@ func TestHandler_ProposeRevokeX509RootCert_CertificateDoesNotExistBySerialNumber "invalid", false, testconstants.Info, - testconstants.SchemaVersion, ) _, err := setup.Handler(setup.Ctx, revokeX509Cert) require.Error(t, err) @@ -845,7 +842,7 @@ func TestHandler_ProposeRevokeX509RootCert_ForProposedCertificate(t *testing.T) setup := Setup(t) // propose x509 root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -855,7 +852,7 @@ func TestHandler_ProposeRevokeX509RootCert_ForProposedCertificate(t *testing.T) // propose revocation of proposed root certificate proposeRevokeX509RootCert := types.NewMsgProposeRevokeX509RootCert( - setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info, testconstants.SchemaVersion) + setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info) _, err = setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.Error(t, err) require.True(t, pkitypes.ErrCertificateDoesNotExist.Is(err)) @@ -870,7 +867,7 @@ func TestHandler_ProposeRevokeX509RootCert_ProposedRevocationAlreadyExists(t *te // propose revocation of x509 root certificate proposeRevokeX509RootCert := types.NewMsgProposeRevokeX509RootCert( - setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info, testconstants.SchemaVersion) + setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info) _, err := setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.NoError(t, err) @@ -880,7 +877,7 @@ func TestHandler_ProposeRevokeX509RootCert_ProposedRevocationAlreadyExists(t *te // propose revocation of the same x509 root certificate again proposeRevokeX509RootCert = types.NewMsgProposeRevokeX509RootCert( - anotherTrustee.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info, testconstants.SchemaVersion) + anotherTrustee.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info) _, err = setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.Error(t, err) require.True(t, pkitypes.ErrProposedCertificateRevocationAlreadyExists.Is(err)) @@ -891,20 +888,20 @@ func TestHandler_ProposeRevokeX509RootCert_ForNonRootCertificate(t *testing.T) { // store x509 root certificate rootCertificate := rootCertificate(setup.Trustee1) - setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate, testconstants.SchemaVersion) + setup.Keeper.AddApprovedCertificate(setup.Ctx, rootCertificate) // Add vendor account vendorAccAddress := GenerateAccAddress() setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // store x509 intermediate certificate - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) // propose revocation of x509 intermediate certificate proposeRevokeX509RootCert := types.NewMsgProposeRevokeX509RootCert( - setup.Trustee1.String(), testconstants.IntermediateSubject, testconstants.IntermediateSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info, testconstants.SchemaVersion) + setup.Trustee1.String(), testconstants.IntermediateSubject, testconstants.IntermediateSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info) _, err = setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.Error(t, err) require.True(t, pkitypes.ErrInappropriateCertificateType.Is(err)) @@ -923,7 +920,7 @@ func TestHandler_ApproveRevokeX509RootCert_ForNotEnoughApprovals(t *testing.T) { // propose revocation of x509 root certificate proposeRevokeX509RootCert := types.NewMsgProposeRevokeX509RootCert( - setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info, testconstants.SchemaVersion) + setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info) _, err := setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.NoError(t, err) @@ -963,7 +960,7 @@ func TestHandler_ApproveRevokeX509RootCert_ForEnoughApprovals(t *testing.T) { // propose revocation of x509 root certificate proposeRevokeX509RootCert := types.NewMsgProposeRevokeX509RootCert( - setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info, testconstants.SchemaVersion) + setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info) _, err := setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.NoError(t, err) @@ -1017,7 +1014,7 @@ func TestHandler_ApproveRevokeX509RootCert_BySerialNumber(t *testing.T) { setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // Add an intermediate certificate - addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateWithSameSubjectAndSKID1, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateWithSameSubjectAndSKID1, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIntermediateX509Cert) require.NoError(t, err) @@ -1032,7 +1029,7 @@ func TestHandler_ApproveRevokeX509RootCert_BySerialNumber(t *testing.T) { // propose revocation of root certificate with serial number "1" proposeRevokeX509RootCert := types.NewMsgProposeRevokeX509RootCert( - setup.Trustee1.String(), rootSubject, rootSubjectKeyID, "1", false, testconstants.Info, testconstants.SchemaVersion) + setup.Trustee1.String(), rootSubject, rootSubjectKeyID, "1", false, testconstants.Info) _, err = setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.NoError(t, err) @@ -1062,7 +1059,7 @@ func TestHandler_ApproveRevokeX509RootCert_BySerialNumber(t *testing.T) { // propose revocation of root certificate with serial number "2" proposeRevokeX509RootCert = types.NewMsgProposeRevokeX509RootCert( - setup.Trustee1.String(), rootSubject, rootSubjectKeyID, "2", true, testconstants.Info, testconstants.SchemaVersion) + setup.Trustee1.String(), rootSubject, rootSubjectKeyID, "2", true, testconstants.Info) _, err = setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.NoError(t, err) @@ -1108,7 +1105,7 @@ func TestHandler_ApproveRevokeX509RootCert_ByNotTrustee(t *testing.T) { // propose revocation of x509 root certificate proposeRevokeX509RootCert := types.NewMsgProposeRevokeX509RootCert( - setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info, testconstants.SchemaVersion) + setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info) _, err := setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.NoError(t, err) @@ -1153,7 +1150,7 @@ func TestHandler_ApproveRevokeX509RootCert_Twice(t *testing.T) { // propose revocation of x509 root certificate proposeRevokeX509RootCert := types.NewMsgProposeRevokeX509RootCert( - setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info, testconstants.SchemaVersion) + setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.RootSerialNumber, false, testconstants.Info) _, err := setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.NoError(t, err) @@ -1178,18 +1175,18 @@ func TestHandler_ApproveRevokeX509RootCert_ForTree(t *testing.T) { setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add intermediate x509 certificate - addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addIntermediateX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addIntermediateX509Cert) require.NoError(t, err) // add leaf x509 certificate - addLeafX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addLeafX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.LeafCertPem, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, addLeafX509Cert) require.NoError(t, err) // propose revocation of x509 root certificate proposeRevokeX509RootCert := types.NewMsgProposeRevokeX509RootCert( - setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, "", true, testconstants.Info, testconstants.SchemaVersion) + setup.Trustee1.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, "", true, testconstants.Info) _, err = setup.Handler(setup.Ctx, proposeRevokeX509RootCert) require.NoError(t, err) @@ -1265,7 +1262,7 @@ func TestHandler_RevokeX509RootCertsBySubjectKeyId(t *testing.T) { // revoke certificate revokeX509Cert := types.NewMsgProposeRevokeX509RootCert( - setup.Trustee1.String(), testconstants.PAACertWithSameSubjectID1Subject, testconstants.PAACertWithSameSubjectIDSubjectID, "", false, testconstants.Info, testconstants.SchemaVersion) + setup.Trustee1.String(), testconstants.PAACertWithSameSubjectID1Subject, testconstants.PAACertWithSameSubjectIDSubjectID, "", false, testconstants.Info) _, err := setup.Handler(setup.Ctx, revokeX509Cert) require.NoError(t, err) @@ -1296,12 +1293,12 @@ func TestHandler_RejectX509RootCert_TwoRejectApprovalsAreNeeded(t *testing.T) { setup := Setup(t) // propose x509 root certificate by account Trustee1 - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) // reject x509 root certificate by account Trustee2 - rejectAddX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectAddX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectAddX509RootCert) require.NoError(t, err) @@ -1321,7 +1318,7 @@ func TestHandler_RejectX509RootCert_TwoRejectApprovalsAreNeeded(t *testing.T) { require.Equal(t, testconstants.Info, proposedCertificate.Rejects[0].Info) // reject x509 root certificate by account Trustee3 - rejectAddX509RootCert = types.NewMsgRejectAddX509RootCert(setup.Trustee3.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectAddX509RootCert = types.NewMsgRejectAddX509RootCert(setup.Trustee3.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectAddX509RootCert) require.NoError(t, err) @@ -1351,7 +1348,7 @@ func TestHandler_RejectX509RootCert_ByNotTrustee(t *testing.T) { setup := Setup(t) // propose add x509 root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -1369,7 +1366,6 @@ func TestHandler_RejectX509RootCert_ByNotTrustee(t *testing.T) { testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, - testconstants.SchemaVersion, ) _, err = setup.Handler(setup.Ctx, approveAddX509RootCert) require.Error(t, err) @@ -1381,17 +1377,17 @@ func TestHandler_Duplicate_RejectX509RootCert_FromTheSameTrustee(t *testing.T) { setup := Setup(t) // propose add x509 root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) // reject x509 root certificate by account Trustee2 - rejectAddX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectAddX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectAddX509RootCert) require.NoError(t, err) // second time reject x509 root certificate by account Trustee2 - rejectAddX509RootCert = types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectAddX509RootCert = types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectAddX509RootCert) require.ErrorIs(t, err, sdkerrors.ErrUnauthorized) } @@ -1399,7 +1395,7 @@ func TestHandler_Duplicate_RejectX509RootCert_FromTheSameTrustee(t *testing.T) { func TestHandler_ApproveX509RootCertAndRejectX509RootCert_FromTheSameTrustee(t *testing.T) { setup := Setup(t) // propose add x509 root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -1418,7 +1414,7 @@ func TestHandler_ApproveX509RootCertAndRejectX509RootCert_FromTheSameTrustee(t * prevRejectsLen := len(pendingCert.Rejects) prevApprovalsLen := len(pendingCert.Approvals) // reject x509 root certificate by account Trustee2 - rejectAddX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectAddX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectAddX509RootCert) require.NoError(t, err) @@ -1432,7 +1428,7 @@ func TestHandler_ApproveX509RootCertAndRejectX509RootCert_FromTheSameTrustee(t * func TestHandler_RejectX509RootCertAndApproveX509RootCert_FromTheSameTrustee(t *testing.T) { setup := Setup(t) // propose add x509 root certificate - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -1443,7 +1439,7 @@ func TestHandler_RejectX509RootCertAndApproveX509RootCert_FromTheSameTrustee(t * setup.AddAccount(accAddress, []dclauthtypes.AccountRole{role}, 1) // reject x509 root certificate by account Trustee2 - rejectAddX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectAddX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectAddX509RootCert) require.NoError(t, err) @@ -1466,12 +1462,12 @@ func TestHandler_DoubleTimeRejectX509RootCert(t *testing.T) { setup := Setup(t) // propose x509 root certificate by account Trustee1 - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) // reject x509 root certificate by account Trustee2 - rejectAddX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectAddX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectAddX509RootCert) require.NoError(t, err) @@ -1491,7 +1487,7 @@ func TestHandler_DoubleTimeRejectX509RootCert(t *testing.T) { require.Equal(t, testconstants.Info, proposedCertificate.Rejects[0].Info) // reject x509 root certificate by account Trustee3 - rejectAddX509RootCert = types.NewMsgRejectAddX509RootCert(setup.Trustee3.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectAddX509RootCert = types.NewMsgRejectAddX509RootCert(setup.Trustee3.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectAddX509RootCert) require.NoError(t, err) @@ -1517,7 +1513,7 @@ func TestHandler_DoubleTimeRejectX509RootCert(t *testing.T) { require.Equal(t, testconstants.Info, rejectedCertificate.Rejects[1].Info) // propose x509 root certificate by account Trustee1 - proposeAddX509RootCert = types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert = types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err = setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -1530,12 +1526,12 @@ func TestHandler_DoubleTimeRejectX509RootCert(t *testing.T) { require.Error(t, err) // reject x509 root certificate by account Trustee3 - rejectAddX509RootCert = types.NewMsgRejectAddX509RootCert(setup.Trustee3.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectAddX509RootCert = types.NewMsgRejectAddX509RootCert(setup.Trustee3.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectAddX509RootCert) require.NoError(t, err) // reject x509 root certificate by account Trustee2 - rejectAddX509RootCert = types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectAddX509RootCert = types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectAddX509RootCert) require.NoError(t, err) @@ -1610,7 +1606,7 @@ func proposeAndApproveRootCertificate(setup *TestSetup, ownerTrustee sdk.AccAddr require.True(setup.T, setup.DclauthKeeper.HasRole(setup.Ctx, ownerTrustee, types.RootCertificateApprovalRole)) // propose x509 root certificate by `ownerTrustee` - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(ownerTrustee.String(), options.pemCert, options.info, options.vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(ownerTrustee.String(), options.pemCert, options.info, options.vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(setup.T, err) @@ -1641,12 +1637,12 @@ func TestHandler_RejectX509RootCert_TwoRejectApprovalsAreNeeded_FiveTrustees(t * setup.AddAccount(fifthTrustee, []dclauthtypes.AccountRole{dclauthtypes.Trustee}, 1) // propose x509 root certificate by account Trustee1 - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) // reject x509 root certificate by account Trustee2 - rejectAddX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectAddX509RootCert := types.NewMsgRejectAddX509RootCert(setup.Trustee2.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectAddX509RootCert) require.NoError(t, err) @@ -1662,7 +1658,7 @@ func TestHandler_RejectX509RootCert_TwoRejectApprovalsAreNeeded_FiveTrustees(t * require.Equal(t, testconstants.RootSerialNumber, proposedCertificate.SerialNumber) // reject x509 root certificate by account Trustee3 - rejectAddX509RootCert = types.NewMsgRejectAddX509RootCert(setup.Trustee3.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectAddX509RootCert = types.NewMsgRejectAddX509RootCert(setup.Trustee3.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectAddX509RootCert) require.NoError(t, err) @@ -1692,7 +1688,7 @@ func TestHandler_ApproveX509RootCert_FourApprovalsAreNeeded_FiveTrustees(t *test setup.AddAccount(fifthTrustee, []dclauthtypes.AccountRole{dclauthtypes.Trustee}, 1) // propose x509 root certificate by account Trustee1 - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.RootCertPem, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -1707,7 +1703,7 @@ func TestHandler_ApproveX509RootCert_FourApprovalsAreNeeded_FiveTrustees(t *test require.NoError(t, err) // reject x509 root certificate by account Trustee4 - rejectAddX509RootCert := types.NewMsgRejectAddX509RootCert(fourthTrustee.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info, testconstants.SchemaVersion) + rejectAddX509RootCert := types.NewMsgRejectAddX509RootCert(fourthTrustee.String(), testconstants.RootSubject, testconstants.RootSubjectKeyID, testconstants.Info) _, err = setup.Handler(setup.Ctx, rejectAddX509RootCert) require.NoError(t, err) @@ -1746,7 +1742,7 @@ func TestHandler_RevocationPointsByIssuerSubjectKeyID(t *testing.T) { setup.AddAccount(vendorAcc, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, 65521) // propose x509 root certificate by account Trustee1 - proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.PAACertWithNumericVid, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + proposeAddX509RootCert := types.NewMsgProposeAddX509RootCert(setup.Trustee1.String(), testconstants.PAACertWithNumericVid, testconstants.Info, testconstants.Vid, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, proposeAddX509RootCert) require.NoError(t, err) @@ -1874,7 +1870,7 @@ func TestHandler_AssignVid_ForNonRootCertificate(t *testing.T) { setup.AddAccount(vendorAccAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid) // add x509 intermediate certificate - addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion, testconstants.SchemaVersion) + addX509Cert := types.NewMsgAddX509Cert(vendorAccAddress.String(), testconstants.IntermediateCertPem, testconstants.CertSchemaVersion) _, err := setup.Handler(setup.Ctx, addX509Cert) require.NoError(t, err) diff --git a/x/pki/handler_update_revocation_test.go b/x/pki/handler_update_revocation_test.go index 5eedbd5ed..9f1f099fe 100644 --- a/x/pki/handler_update_revocation_test.go +++ b/x/pki/handler_update_revocation_test.go @@ -323,7 +323,7 @@ func TestHandler_UpdatePkiRevocationDistributionPoint_PAI_NotChainedOnLedger(t * _, err := setup.Handler(setup.Ctx, addPkiRevocationDistributionPoint) require.NoError(t, err) - proposeRevokeRootCert := types.NewMsgProposeRevokeX509RootCert(setup.Trustee1.String(), testconstants.PAACertWithNumericVidSubject, testconstants.PAACertWithNumericVidSubjectKeyID, "", false, testconstants.Info, testconstants.SchemaVersion) + proposeRevokeRootCert := types.NewMsgProposeRevokeX509RootCert(setup.Trustee1.String(), testconstants.PAACertWithNumericVidSubject, testconstants.PAACertWithNumericVidSubjectKeyID, "", false, testconstants.Info) _, err = setup.Handler(setup.Ctx, proposeRevokeRootCert) require.NoError(t, err) diff --git a/x/pki/keeper/approved_certificates.go b/x/pki/keeper/approved_certificates.go index c0c123e19..0131b87db 100644 --- a/x/pki/keeper/approved_certificates.go +++ b/x/pki/keeper/approved_certificates.go @@ -71,7 +71,7 @@ func (k Keeper) GetAllApprovedCertificates(ctx sdk.Context) (list []types.Approv } // Add an approved certificate to the list of approved certificates for the subject/subjectKeyId map. -func (k Keeper) AddApprovedCertificate(ctx sdk.Context, approvedCertificate types.Certificate, schemaVersion uint32) { +func (k Keeper) AddApprovedCertificate(ctx sdk.Context, approvedCertificate types.Certificate) { store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.ApprovedCertificatesKeyPrefix)) approvedCertificatesBytes := store.Get(types.ApprovedCertificatesKey( @@ -82,10 +82,9 @@ func (k Keeper) AddApprovedCertificate(ctx sdk.Context, approvedCertificate type if approvedCertificatesBytes == nil { approvedCertificates = types.ApprovedCertificates{ - Subject: approvedCertificate.Subject, - SubjectKeyId: approvedCertificate.SubjectKeyId, - Certs: []*types.Certificate{}, - SchemaVersion: schemaVersion, + Subject: approvedCertificate.Subject, + SubjectKeyId: approvedCertificate.SubjectKeyId, + Certs: []*types.Certificate{}, } } else { k.cdc.MustUnmarshal(approvedCertificatesBytes, &approvedCertificates) diff --git a/x/pki/keeper/child_certificates.go b/x/pki/keeper/child_certificates.go index 0d3e3a2a9..0e4338cc4 100644 --- a/x/pki/keeper/child_certificates.go +++ b/x/pki/keeper/child_certificates.go @@ -102,7 +102,7 @@ func (k Keeper) AddChildCertificate(ctx sdk.Context, issuer string, authorityKey ), b) } -func (k msgServer) RevokeChildCertificates(ctx sdk.Context, issuer string, authorityKeyID string, schemaVersion uint32) { +func (k msgServer) RevokeChildCertificates(ctx sdk.Context, issuer string, authorityKeyID string) { // Get issuer's ChildCertificates record childCertificates, _ := k.GetChildCertificates(ctx, issuer, authorityKeyID) @@ -110,7 +110,7 @@ func (k msgServer) RevokeChildCertificates(ctx sdk.Context, issuer string, autho for _, certIdentifier := range childCertificates.CertIds { // Revoke certificates with this subject/subjectKeyID combination certificates, _ := k.GetApprovedCertificates(ctx, certIdentifier.Subject, certIdentifier.SubjectKeyId) - k.AddRevokedCertificates(ctx, certificates, schemaVersion) + k.AddRevokedCertificates(ctx, certificates) // FIXME: Below two lines is not in the context of RevokeChildCertificates method. In future current implementation must be refactored if len(certificates.Certs) > 0 { // If cert is NOC then remove it from NOC ICA certificates list @@ -125,7 +125,7 @@ func (k msgServer) RevokeChildCertificates(ctx sdk.Context, issuer string, autho k.RemoveApprovedCertificatesBySubjectKeyID(ctx, certIdentifier.Subject, certIdentifier.SubjectKeyId) // Process child certificates recursively - k.RevokeChildCertificates(ctx, certIdentifier.Subject, certIdentifier.SubjectKeyId, schemaVersion) + k.RevokeChildCertificates(ctx, certIdentifier.Subject, certIdentifier.SubjectKeyId) } // Delete entire ChildCertificates record of issuer diff --git a/x/pki/keeper/msg_server_add_noc_x_509_ica_cert.go b/x/pki/keeper/msg_server_add_noc_x_509_ica_cert.go index 975defbc5..c110883ef 100644 --- a/x/pki/keeper/msg_server_add_noc_x_509_ica_cert.go +++ b/x/pki/keeper/msg_server_add_noc_x_509_ica_cert.go @@ -102,10 +102,10 @@ func (k msgServer) AddNocX509IcaCert(goCtx context.Context, msg *types.MsgAddNoc ) // Add a NOC certificate to the list of NOC certificates with the same VID - k.AddNocIcaCertificate(ctx, certificate, msg.SchemaVersion) + k.AddNocIcaCertificate(ctx, certificate) // append new certificate to list of certificates with the same Subject/SubjectKeyId combination and store updated list - k.AddApprovedCertificate(ctx, certificate, msg.SchemaVersion) + k.AddApprovedCertificate(ctx, certificate) // add the certificate identifier to the issuer's Child Certificates record certificateIdentifier := types.CertificateIdentifier{ diff --git a/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go b/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go index 1ca7540a2..b17f97235 100644 --- a/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go +++ b/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go @@ -85,10 +85,10 @@ func (k msgServer) AddNocX509RootCert(goCtx context.Context, msg *types.MsgAddNo ) // Add a NOC root certificate to the list of NOC root certificates with the same VID - k.AddNocRootCertificate(ctx, certificate, msg.SchemaVersion) + k.AddNocRootCertificate(ctx, certificate) // append new certificate to list of certificates with the same Subject/SubjectKeyId combination and store updated list - k.AddApprovedCertificate(ctx, certificate, msg.SchemaVersion) + k.AddApprovedCertificate(ctx, certificate) // register the unique certificate key uniqueCertificate := types.UniqueCertificate{ diff --git a/x/pki/keeper/msg_server_add_x_509_cert.go b/x/pki/keeper/msg_server_add_x_509_cert.go index 0dcfad317..554bdce25 100644 --- a/x/pki/keeper/msg_server_add_x_509_cert.go +++ b/x/pki/keeper/msg_server_add_x_509_cert.go @@ -102,7 +102,7 @@ func (k msgServer) AddX509Cert(goCtx context.Context, msg *types.MsgAddX509Cert) ) // append new certificate to list of certificates with the same Subject/SubjectKeyId combination and store updated list - k.AddApprovedCertificate(ctx, certificate, msg.SchemaVersion) + k.AddApprovedCertificate(ctx, certificate) // add the certificate identifier to the issuer's Child Certificates record certificateIdentifier := types.CertificateIdentifier{ diff --git a/x/pki/keeper/msg_server_approve_add_x_509_root_cert.go b/x/pki/keeper/msg_server_approve_add_x_509_root_cert.go index 2d5a84cf0..49496765f 100644 --- a/x/pki/keeper/msg_server_approve_add_x_509_root_cert.go +++ b/x/pki/keeper/msg_server_approve_add_x_509_root_cert.go @@ -77,7 +77,7 @@ func (k msgServer) ApproveAddX509RootCert(goCtx context.Context, msg *types.MsgA ) // add approved certificate to stored list of certificates with the same Subject/SubjectKeyId combination - k.AddApprovedCertificate(ctx, rootCertificate, proposedCertificate.SchemaVersion) + k.AddApprovedCertificate(ctx, rootCertificate) // delete proposed certificate k.RemoveProposedCertificate(ctx, msg.Subject, msg.SubjectKeyId) diff --git a/x/pki/keeper/msg_server_approve_revoke_x_509_root_cert.go b/x/pki/keeper/msg_server_approve_revoke_x_509_root_cert.go index eb95e67d7..08a4b5db8 100644 --- a/x/pki/keeper/msg_server_approve_revoke_x_509_root_cert.go +++ b/x/pki/keeper/msg_server_approve_revoke_x_509_root_cert.go @@ -70,7 +70,7 @@ func (k msgServer) ApproveRevokeX509RootCert(goCtx context.Context, msg *types.M } if revocation.RevokeChild { - k.RevokeChildCertificates(ctx, certID.Subject, certID.SubjectKeyId, revocation.SchemaVersion) + k.RevokeChildCertificates(ctx, certID.Subject, certID.SubjectKeyId) } } else { k.SetProposedCertificateRevocation(ctx, revocation) @@ -97,7 +97,7 @@ func (k msgServer) _revokeRootCertificates( } // remove from root certs index, add to revoked root certs k.RemoveApprovedRootCertificate(ctx, certID) - k.AddRevokedCertificates(ctx, certificates, schemaVersion) + k.AddRevokedCertificates(ctx, certificates) k.RemoveApprovedCertificates(ctx, certificates.Subject, certificates.SubjectKeyId) // remove from subject -> subject key ID map k.RemoveApprovedCertificateBySubject(ctx, certificates.Subject, certificates.SubjectKeyId) @@ -118,7 +118,7 @@ func (k msgServer) _revokeRootCertificate( SubjectKeyId: cert.SubjectKeyId, Certs: []*types.Certificate{cert}, } - k.AddRevokedCertificates(ctx, revCert, schemaVersion) + k.AddRevokedCertificates(ctx, revCert) removeCertFromList(cert.Issuer, cert.SerialNumber, &certificates.Certs) if len(certificates.Certs) == 0 { diff --git a/x/pki/keeper/msg_server_propose_add_x_509_root_cert.go b/x/pki/keeper/msg_server_propose_add_x_509_root_cert.go index 7b93a58fe..f38845b0f 100644 --- a/x/pki/keeper/msg_server_propose_add_x_509_root_cert.go +++ b/x/pki/keeper/msg_server_propose_add_x_509_root_cert.go @@ -96,7 +96,6 @@ func (k msgServer) ProposeAddX509RootCert(goCtx context.Context, msg *types.MsgP Approvals: []*types.Grant{}, Vid: msg.Vid, CertSchemaVersion: msg.CertSchemaVersion, - SchemaVersion: msg.SchemaVersion, } proposedCertificate.Approvals = append(proposedCertificate.Approvals, &grant) diff --git a/x/pki/keeper/msg_server_propose_revoke_x_509_root_cert.go b/x/pki/keeper/msg_server_propose_revoke_x_509_root_cert.go index 5606c4392..a01a0a514 100644 --- a/x/pki/keeper/msg_server_propose_revoke_x_509_root_cert.go +++ b/x/pki/keeper/msg_server_propose_revoke_x_509_root_cert.go @@ -62,12 +62,11 @@ func (k msgServer) ProposeRevokeX509RootCert(goCtx context.Context, msg *types.M Info: msg.Info, } revocation := types.ProposedCertificateRevocation{ - Subject: msg.Subject, - SubjectKeyId: msg.SubjectKeyId, - SerialNumber: msg.SerialNumber, - RevokeChild: msg.RevokeChild, - Approvals: []*types.Grant{&grant}, - SchemaVersion: msg.SchemaVersion, + Subject: msg.Subject, + SubjectKeyId: msg.SubjectKeyId, + SerialNumber: msg.SerialNumber, + RevokeChild: msg.RevokeChild, + Approvals: []*types.Grant{&grant}, } // store proposed certificate revocation diff --git a/x/pki/keeper/msg_server_reject_add_x_509_root_cert.go b/x/pki/keeper/msg_server_reject_add_x_509_root_cert.go index dbf5b2a50..762c18c07 100644 --- a/x/pki/keeper/msg_server_reject_add_x_509_root_cert.go +++ b/x/pki/keeper/msg_server_reject_add_x_509_root_cert.go @@ -87,7 +87,6 @@ func (k msgServer) RejectAddX509RootCert(goCtx context.Context, msg *types.MsgRe Rejects: proposedCertificate.Rejects, }, }, - SchemaVersion: msg.SchemaVersion, } k.SetRejectedCertificate(ctx, rejectedRootCertificate) diff --git a/x/pki/keeper/msg_server_revoke_noc_x_509_ica_cert.go b/x/pki/keeper/msg_server_revoke_noc_x_509_ica_cert.go index 58e8a3eca..1e0bdac44 100644 --- a/x/pki/keeper/msg_server_revoke_noc_x_509_ica_cert.go +++ b/x/pki/keeper/msg_server_revoke_noc_x_509_ica_cert.go @@ -44,17 +44,17 @@ func (k msgServer) RevokeNocX509IcaCert(goCtx context.Context, msg *types.MsgRev } if msg.SerialNumber != "" { - err = k._revokeNocCertificate(ctx, msg.SerialNumber, certificates, cert.Vid, msg.SchemaVersion) + err = k._revokeNocCertificate(ctx, msg.SerialNumber, certificates, cert.Vid) if err != nil { return nil, err } } else { - k._revokeNocCertificates(ctx, certificates, cert.Vid, msg.SchemaVersion) + k._revokeNocCertificates(ctx, certificates, cert.Vid) } if msg.RevokeChild { // Remove certificate identifier from issuer's ChildCertificates record - k.RevokeChildCertificates(ctx, msg.Subject, msg.SubjectKeyId, msg.SchemaVersion) + k.RevokeChildCertificates(ctx, msg.Subject, msg.SubjectKeyId) } return &types.MsgRevokeNocX509IcaCertResponse{}, nil @@ -65,7 +65,6 @@ func (k msgServer) _revokeNocCertificate( serialNumber string, certificates types.ApprovedCertificates, vid int32, - schemaVersion uint32, ) error { cert, found := findCertificate(serialNumber, &certificates.Certs) if !found { @@ -79,7 +78,7 @@ func (k msgServer) _revokeNocCertificate( SubjectKeyId: cert.SubjectKeyId, Certs: []*types.Certificate{cert}, } - k.AddRevokedCertificates(ctx, revCerts, schemaVersion) + k.AddRevokedCertificates(ctx, revCerts) removeCertFromList(cert.Issuer, cert.SerialNumber, &certificates.Certs) if len(certificates.Certs) == 0 { @@ -96,9 +95,9 @@ func (k msgServer) _revokeNocCertificate( return nil } -func (k msgServer) _revokeNocCertificates(ctx sdk.Context, certificates types.ApprovedCertificates, vid int32, schemaVersion uint32) { +func (k msgServer) _revokeNocCertificates(ctx sdk.Context, certificates types.ApprovedCertificates, vid int32) { // Add certs into revoked lists - k.AddRevokedCertificates(ctx, certificates, schemaVersion) + k.AddRevokedCertificates(ctx, certificates) // remove cert from NOC certs list k.RemoveNocIcaCertificate(ctx, certificates.Subject, certificates.SubjectKeyId, vid) // remove cert from approved certs list diff --git a/x/pki/keeper/msg_server_revoke_noc_x_509_root_cert.go b/x/pki/keeper/msg_server_revoke_noc_x_509_root_cert.go index 77a770b2e..50bb1e1b9 100644 --- a/x/pki/keeper/msg_server_revoke_noc_x_509_root_cert.go +++ b/x/pki/keeper/msg_server_revoke_noc_x_509_root_cert.go @@ -45,12 +45,12 @@ func (k msgServer) RevokeNocX509RootCert(goCtx context.Context, msg *types.MsgRe } if msg.SerialNumber != "" { - err = k._revokeNocRootCertificate(ctx, msg.SerialNumber, certificates, cert.Vid, msg.SchemaVersion) + err = k._revokeNocRootCertificate(ctx, msg.SerialNumber, certificates, cert.Vid) if err != nil { return nil, err } } else { - k._revokeNocRootCertificates(ctx, certificates, cert.Vid, msg.SchemaVersion) + k._revokeNocRootCertificates(ctx, certificates, cert.Vid) } if msg.RevokeChild { @@ -59,15 +59,15 @@ func (k msgServer) RevokeNocX509RootCert(goCtx context.Context, msg *types.MsgRe SubjectKeyId: msg.SubjectKeyId, } // Remove certificate identifier from issuer's ChildCertificates record - k.RevokeChildCertificates(ctx, certID.Subject, certID.SubjectKeyId, msg.SchemaVersion) + k.RevokeChildCertificates(ctx, certID.Subject, certID.SubjectKeyId) } return &types.MsgRevokeNocX509RootCertResponse{}, nil } -func (k msgServer) _revokeNocRootCertificates(ctx sdk.Context, certificates types.ApprovedCertificates, vid int32, schemaVersion uint32) { +func (k msgServer) _revokeNocRootCertificates(ctx sdk.Context, certificates types.ApprovedCertificates, vid int32) { // Add certs into revoked lists - k.AddRevokedCertificates(ctx, certificates, schemaVersion) + k.AddRevokedCertificates(ctx, certificates) k.AddRevokedNocRootCertificates(ctx, types.RevokedNocRootCertificates{ Subject: certificates.Subject, SubjectKeyId: certificates.SubjectKeyId, @@ -90,7 +90,6 @@ func (k msgServer) _revokeNocRootCertificate( serialNumber string, certificates types.ApprovedCertificates, vid int32, - schemaVersion uint32, ) error { cert, found := findCertificate(serialNumber, &certificates.Certs) if !found { @@ -104,7 +103,7 @@ func (k msgServer) _revokeNocRootCertificate( SubjectKeyId: cert.SubjectKeyId, Certs: []*types.Certificate{cert}, } - k.AddRevokedCertificates(ctx, revCerts, schemaVersion) + k.AddRevokedCertificates(ctx, revCerts) revNocCerts := types.RevokedNocRootCertificates{ Subject: certificates.Subject, SubjectKeyId: certificates.SubjectKeyId, diff --git a/x/pki/keeper/msg_server_revoke_x_509_cert.go b/x/pki/keeper/msg_server_revoke_x_509_cert.go index 9880e9caa..6ea9967d9 100644 --- a/x/pki/keeper/msg_server_revoke_x_509_cert.go +++ b/x/pki/keeper/msg_server_revoke_x_509_cert.go @@ -46,22 +46,22 @@ func (k msgServer) RevokeX509Cert(goCtx context.Context, msg *types.MsgRevokeX50 return nil, pkitypes.NewErrCertificateBySerialNumberDoesNotExist(msg.Subject, msg.SubjectKeyId, msg.SerialNumber) } - k._revokeX509Certificate(ctx, certBySerialNumber, certIdentifier, certificates, msg.SchemaVersion) + k._revokeX509Certificate(ctx, certBySerialNumber, certIdentifier, certificates) } else { - k._revokeX509Certificates(ctx, certIdentifier, certificates, msg.SchemaVersion) + k._revokeX509Certificates(ctx, certIdentifier, certificates) } if msg.RevokeChild { // Remove certificate identifier from issuer's ChildCertificates record - k.RevokeChildCertificates(ctx, certIdentifier.Subject, certIdentifier.SubjectKeyId, msg.SchemaVersion) + k.RevokeChildCertificates(ctx, certIdentifier.Subject, certIdentifier.SubjectKeyId) } return &types.MsgRevokeX509CertResponse{}, nil } -func (k msgServer) _revokeX509Certificates(ctx sdk.Context, certID types.CertificateIdentifier, certificates types.ApprovedCertificates, schemaVersion uint32) { +func (k msgServer) _revokeX509Certificates(ctx sdk.Context, certID types.CertificateIdentifier, certificates types.ApprovedCertificates) { // Revoke certificates with given subject/subjectKeyID - k.AddRevokedCertificates(ctx, certificates, schemaVersion) + k.AddRevokedCertificates(ctx, certificates) k.RemoveApprovedCertificates(ctx, certID.Subject, certID.SubjectKeyId) // Remove certificate identifier from issuer's ChildCertificates record k.RemoveChildCertificate(ctx, certificates.Certs[0].Issuer, certificates.Certs[0].AuthorityKeyId, certID) @@ -70,13 +70,13 @@ func (k msgServer) _revokeX509Certificates(ctx sdk.Context, certID types.Certifi // remove from subject key ID -> certificates map k.RemoveApprovedCertificatesBySubjectKeyID(ctx, certID.Subject, certID.SubjectKeyId) } -func (k msgServer) _revokeX509Certificate(ctx sdk.Context, cert *types.Certificate, certID types.CertificateIdentifier, certificates types.ApprovedCertificates, schemaVersion uint32) { +func (k msgServer) _revokeX509Certificate(ctx sdk.Context, cert *types.Certificate, certID types.CertificateIdentifier, certificates types.ApprovedCertificates) { certToRevoke := types.ApprovedCertificates{ Subject: cert.Subject, SubjectKeyId: cert.SubjectKeyId, Certs: []*types.Certificate{cert}, } - k.AddRevokedCertificates(ctx, certToRevoke, schemaVersion) + k.AddRevokedCertificates(ctx, certToRevoke) removeCertFromList(cert.Issuer, cert.SerialNumber, &certificates.Certs) if len(certificates.Certs) == 0 { diff --git a/x/pki/keeper/noc_ica_certificates.go b/x/pki/keeper/noc_ica_certificates.go index ca333d781..6a537fc7c 100644 --- a/x/pki/keeper/noc_ica_certificates.go +++ b/x/pki/keeper/noc_ica_certificates.go @@ -62,7 +62,7 @@ func (k Keeper) GetNocIcaCertificatesBySubjectAndSKID( } // AddNocIcaCertificates adds a NOC certificate to the list of NOC certificates for the VID map. -func (k Keeper) AddNocIcaCertificate(ctx sdk.Context, nocIcaCertificates types.Certificate, schemaVersion uint32) { +func (k Keeper) AddNocIcaCertificate(ctx sdk.Context, nocIcaCertificates types.Certificate) { store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocIcaCertificatesKeyPrefix)) NocIcaCertificatesBytes := store.Get(types.NocIcaCertificatesKey(nocIcaCertificates.Vid)) @@ -70,16 +70,14 @@ func (k Keeper) AddNocIcaCertificate(ctx sdk.Context, nocIcaCertificates types.C if NocIcaCertificatesBytes == nil { NocIcaCertificates = types.NocIcaCertificates{ - Vid: nocIcaCertificates.Vid, - Certs: []*types.Certificate{}, - SchemaVersion: schemaVersion, + Vid: nocIcaCertificates.Vid, + Certs: []*types.Certificate{}, } } else { k.cdc.MustUnmarshal(NocIcaCertificatesBytes, &NocIcaCertificates) } NocIcaCertificates.Certs = append(NocIcaCertificates.Certs, &nocIcaCertificates) - NocIcaCertificates.SchemaVersion = schemaVersion b := k.cdc.MustMarshal(&NocIcaCertificates) store.Set(types.NocIcaCertificatesKey(nocIcaCertificates.Vid), b) diff --git a/x/pki/keeper/noc_root_certificates.go b/x/pki/keeper/noc_root_certificates.go index 86da7cc75..078ec5613 100644 --- a/x/pki/keeper/noc_root_certificates.go +++ b/x/pki/keeper/noc_root_certificates.go @@ -37,7 +37,7 @@ func (k Keeper) GetNocRootCertificates( } // Add a NOC root certificate to the list of NOC root certificates for the VID map. -func (k Keeper) AddNocRootCertificate(ctx sdk.Context, nocCertificate types.Certificate, schemaVersion uint32) { +func (k Keeper) AddNocRootCertificate(ctx sdk.Context, nocCertificate types.Certificate) { store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocRootCertificatesKeyPrefix)) nocCertificatesBytes := store.Get(types.NocRootCertificatesKey(nocCertificate.Vid)) @@ -45,16 +45,14 @@ func (k Keeper) AddNocRootCertificate(ctx sdk.Context, nocCertificate types.Cert if nocCertificatesBytes == nil { nocCertificates = types.NocRootCertificates{ - Vid: nocCertificate.Vid, - Certs: []*types.Certificate{}, - SchemaVersion: schemaVersion, + Vid: nocCertificate.Vid, + Certs: []*types.Certificate{}, } } else { k.cdc.MustUnmarshal(nocCertificatesBytes, &nocCertificates) } nocCertificates.Certs = append(nocCertificates.Certs, &nocCertificate) - nocCertificates.SchemaVersion = schemaVersion b := k.cdc.MustMarshal(&nocCertificates) store.Set(types.NocRootCertificatesKey(nocCertificate.Vid), b) diff --git a/x/pki/keeper/revoked_certificates.go b/x/pki/keeper/revoked_certificates.go index 279da9265..f3225d210 100644 --- a/x/pki/keeper/revoked_certificates.go +++ b/x/pki/keeper/revoked_certificates.go @@ -68,7 +68,7 @@ func (k Keeper) GetAllRevokedCertificates(ctx sdk.Context) (list []types.Revoked } // Add revoked certificates to the list of revoked certificates for the subject/subjectKeyId map. -func (k Keeper) AddRevokedCertificates(ctx sdk.Context, approvedCertificates types.ApprovedCertificates, schemaVersion uint32) { +func (k Keeper) AddRevokedCertificates(ctx sdk.Context, approvedCertificates types.ApprovedCertificates) { store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.RevokedCertificatesKeyPrefix)) revokedCertificatesBytes := store.Get(types.RevokedCertificatesKey( @@ -79,10 +79,9 @@ func (k Keeper) AddRevokedCertificates(ctx sdk.Context, approvedCertificates typ if revokedCertificatesBytes == nil { revokedCertificates = types.RevokedCertificates{ - Subject: approvedCertificates.Subject, - SubjectKeyId: approvedCertificates.SubjectKeyId, - Certs: []*types.Certificate{}, - SchemaVersion: schemaVersion, + Subject: approvedCertificates.Subject, + SubjectKeyId: approvedCertificates.SubjectKeyId, + Certs: []*types.Certificate{}, } } else { k.cdc.MustUnmarshal(revokedCertificatesBytes, &revokedCertificates) diff --git a/x/pki/types/approved_certificates_by_subject.pb.go b/x/pki/types/approved_certificates_by_subject.pb.go index 85770a5ab..fa90d2f29 100644 --- a/x/pki/types/approved_certificates_by_subject.pb.go +++ b/x/pki/types/approved_certificates_by_subject.pb.go @@ -25,6 +25,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ApprovedCertificatesBySubject struct { Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` SubjectKeyIds []string `protobuf:"bytes,2,rep,name=subjectKeyIds,proto3" json:"subjectKeyIds,omitempty"` + SchemaVersion uint32 `protobuf:"varint,3,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *ApprovedCertificatesBySubject) Reset() { *m = ApprovedCertificatesBySubject{} } @@ -74,6 +75,13 @@ func (m *ApprovedCertificatesBySubject) GetSubjectKeyIds() []string { return nil } +func (m *ApprovedCertificatesBySubject) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*ApprovedCertificatesBySubject)(nil), "zigbeealliance.distributedcomplianceledger.pki.ApprovedCertificatesBySubject") } @@ -83,22 +91,24 @@ func init() { } var fileDescriptor_00fee9a70661a177 = []byte{ - // 236 bytes of a gzipped FileDescriptorProto + // 260 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x0a, 0xad, 0xca, 0x4c, 0x4f, 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x17, 0x64, 0x67, 0xea, 0x27, 0x16, 0x14, 0x14, 0xe5, 0x97, 0xa5, 0xa6, 0xc4, 0x27, 0xa7, 0x16, 0x95, 0x64, 0xa6, 0x65, 0x26, 0x27, 0x96, 0xa4, 0x16, 0xc7, 0x27, 0x55, 0xc6, 0x17, 0x97, 0x26, 0x65, 0xa5, 0x26, 0x97, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xe9, 0xa1, - 0x1a, 0xab, 0x87, 0xc7, 0x58, 0xbd, 0x82, 0xec, 0x4c, 0xa5, 0x78, 0x2e, 0x59, 0x47, 0xa8, 0xc9, - 0xce, 0x48, 0x06, 0x3b, 0x55, 0x06, 0x43, 0x8c, 0x15, 0x92, 0xe0, 0x62, 0x87, 0xda, 0x20, 0xc1, - 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe3, 0x0a, 0xa9, 0x70, 0xf1, 0x42, 0x99, 0xde, 0xa9, 0x95, - 0x9e, 0x29, 0xc5, 0x12, 0x4c, 0x0a, 0xcc, 0x1a, 0x9c, 0x41, 0xa8, 0x82, 0x4e, 0x71, 0x27, 0x1e, - 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, - 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xe5, 0x92, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, - 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0x71, 0xb5, 0x2e, 0xb6, 0xd0, 0xd0, 0x45, 0xb8, 0x5b, 0x17, 0x1a, - 0x1e, 0x15, 0xe0, 0x10, 0x29, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xfb, 0xdb, 0x18, 0x10, - 0x00, 0x00, 0xff, 0xff, 0x96, 0xc1, 0xd5, 0x7d, 0x50, 0x01, 0x00, 0x00, + 0x1a, 0xab, 0x87, 0xc7, 0x58, 0xbd, 0x82, 0xec, 0x4c, 0xa5, 0x56, 0x46, 0x2e, 0x59, 0x47, 0xa8, + 0xd1, 0xce, 0x48, 0x26, 0x3b, 0x55, 0x06, 0x43, 0xcc, 0x15, 0x92, 0xe0, 0x62, 0x87, 0x5a, 0x21, + 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe3, 0x0a, 0xa9, 0x70, 0xf1, 0x42, 0x99, 0xde, 0xa9, + 0x95, 0x9e, 0x29, 0xc5, 0x12, 0x4c, 0x0a, 0xcc, 0x1a, 0x9c, 0x41, 0xa8, 0x82, 0x60, 0x55, 0xc9, + 0x19, 0xa9, 0xb9, 0x89, 0x61, 0xa9, 0x45, 0xc5, 0x99, 0xf9, 0x79, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, + 0xbc, 0x41, 0xa8, 0x82, 0x4e, 0x71, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, + 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, + 0xe5, 0x92, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0xf1, 0x9c, 0x2e, + 0xb6, 0x40, 0xd3, 0x45, 0x78, 0x4f, 0x17, 0x1a, 0x6c, 0x15, 0xe0, 0x80, 0x2b, 0xa9, 0x2c, 0x48, + 0x2d, 0x4e, 0x62, 0x03, 0x07, 0x8f, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x01, 0x11, 0xca, 0xc4, + 0x77, 0x01, 0x00, 0x00, } func (m *ApprovedCertificatesBySubject) Marshal() (dAtA []byte, err error) { @@ -121,6 +131,11 @@ func (m *ApprovedCertificatesBySubject) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintApprovedCertificatesBySubject(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x18 + } if len(m.SubjectKeyIds) > 0 { for iNdEx := len(m.SubjectKeyIds) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.SubjectKeyIds[iNdEx]) @@ -167,6 +182,9 @@ func (m *ApprovedCertificatesBySubject) Size() (n int) { n += 1 + l + sovApprovedCertificatesBySubject(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovApprovedCertificatesBySubject(uint64(m.SchemaVersion)) + } return n } @@ -269,6 +287,25 @@ func (m *ApprovedCertificatesBySubject) Unmarshal(dAtA []byte) error { } m.SubjectKeyIds = append(m.SubjectKeyIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApprovedCertificatesBySubject + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipApprovedCertificatesBySubject(dAtA[iNdEx:]) diff --git a/x/pki/types/approved_certificates_by_subject_key_id.pb.go b/x/pki/types/approved_certificates_by_subject_key_id.pb.go index 8da94db3d..4aebcf970 100644 --- a/x/pki/types/approved_certificates_by_subject_key_id.pb.go +++ b/x/pki/types/approved_certificates_by_subject_key_id.pb.go @@ -23,8 +23,9 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ApprovedCertificatesBySubjectKeyId struct { - SubjectKeyId string `protobuf:"bytes,1,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty"` - Certs []*Certificate `protobuf:"bytes,2,rep,name=certs,proto3" json:"certs,omitempty"` + SubjectKeyId string `protobuf:"bytes,1,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty"` + Certs []*Certificate `protobuf:"bytes,2,rep,name=certs,proto3" json:"certs,omitempty"` + SchemaVersion uint32 `protobuf:"varint,3,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *ApprovedCertificatesBySubjectKeyId) Reset() { *m = ApprovedCertificatesBySubjectKeyId{} } @@ -74,6 +75,13 @@ func (m *ApprovedCertificatesBySubjectKeyId) GetCerts() []*Certificate { return nil } +func (m *ApprovedCertificatesBySubjectKeyId) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*ApprovedCertificatesBySubjectKeyId)(nil), "zigbeealliance.distributedcomplianceledger.pki.ApprovedCertificatesBySubjectKeyId") } @@ -83,24 +91,25 @@ func init() { } var fileDescriptor_16abcf34f50089b9 = []byte{ - // 263 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x8a, 0xa9, 0xca, 0x4c, 0x4f, - 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, - 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, - 0xa7, 0x16, 0xe9, 0x17, 0x64, 0x67, 0xea, 0x27, 0x16, 0x14, 0x14, 0xe5, 0x97, 0xa5, 0xa6, 0xc4, - 0x27, 0xa7, 0x16, 0x95, 0x64, 0xa6, 0x65, 0x26, 0x27, 0x96, 0xa4, 0x16, 0xc7, 0x27, 0x55, 0xc6, - 0x17, 0x97, 0x26, 0x65, 0xa5, 0x26, 0x97, 0xc4, 0x67, 0xa7, 0x56, 0xc6, 0x67, 0xa6, 0xe8, 0x15, - 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xe9, 0xa1, 0x9a, 0xae, 0x87, 0xc7, 0x74, 0xbd, 0x82, 0xec, 0x4c, - 0x29, 0x07, 0x12, 0x5d, 0x83, 0xe4, 0x08, 0x88, 0x8d, 0x4a, 0xb3, 0x19, 0xb9, 0x94, 0x1c, 0xa1, - 0x6e, 0x74, 0x46, 0x72, 0xa2, 0x53, 0x65, 0x30, 0xc4, 0x81, 0xde, 0xa9, 0x95, 0x9e, 0x29, 0x42, - 0x4a, 0x5c, 0x3c, 0xc5, 0x48, 0x7c, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x14, 0x31, 0xa1, - 0x40, 0x2e, 0x56, 0x90, 0xf9, 0xc5, 0x12, 0x4c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0xd6, 0x24, 0x7a, - 0x46, 0x0f, 0xc9, 0xfa, 0x20, 0x88, 0x49, 0x4e, 0x71, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, - 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, - 0x2c, 0xc7, 0x10, 0xe5, 0x92, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, - 0xb1, 0x47, 0x17, 0x5b, 0x28, 0xe8, 0x22, 0x6c, 0xd2, 0x85, 0x86, 0x43, 0x05, 0x38, 0x24, 0x4a, - 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x81, 0x60, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xf1, - 0x9e, 0xc0, 0x52, 0xd6, 0x01, 0x00, 0x00, + // 287 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0xb1, 0x4a, 0xc4, 0x30, + 0x1c, 0x87, 0x2f, 0x1e, 0x0a, 0x56, 0x6f, 0xe9, 0x74, 0x38, 0x84, 0x52, 0x1c, 0xba, 0x34, 0x05, + 0x1d, 0x5d, 0xf4, 0x74, 0x11, 0x27, 0x2b, 0x38, 0x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xc3, + 0x47, 0x83, 0xd1, 0xb2, 0xc1, 0xe8, 0xab, 0xc1, 0xe8, 0xad, 0xc5, 0xa3, 0x65, 0x8b, 0x47, 0x9f, + 0x2d, 0x1e, 0xdd, 0x5d, 0x64, 0xc2, 0xce, 0x2b, 0x4a, 0x98, 0x2c, 0xa3, 0xce, 0x26, 0xfc, 0xab, + 0x55, 0xf8, 0xeb, 0x13, 0xae, 0x6b, 0xbd, 0xac, 0x7a, 0xd9, 0x5a, 0x81, 0xa1, 0x3b, 0xab, 0x54, + 0xc7, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x62, 0x1a, 0xe1, 0x18, 0xfc, 0x01, 0x00, 0x00, } func (m *ApprovedCertificatesBySubjectKeyId) Marshal() (dAtA []byte, err error) { @@ -123,6 +132,11 @@ func (m *ApprovedCertificatesBySubjectKeyId) MarshalToSizedBuffer(dAtA []byte) ( _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintApprovedCertificatesBySubjectKeyId(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x18 + } if len(m.Certs) > 0 { for iNdEx := len(m.Certs) - 1; iNdEx >= 0; iNdEx-- { { @@ -174,6 +188,9 @@ func (m *ApprovedCertificatesBySubjectKeyId) Size() (n int) { n += 1 + l + sovApprovedCertificatesBySubjectKeyId(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovApprovedCertificatesBySubjectKeyId(uint64(m.SchemaVersion)) + } return n } @@ -278,6 +295,25 @@ func (m *ApprovedCertificatesBySubjectKeyId) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApprovedCertificatesBySubjectKeyId + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipApprovedCertificatesBySubjectKeyId(dAtA[iNdEx:]) diff --git a/x/pki/types/approved_root_certificates.pb.go b/x/pki/types/approved_root_certificates.pb.go index 681227a83..29393f251 100644 --- a/x/pki/types/approved_root_certificates.pb.go +++ b/x/pki/types/approved_root_certificates.pb.go @@ -23,7 +23,8 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ApprovedRootCertificates struct { - Certs []*CertificateIdentifier `protobuf:"bytes,1,rep,name=certs,proto3" json:"certs,omitempty"` + Certs []*CertificateIdentifier `protobuf:"bytes,1,rep,name=certs,proto3" json:"certs,omitempty"` + SchemaVersion uint32 `protobuf:"varint,2,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *ApprovedRootCertificates) Reset() { *m = ApprovedRootCertificates{} } @@ -66,6 +67,13 @@ func (m *ApprovedRootCertificates) GetCerts() []*CertificateIdentifier { return nil } +func (m *ApprovedRootCertificates) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*ApprovedRootCertificates)(nil), "zigbeealliance.distributedcomplianceledger.pki.ApprovedRootCertificates") } @@ -75,7 +83,7 @@ func init() { } var fileDescriptor_43b429c1dbf61a0d = []byte{ - // 238 bytes of a gzipped FileDescriptorProto + // 266 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0xaf, 0xca, 0x4c, 0x4f, 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, @@ -83,14 +91,16 @@ var fileDescriptor_43b429c1dbf61a0d = []byte{ 0x17, 0xe5, 0xe7, 0x97, 0xc4, 0x27, 0xa7, 0x16, 0x95, 0x64, 0xa6, 0x65, 0x26, 0x27, 0x96, 0xa4, 0x16, 0xeb, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xe9, 0xa1, 0x1a, 0xa8, 0x87, 0xc7, 0x40, 0xbd, 0x82, 0xec, 0x4c, 0x29, 0x6f, 0x12, 0x1d, 0x80, 0x64, 0x65, 0x7c, 0x66, 0x4a, 0x6a, 0x1e, 0x88, - 0x03, 0x32, 0x0a, 0x64, 0xb9, 0x52, 0x39, 0x97, 0x84, 0x23, 0xd4, 0x81, 0x41, 0xf9, 0xf9, 0x25, - 0xce, 0x48, 0xce, 0x13, 0x8a, 0xe6, 0x62, 0x05, 0xe9, 0x2d, 0x96, 0x60, 0x54, 0x60, 0xd6, 0xe0, - 0x36, 0x72, 0x25, 0xd1, 0xa1, 0x7a, 0x48, 0x86, 0x79, 0xc2, 0xed, 0x0d, 0x82, 0x98, 0xe9, 0x14, - 0x77, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, - 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x2e, 0xe9, 0x99, 0x25, 0x19, - 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x10, 0x1b, 0x75, 0xb1, 0xf9, 0x55, 0x17, 0x61, 0xa7, - 0x2e, 0xd4, 0xb7, 0x15, 0x60, 0xff, 0x96, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xfd, 0x67, - 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x86, 0xee, 0xc1, 0x7e, 0xaf, 0x01, 0x00, 0x00, + 0x03, 0x32, 0x0a, 0x64, 0xb9, 0xd2, 0x5c, 0x46, 0x2e, 0x09, 0x47, 0xa8, 0x0b, 0x83, 0xf2, 0xf3, + 0x4b, 0x9c, 0x91, 0xdc, 0x27, 0x14, 0xcd, 0xc5, 0x0a, 0xd2, 0x5c, 0x2c, 0xc1, 0xa8, 0xc0, 0xac, + 0xc1, 0x6d, 0xe4, 0x4a, 0xa2, 0x4b, 0xf5, 0x90, 0x0c, 0xf3, 0x84, 0x5b, 0x1c, 0x04, 0x31, 0x53, + 0x48, 0x85, 0x8b, 0xb7, 0x38, 0x39, 0x23, 0x35, 0x37, 0x31, 0x2c, 0xb5, 0xa8, 0x38, 0x33, 0x3f, + 0x4f, 0x82, 0x49, 0x81, 0x51, 0x83, 0x37, 0x08, 0x55, 0xd0, 0x29, 0xee, 0xc4, 0x23, 0x39, 0xc6, + 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, + 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x5c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, + 0x73, 0xf5, 0x21, 0xee, 0xd2, 0xc5, 0x16, 0x24, 0xba, 0x08, 0x97, 0xe9, 0x42, 0x03, 0xa5, 0x02, + 0x1c, 0x2c, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0xe0, 0x60, 0x30, 0x06, 0x04, 0x00, 0x00, + 0xff, 0xff, 0x75, 0x50, 0x33, 0x92, 0xd6, 0x01, 0x00, 0x00, } func (m *ApprovedRootCertificates) Marshal() (dAtA []byte, err error) { @@ -113,6 +123,11 @@ func (m *ApprovedRootCertificates) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintApprovedRootCertificates(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x10 + } if len(m.Certs) > 0 { for iNdEx := len(m.Certs) - 1; iNdEx >= 0; iNdEx-- { { @@ -153,6 +168,9 @@ func (m *ApprovedRootCertificates) Size() (n int) { n += 1 + l + sovApprovedRootCertificates(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovApprovedRootCertificates(uint64(m.SchemaVersion)) + } return n } @@ -225,6 +243,25 @@ func (m *ApprovedRootCertificates) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApprovedRootCertificates + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipApprovedRootCertificates(dAtA[iNdEx:]) diff --git a/x/pki/types/certificate_identifier.pb.go b/x/pki/types/certificate_identifier.pb.go index 5c5a22b9b..d8b632f6b 100644 --- a/x/pki/types/certificate_identifier.pb.go +++ b/x/pki/types/certificate_identifier.pb.go @@ -23,8 +23,9 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type CertificateIdentifier struct { - Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` - SubjectKeyId string `protobuf:"bytes,2,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty"` + Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` + SubjectKeyId string `protobuf:"bytes,2,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty"` + SchemaVersion uint32 `protobuf:"varint,3,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *CertificateIdentifier) Reset() { *m = CertificateIdentifier{} } @@ -74,6 +75,13 @@ func (m *CertificateIdentifier) GetSubjectKeyId() string { return "" } +func (m *CertificateIdentifier) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*CertificateIdentifier)(nil), "zigbeealliance.distributedcomplianceledger.pki.CertificateIdentifier") } @@ -83,21 +91,23 @@ func init() { } var fileDescriptor_8d2f4acfd17683fc = []byte{ - // 219 bytes of a gzipped FileDescriptorProto + // 246 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0xae, 0xca, 0x4c, 0x4f, 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x17, 0x64, 0x67, 0xea, 0x27, 0xa7, 0x16, 0x95, 0x64, 0xa6, 0x65, 0x26, 0x27, 0x96, 0xa4, 0xc6, 0x67, 0xa6, 0xa4, 0xe6, 0x81, 0x38, 0xa9, 0x45, 0x7a, 0x05, 0x45, 0xf9, 0x25, - 0xf9, 0x42, 0x7a, 0xa8, 0x86, 0xe9, 0xe1, 0x31, 0x4c, 0xaf, 0x20, 0x3b, 0x53, 0x29, 0x94, 0x4b, + 0xf9, 0x42, 0x7a, 0xa8, 0x86, 0xe9, 0xe1, 0x31, 0x4c, 0xaf, 0x20, 0x3b, 0x53, 0xa9, 0x9a, 0x4b, 0xd4, 0x19, 0x61, 0x9e, 0x27, 0xdc, 0x38, 0x21, 0x09, 0x2e, 0xf6, 0xe2, 0xd2, 0xa4, 0xac, 0xd4, 0xe4, 0x12, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x18, 0x57, 0x48, 0x89, 0x8b, 0x07, 0xca, - 0xf4, 0x4e, 0xad, 0xf4, 0x4c, 0x91, 0x60, 0x02, 0x4b, 0xa3, 0x88, 0x39, 0xc5, 0x9d, 0x78, 0x24, - 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, - 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x4b, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, - 0x72, 0x7e, 0xae, 0x3e, 0xc4, 0xad, 0xba, 0xd8, 0x7c, 0xae, 0x8b, 0x70, 0xad, 0x2e, 0xd4, 0xef, - 0x15, 0x60, 0xdf, 0x97, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x7d, 0x6b, 0x0c, 0x08, 0x00, - 0x00, 0xff, 0xff, 0xaa, 0x25, 0x51, 0x60, 0x3c, 0x01, 0x00, 0x00, + 0xf4, 0x4e, 0xad, 0xf4, 0x4c, 0x91, 0x60, 0x02, 0x4b, 0xa3, 0x88, 0x09, 0xa9, 0x70, 0xf1, 0x16, + 0x27, 0x67, 0xa4, 0xe6, 0x26, 0x86, 0xa5, 0x16, 0x15, 0x67, 0xe6, 0xe7, 0x49, 0x30, 0x2b, 0x30, + 0x6a, 0xf0, 0x06, 0xa1, 0x0a, 0x3a, 0xc5, 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, + 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, + 0x43, 0x94, 0x4b, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xc4, 0x47, + 0xba, 0xd8, 0xc2, 0x47, 0x17, 0xe1, 0x27, 0x5d, 0x68, 0x08, 0x55, 0x80, 0xc3, 0xa8, 0xa4, 0xb2, + 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0x26, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x94, 0xf0, + 0x4a, 0x22, 0x62, 0x01, 0x00, 0x00, } func (m *CertificateIdentifier) Marshal() (dAtA []byte, err error) { @@ -120,6 +130,11 @@ func (m *CertificateIdentifier) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintCertificateIdentifier(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x18 + } if len(m.SubjectKeyId) > 0 { i -= len(m.SubjectKeyId) copy(dAtA[i:], m.SubjectKeyId) @@ -162,6 +177,9 @@ func (m *CertificateIdentifier) Size() (n int) { if l > 0 { n += 1 + l + sovCertificateIdentifier(uint64(l)) } + if m.SchemaVersion != 0 { + n += 1 + sovCertificateIdentifier(uint64(m.SchemaVersion)) + } return n } @@ -264,6 +282,25 @@ func (m *CertificateIdentifier) Unmarshal(dAtA []byte) error { } m.SubjectKeyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCertificateIdentifier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipCertificateIdentifier(dAtA[iNdEx:]) diff --git a/x/pki/types/child_certificates.pb.go b/x/pki/types/child_certificates.pb.go index be9654666..b9751a876 100644 --- a/x/pki/types/child_certificates.pb.go +++ b/x/pki/types/child_certificates.pb.go @@ -26,6 +26,7 @@ type ChildCertificates struct { Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` AuthorityKeyId string `protobuf:"bytes,2,opt,name=authorityKeyId,proto3" json:"authorityKeyId,omitempty"` CertIds []*CertificateIdentifier `protobuf:"bytes,3,rep,name=certIds,proto3" json:"certIds,omitempty"` + SchemaVersion uint32 `protobuf:"varint,4,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *ChildCertificates) Reset() { *m = ChildCertificates{} } @@ -82,6 +83,13 @@ func (m *ChildCertificates) GetCertIds() []*CertificateIdentifier { return nil } +func (m *ChildCertificates) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*ChildCertificates)(nil), "zigbeealliance.distributedcomplianceledger.pki.ChildCertificates") } @@ -91,25 +99,26 @@ func init() { } var fileDescriptor_cda1dafd82862476 = []byte{ - // 273 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0xaf, 0xca, 0x4c, 0x4f, - 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, - 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, - 0xa7, 0x16, 0xe9, 0x17, 0x64, 0x67, 0xea, 0x27, 0x67, 0x64, 0xe6, 0xa4, 0xc4, 0x27, 0xa7, 0x16, - 0x95, 0x64, 0xa6, 0x65, 0x26, 0x27, 0x96, 0xa4, 0x16, 0xeb, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, - 0xe9, 0xa1, 0x1a, 0xa4, 0x87, 0xc7, 0x20, 0xbd, 0x82, 0xec, 0x4c, 0x29, 0x6f, 0x52, 0x2d, 0x46, - 0x58, 0x19, 0x9f, 0x99, 0x92, 0x9a, 0x07, 0xe2, 0x80, 0x8c, 0x02, 0x59, 0xae, 0xb4, 0x85, 0x91, - 0x4b, 0xd0, 0x19, 0xe4, 0x32, 0x67, 0x24, 0x87, 0x09, 0x89, 0x71, 0xb1, 0x65, 0x16, 0x17, 0x97, - 0xa6, 0x16, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x41, 0x79, 0x42, 0x6a, 0x5c, 0x7c, 0x89, - 0xa5, 0x25, 0x19, 0xf9, 0x45, 0x99, 0x25, 0x95, 0xde, 0xa9, 0x95, 0x9e, 0x29, 0x12, 0x4c, 0x60, - 0x79, 0x34, 0x51, 0xa1, 0x78, 0x2e, 0x76, 0x90, 0xad, 0x9e, 0x29, 0xc5, 0x12, 0xcc, 0x0a, 0xcc, - 0x1a, 0xdc, 0x46, 0xae, 0x24, 0x7a, 0x52, 0x0f, 0xc9, 0x39, 0x9e, 0x70, 0x37, 0x07, 0xc1, 0x4c, - 0x75, 0x8a, 0x3b, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, - 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x97, 0xf4, 0xcc, - 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0x88, 0x9d, 0xba, 0xd8, 0x42, 0x4a, 0x17, - 0x61, 0xab, 0x2e, 0x34, 0xac, 0x2a, 0xc0, 0xa1, 0x55, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, - 0x0e, 0x1d, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x70, 0xb7, 0x6a, 0x73, 0xe5, 0x01, 0x00, - 0x00, + // 298 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0xc1, 0x4a, 0xf3, 0x40, + 0x14, 0x85, 0x3b, 0x7f, 0x7f, 0x2a, 0x8e, 0x54, 0x30, 0x0b, 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6f, 0xe6, 0xd9, 0x57, 0xab, 0x73, 0x46, 0xfb, 0x46, 0xc4, 0x90, 0x06, 0x77, 0xa0, 0x0d, 0xaa, + 0xcc, 0xfd, 0x3f, 0x20, 0xc3, 0xfe, 0x6c, 0x3b, 0xbc, 0x7a, 0x78, 0xad, 0x18, 0x59, 0x54, 0x8c, + 0x7c, 0x54, 0x8c, 0xbc, 0xd4, 0xac, 0xb3, 0xa8, 0x59, 0xe7, 0xad, 0x66, 0x9d, 0xfb, 0xeb, 0x08, + 0x6d, 0x5c, 0x84, 0x5c, 0xa8, 0xd4, 0x5b, 0x92, 0x8d, 0x7e, 0xf3, 0x39, 0x5a, 0xb3, 0x8d, 0x56, + 0x46, 0x9f, 0x5a, 0xa7, 0xb6, 0xcc, 0xc1, 0x84, 0xbd, 0xd6, 0xe1, 0xe5, 0x67, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x7c, 0xff, 0x10, 0x22, 0x0b, 0x02, 0x00, 0x00, } func (m *ChildCertificates) Marshal() (dAtA []byte, err error) { @@ -132,6 +141,11 @@ func (m *ChildCertificates) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintChildCertificates(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x20 + } if len(m.CertIds) > 0 { for iNdEx := len(m.CertIds) - 1; iNdEx >= 0; iNdEx-- { { @@ -194,6 +208,9 @@ func (m *ChildCertificates) Size() (n int) { n += 1 + l + sovChildCertificates(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovChildCertificates(uint64(m.SchemaVersion)) + } return n } @@ -330,6 +347,25 @@ func (m *ChildCertificates) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChildCertificates + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipChildCertificates(dAtA[iNdEx:]) diff --git a/x/pki/types/grant.pb.go b/x/pki/types/grant.pb.go index 404c26d10..d8832b8b7 100644 --- a/x/pki/types/grant.pb.go +++ b/x/pki/types/grant.pb.go @@ -24,9 +24,10 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Grant struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Time int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` - Info string `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Time int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` + Info string `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` + SchemaVersion uint32 `protobuf:"varint,4,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *Grant) Reset() { *m = Grant{} } @@ -83,6 +84,13 @@ func (m *Grant) GetInfo() string { return "" } +func (m *Grant) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*Grant)(nil), "zigbeealliance.distributedcomplianceledger.pki.Grant") } @@ -92,23 +100,25 @@ func init() { } var fileDescriptor_046cecf95bd45d05 = []byte{ - // 248 bytes of a gzipped FileDescriptorProto + // 275 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0xaa, 0xca, 0x4c, 0x4f, 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x17, 0x64, 0x67, 0xea, 0xa7, 0x17, 0x25, 0xe6, 0x95, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xe9, 0xa1, 0xea, 0xd5, 0xc3, 0xa3, 0x57, 0xaf, 0x20, 0x3b, 0x53, 0x4a, 0x32, - 0x39, 0xbf, 0x38, 0x37, 0xbf, 0x38, 0x1e, 0xac, 0x5b, 0x1f, 0xc2, 0x81, 0x18, 0xa5, 0x94, 0xcc, - 0xc5, 0xea, 0x0e, 0x32, 0x59, 0xc8, 0x88, 0x8b, 0x3d, 0x31, 0x25, 0xa5, 0x28, 0xb5, 0xb8, 0x58, - 0x82, 0x51, 0x81, 0x51, 0x83, 0xd3, 0x49, 0xe2, 0xd2, 0x16, 0x5d, 0x11, 0xa8, 0x5a, 0x47, 0x88, - 0x4c, 0x70, 0x49, 0x51, 0x66, 0x5e, 0x7a, 0x10, 0x4c, 0xa1, 0x90, 0x10, 0x17, 0x4b, 0x49, 0x66, - 0x6e, 0xaa, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x73, 0x10, 0x98, 0x0d, 0x12, 0xcb, 0xcc, 0x4b, 0xcb, - 0x97, 0x60, 0x06, 0x19, 0x12, 0x04, 0x66, 0x3b, 0xc5, 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, - 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, - 0xb1, 0x1c, 0x43, 0x94, 0x4b, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, - 0xc4, 0x53, 0xba, 0xd8, 0x42, 0x44, 0x17, 0xe1, 0x2d, 0x5d, 0x68, 0x98, 0x54, 0x80, 0x43, 0xa5, - 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xec, 0x17, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x48, 0x59, 0x12, 0xcb, 0x54, 0x01, 0x00, 0x00, + 0x39, 0xbf, 0x38, 0x37, 0xbf, 0x38, 0x1e, 0xac, 0x5b, 0x1f, 0xc2, 0x81, 0x18, 0xa5, 0xd4, 0xc9, + 0xc8, 0xc5, 0xea, 0x0e, 0x32, 0x5a, 0xc8, 0x88, 0x8b, 0x3d, 0x31, 0x25, 0xa5, 0x28, 0xb5, 0xb8, + 0x58, 0x82, 0x51, 0x81, 0x51, 0x83, 0xd3, 0x49, 0xe2, 0xd2, 0x16, 0x5d, 0x11, 0xa8, 0x62, 0x47, + 0x88, 0x4c, 0x70, 0x49, 0x51, 0x66, 0x5e, 0x7a, 0x10, 0x4c, 0xa1, 0x90, 0x10, 0x17, 0x4b, 0x49, + 0x66, 0x6e, 0xaa, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x73, 0x10, 0x98, 0x0d, 0x12, 0xcb, 0xcc, 0x4b, + 0xcb, 0x97, 0x60, 0x06, 0x19, 0x12, 0x04, 0x66, 0x0b, 0xa9, 0x70, 0xf1, 0x16, 0x27, 0x67, 0xa4, + 0xe6, 0x26, 0x86, 0xa5, 0x16, 0x15, 0x67, 0xe6, 0xe7, 0x49, 0xb0, 0x28, 0x30, 0x6a, 0xf0, 0x06, + 0xa1, 0x0a, 0x3a, 0xc5, 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, + 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x4b, + 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xc4, 0xef, 0xba, 0xd8, 0x02, + 0x4e, 0x17, 0xe1, 0x7b, 0x5d, 0x68, 0xd0, 0x55, 0x80, 0x03, 0xaf, 0xa4, 0xb2, 0x20, 0xb5, 0x38, + 0x89, 0x0d, 0xec, 0x65, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x27, 0x18, 0xa8, 0x11, 0x7b, + 0x01, 0x00, 0x00, } func (m *Grant) Marshal() (dAtA []byte, err error) { @@ -131,6 +141,11 @@ func (m *Grant) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintGrant(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x20 + } if len(m.Info) > 0 { i -= len(m.Info) copy(dAtA[i:], m.Info) @@ -181,6 +196,9 @@ func (m *Grant) Size() (n int) { if l > 0 { n += 1 + l + sovGrant(uint64(l)) } + if m.SchemaVersion != 0 { + n += 1 + sovGrant(uint64(m.SchemaVersion)) + } return n } @@ -302,6 +320,25 @@ func (m *Grant) Unmarshal(dAtA []byte) error { } m.Info = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGrant(dAtA[iNdEx:]) diff --git a/x/pki/types/message_add_noc_x_509_ica_cert.go b/x/pki/types/message_add_noc_x_509_ica_cert.go index 26124b1a5..8d0815e60 100644 --- a/x/pki/types/message_add_noc_x_509_ica_cert.go +++ b/x/pki/types/message_add_noc_x_509_ica_cert.go @@ -13,12 +13,11 @@ const TypeMsgAddNocX509IcaCert = "add_noc_x_509_ica_cert" var _ sdk.Msg = &MsgAddNocX509IcaCert{} -func NewMsgAddNocX509IcaCert(signer string, cert string, certSchemaVersion, schemaVersion uint32) *MsgAddNocX509IcaCert { +func NewMsgAddNocX509IcaCert(signer string, cert string, schemaVersion uint32) *MsgAddNocX509IcaCert { return &MsgAddNocX509IcaCert{ Signer: signer, Cert: cert, - CertSchemaVersion: certSchemaVersion, - SchemaVersion: schemaVersion, + CertSchemaVersion: schemaVersion, } } diff --git a/x/pki/types/message_add_noc_x_509_ica_cert_test.go b/x/pki/types/message_add_noc_x_509_ica_cert_test.go index 307578b2f..c14cff6e7 100644 --- a/x/pki/types/message_add_noc_x_509_ica_cert_test.go +++ b/x/pki/types/message_add_noc_x_509_ica_cert_test.go @@ -50,23 +50,12 @@ func TestMsgAddNocX509IcaCert_ValidateBasic(t *testing.T) { }, err: validator.ErrFieldMaxLengthExceeded, }, - { - name: "schemaVersion > 65535", - msg: MsgAddNocX509IcaCert{ - Signer: sample.AccAddress(), - Cert: testconstants.NocCert1, - CertSchemaVersion: testconstants.CertSchemaVersion, - SchemaVersion: 65536, - }, - err: validator.ErrFieldUpperBoundViolated, - }, { name: "certSchemaVersion > 65535", msg: MsgAddNocX509IcaCert{ Signer: sample.AccAddress(), Cert: testconstants.NocCert1, CertSchemaVersion: 65536, - SchemaVersion: testconstants.SchemaVersion, }, err: validator.ErrFieldUpperBoundViolated, }, diff --git a/x/pki/types/message_add_noc_x_509_root_cert.go b/x/pki/types/message_add_noc_x_509_root_cert.go index ee6aa7180..98258d8b2 100644 --- a/x/pki/types/message_add_noc_x_509_root_cert.go +++ b/x/pki/types/message_add_noc_x_509_root_cert.go @@ -13,12 +13,11 @@ const TypeMsgAddNocX509RootCert = "add_noc_x_509_root_cert" var _ sdk.Msg = &MsgAddNocX509RootCert{} -func NewMsgAddNocX509RootCert(signer string, cert string, certSchemaVersion, schemaVersion uint32) *MsgAddNocX509RootCert { +func NewMsgAddNocX509RootCert(signer string, cert string, certSchemaVersion uint32) *MsgAddNocX509RootCert { return &MsgAddNocX509RootCert{ Signer: signer, Cert: cert, CertSchemaVersion: certSchemaVersion, - SchemaVersion: schemaVersion, } } diff --git a/x/pki/types/message_add_noc_x_509_root_cert_test.go b/x/pki/types/message_add_noc_x_509_root_cert_test.go index e45dac756..d5b02d7da 100644 --- a/x/pki/types/message_add_noc_x_509_root_cert_test.go +++ b/x/pki/types/message_add_noc_x_509_root_cert_test.go @@ -49,23 +49,12 @@ func TestMsgAddNocX509RootCert_ValidateBasic(t *testing.T) { }, err: validator.ErrFieldMaxLengthExceeded, }, - { - name: "schemaVersion > 65535", - msg: MsgAddNocX509RootCert{ - Signer: sample.AccAddress(), - Cert: testconstants.NocRootCert1, - CertSchemaVersion: testconstants.CertSchemaVersion, - SchemaVersion: 65536, - }, - err: validator.ErrFieldUpperBoundViolated, - }, { name: "certSchemaVersion > 65535", msg: MsgAddNocX509RootCert{ Signer: sample.AccAddress(), Cert: testconstants.NocRootCert1, CertSchemaVersion: 65536, - SchemaVersion: testconstants.SchemaVersion, }, err: validator.ErrFieldUpperBoundViolated, }, diff --git a/x/pki/types/message_add_x_509_cert.go b/x/pki/types/message_add_x_509_cert.go index 640c167c6..b7c439603 100644 --- a/x/pki/types/message_add_x_509_cert.go +++ b/x/pki/types/message_add_x_509_cert.go @@ -12,12 +12,11 @@ const TypeMsgAddX509Cert = "add_x_509_cert" var _ sdk.Msg = &MsgAddX509Cert{} -func NewMsgAddX509Cert(signer string, cert string, certSchemaVersion, schemaVersion uint32) *MsgAddX509Cert { +func NewMsgAddX509Cert(signer string, cert string, certSchemaVersion uint32) *MsgAddX509Cert { return &MsgAddX509Cert{ Signer: signer, Cert: cert, CertSchemaVersion: certSchemaVersion, - SchemaVersion: schemaVersion, } } diff --git a/x/pki/types/message_add_x_509_cert_test.go b/x/pki/types/message_add_x_509_cert_test.go index 3112f6e08..f4bc04b10 100644 --- a/x/pki/types/message_add_x_509_cert_test.go +++ b/x/pki/types/message_add_x_509_cert_test.go @@ -41,23 +41,12 @@ func TestMsgAddX509Cert_ValidateBasic(t *testing.T) { }, err: validator.ErrFieldMaxLengthExceeded, }, - { - name: "schemaVersion > 65535", - msg: MsgAddX509Cert{ - Signer: sample.AccAddress(), - Cert: testconstants.RootCertPem, - CertSchemaVersion: testconstants.CertSchemaVersion, - SchemaVersion: 65536, - }, - err: validator.ErrFieldUpperBoundViolated, - }, { name: "certSchemaVersion > 65535", msg: MsgAddX509Cert{ Signer: sample.AccAddress(), Cert: testconstants.RootCertPem, CertSchemaVersion: 65536, - SchemaVersion: testconstants.SchemaVersion, }, err: validator.ErrFieldUpperBoundViolated, }, diff --git a/x/pki/types/message_propose_add_x_509_root_cert.go b/x/pki/types/message_propose_add_x_509_root_cert.go index c1d57aa6c..9f51fad82 100644 --- a/x/pki/types/message_propose_add_x_509_root_cert.go +++ b/x/pki/types/message_propose_add_x_509_root_cert.go @@ -16,7 +16,7 @@ const TypeMsgProposeAddX509RootCert = "propose_add_x_509_root_cert" var _ sdk.Msg = &MsgProposeAddX509RootCert{} -func NewMsgProposeAddX509RootCert(signer string, cert string, info string, vid int32, certSchemaVersion, schemaVersion uint32) *MsgProposeAddX509RootCert { +func NewMsgProposeAddX509RootCert(signer string, cert string, info string, vid int32, certSchemaVersion uint32) *MsgProposeAddX509RootCert { return &MsgProposeAddX509RootCert{ Signer: signer, Cert: cert, @@ -24,7 +24,6 @@ func NewMsgProposeAddX509RootCert(signer string, cert string, info string, vid i Time: time.Now().Unix(), Vid: vid, CertSchemaVersion: certSchemaVersion, - SchemaVersion: schemaVersion, } } diff --git a/x/pki/types/message_propose_add_x_509_root_cert_test.go b/x/pki/types/message_propose_add_x_509_root_cert_test.go index c48c33066..1a0e83966 100644 --- a/x/pki/types/message_propose_add_x_509_root_cert_test.go +++ b/x/pki/types/message_propose_add_x_509_root_cert_test.go @@ -75,19 +75,6 @@ func TestMsgProposeAddX509RootCert_ValidateBasic(t *testing.T) { }, err: pkitypes.ErrCertificateVidNotEqualMsgVid, }, - { - name: "schemaVersion > 65535", - msg: MsgProposeAddX509RootCert{ - Signer: sample.AccAddress(), - Cert: testconstants.RootCertPem, - Info: testconstants.Info, - Time: 12345, - Vid: testconstants.Vid, - CertSchemaVersion: testconstants.CertSchemaVersion, - SchemaVersion: 65536, - }, - err: validator.ErrFieldUpperBoundViolated, - }, { name: "certSchemaVersion > 65535", msg: MsgProposeAddX509RootCert{ @@ -97,7 +84,6 @@ func TestMsgProposeAddX509RootCert_ValidateBasic(t *testing.T) { Time: 12345, Vid: testconstants.Vid, CertSchemaVersion: 65536, - SchemaVersion: testconstants.SchemaVersion, }, err: validator.ErrFieldUpperBoundViolated, }, diff --git a/x/pki/types/message_propose_revoke_x_509_root_cert.go b/x/pki/types/message_propose_revoke_x_509_root_cert.go index 061ef3c2c..67ad36a9a 100644 --- a/x/pki/types/message_propose_revoke_x_509_root_cert.go +++ b/x/pki/types/message_propose_revoke_x_509_root_cert.go @@ -21,17 +21,15 @@ func NewMsgProposeRevokeX509RootCert( serialNumber string, revokeChild bool, info string, - schemaVersion uint32, ) *MsgProposeRevokeX509RootCert { return &MsgProposeRevokeX509RootCert{ - Signer: signer, - Subject: subject, - SubjectKeyId: subjectKeyID, - SerialNumber: serialNumber, - RevokeChild: revokeChild, - Info: info, - Time: time.Now().Unix(), - SchemaVersion: schemaVersion, + Signer: signer, + Subject: subject, + SubjectKeyId: subjectKeyID, + SerialNumber: serialNumber, + RevokeChild: revokeChild, + Info: info, + Time: time.Now().Unix(), } } diff --git a/x/pki/types/message_propose_revoke_x_509_root_cert_test.go b/x/pki/types/message_propose_revoke_x_509_root_cert_test.go index 6144c781f..64f1c2ee8 100644 --- a/x/pki/types/message_propose_revoke_x_509_root_cert_test.go +++ b/x/pki/types/message_propose_revoke_x_509_root_cert_test.go @@ -72,17 +72,6 @@ func TestMsgProposeRevokeX509RootCert_ValidateBasic(t *testing.T) { }, err: validator.ErrFieldMaxLengthExceeded, }, - { - name: "schemaVersion > 65535", - msg: MsgProposeRevokeX509RootCert{ - Signer: sample.AccAddress(), - Subject: testconstants.RootSubject, - SubjectKeyId: testconstants.RootSubjectKeyID, - Info: testconstants.Info, - SchemaVersion: 65536, - }, - err: validator.ErrFieldUpperBoundViolated, - }, } positiveTests := []struct { diff --git a/x/pki/types/message_reject_add_x_509_root_cert.go b/x/pki/types/message_reject_add_x_509_root_cert.go index 5ca56c84e..06393f096 100644 --- a/x/pki/types/message_reject_add_x_509_root_cert.go +++ b/x/pki/types/message_reject_add_x_509_root_cert.go @@ -14,14 +14,13 @@ const TypeMsgRejectAddX509RootCert = "reject_add_x_509_root_cert" var _ sdk.Msg = &MsgRejectAddX509RootCert{} -func NewMsgRejectAddX509RootCert(signer string, subject string, subjectKeyID string, info string, schemaVersion uint32) *MsgRejectAddX509RootCert { +func NewMsgRejectAddX509RootCert(signer string, subject string, subjectKeyID string, info string) *MsgRejectAddX509RootCert { return &MsgRejectAddX509RootCert{ - Signer: signer, - Subject: subject, - SubjectKeyId: subjectKeyID, - Info: info, - Time: time.Now().Unix(), - SchemaVersion: schemaVersion, + Signer: signer, + Subject: subject, + SubjectKeyId: subjectKeyID, + Info: info, + Time: time.Now().Unix(), } } diff --git a/x/pki/types/message_reject_add_x_509_root_cert_test.go b/x/pki/types/message_reject_add_x_509_root_cert_test.go index 427b12e21..24d08854e 100644 --- a/x/pki/types/message_reject_add_x_509_root_cert_test.go +++ b/x/pki/types/message_reject_add_x_509_root_cert_test.go @@ -73,17 +73,6 @@ func TestMsgRejectAddX509RootCert_ValidateBasic(t *testing.T) { }, err: validator.ErrFieldMaxLengthExceeded, }, - { - name: "schemaVersion > 65535", - msg: MsgRejectAddX509RootCert{ - Signer: sample.AccAddress(), - Subject: testconstants.RootSubject, - SubjectKeyId: testconstants.RootSubjectKeyID, - Info: testconstants.Info, - SchemaVersion: 65536, - }, - err: validator.ErrFieldUpperBoundViolated, - }, } positiveTests := []struct { diff --git a/x/pki/types/message_revoke_noc_x_509_ica_cert.go b/x/pki/types/message_revoke_noc_x_509_ica_cert.go index 3f2c585cb..3d2705796 100644 --- a/x/pki/types/message_revoke_noc_x_509_ica_cert.go +++ b/x/pki/types/message_revoke_noc_x_509_ica_cert.go @@ -14,16 +14,15 @@ const TypeMsgRevokeNocX509IcaCert = "revoke_noc_x_509_ica_cert" var _ sdk.Msg = &MsgRevokeNocX509IcaCert{} -func NewMsgRevokeNocX509IcaCert(signer, subject, subjectKeyID, serialNumber, info string, revokeChild bool, schemaVersion uint32) *MsgRevokeNocX509IcaCert { +func NewMsgRevokeNocX509IcaCert(signer, subject, subjectKeyID, serialNumber, info string, revokeChild bool) *MsgRevokeNocX509IcaCert { return &MsgRevokeNocX509IcaCert{ - Signer: signer, - Subject: subject, - SubjectKeyId: subjectKeyID, - SerialNumber: serialNumber, - Info: info, - Time: time.Now().Unix(), - RevokeChild: revokeChild, - SchemaVersion: schemaVersion, + Signer: signer, + Subject: subject, + SubjectKeyId: subjectKeyID, + SerialNumber: serialNumber, + Info: info, + Time: time.Now().Unix(), + RevokeChild: revokeChild, } } diff --git a/x/pki/types/message_revoke_noc_x_509_ica_cert_test.go b/x/pki/types/message_revoke_noc_x_509_ica_cert_test.go index d675c05b0..fd9685f29 100644 --- a/x/pki/types/message_revoke_noc_x_509_ica_cert_test.go +++ b/x/pki/types/message_revoke_noc_x_509_ica_cert_test.go @@ -71,19 +71,6 @@ func TestMsgRevokeNocX509IcaCert_ValidateBasic(t *testing.T) { }, err: validator.ErrFieldMaxLengthExceeded, }, - { - name: "schemaVersion > 65535", - msg: MsgRevokeNocX509IcaCert{ - Signer: sample.AccAddress(), - Subject: testconstants.NocCert1Subject, - SubjectKeyId: testconstants.NocCert1SubjectKeyID, - SerialNumber: testconstants.NocCert1SerialNumber, - Info: testconstants.Info, - Time: 12345, - SchemaVersion: 65536, - }, - err: validator.ErrFieldUpperBoundViolated, - }, } positiveTests := []struct { name string diff --git a/x/pki/types/message_revoke_noc_x_509_root_cert.go b/x/pki/types/message_revoke_noc_x_509_root_cert.go index d59b9ea47..f95886a5b 100644 --- a/x/pki/types/message_revoke_noc_x_509_root_cert.go +++ b/x/pki/types/message_revoke_noc_x_509_root_cert.go @@ -14,16 +14,15 @@ const TypeMsgRevokeNocX509CRootert = "revoke_noc_x_509_root_cert" var _ sdk.Msg = &MsgRevokeNocX509RootCert{} -func NewMsgRevokeNocX509RootCert(signer, subject, subjectKeyID, serialNumber, info string, revokeChild bool, schemaVersion uint32) *MsgRevokeNocX509RootCert { +func NewMsgRevokeNocX509RootCert(signer, subject, subjectKeyID, serialNumber, info string, revokeChild bool) *MsgRevokeNocX509RootCert { return &MsgRevokeNocX509RootCert{ - Signer: signer, - Subject: subject, - SubjectKeyId: subjectKeyID, - SerialNumber: serialNumber, - Info: info, - Time: time.Now().Unix(), - RevokeChild: revokeChild, - SchemaVersion: schemaVersion, + Signer: signer, + Subject: subject, + SubjectKeyId: subjectKeyID, + SerialNumber: serialNumber, + Info: info, + Time: time.Now().Unix(), + RevokeChild: revokeChild, } } diff --git a/x/pki/types/message_revoke_noc_x_509_root_cert_test.go b/x/pki/types/message_revoke_noc_x_509_root_cert_test.go index 0f6033f9a..6596068c0 100644 --- a/x/pki/types/message_revoke_noc_x_509_root_cert_test.go +++ b/x/pki/types/message_revoke_noc_x_509_root_cert_test.go @@ -71,19 +71,6 @@ func TestMsgRevokeNocX509RootCert_ValidateBasic(t *testing.T) { }, err: validator.ErrFieldMaxLengthExceeded, }, - { - name: "schemaVersion > 65535", - msg: MsgRevokeNocX509RootCert{ - Signer: sample.AccAddress(), - Subject: testconstants.RootSubject, - SubjectKeyId: testconstants.RootSubjectKeyID, - SerialNumber: testconstants.RootSerialNumber, - Info: testconstants.Info, - Time: 12345, - SchemaVersion: 65536, - }, - err: validator.ErrFieldUpperBoundViolated, - }, } positiveTests := []struct { name string diff --git a/x/pki/types/message_revoke_x_509_cert.go b/x/pki/types/message_revoke_x_509_cert.go index b5438018c..85b59126e 100644 --- a/x/pki/types/message_revoke_x_509_cert.go +++ b/x/pki/types/message_revoke_x_509_cert.go @@ -21,17 +21,15 @@ func NewMsgRevokeX509Cert( serialNumber string, revokeChild bool, info string, - schemaVersion uint32, ) *MsgRevokeX509Cert { return &MsgRevokeX509Cert{ - Signer: signer, - Subject: subject, - SubjectKeyId: subjectKeyID, - SerialNumber: serialNumber, - RevokeChild: revokeChild, - Info: info, - Time: time.Now().Unix(), - SchemaVersion: schemaVersion, + Signer: signer, + Subject: subject, + SubjectKeyId: subjectKeyID, + SerialNumber: serialNumber, + RevokeChild: revokeChild, + Info: info, + Time: time.Now().Unix(), } } diff --git a/x/pki/types/message_revoke_x_509_cert_test.go b/x/pki/types/message_revoke_x_509_cert_test.go index e61614f31..447ac1454 100644 --- a/x/pki/types/message_revoke_x_509_cert_test.go +++ b/x/pki/types/message_revoke_x_509_cert_test.go @@ -72,18 +72,6 @@ func TestMsgRevokeX509Cert_ValidateBasic(t *testing.T) { }, err: validator.ErrFieldMaxLengthExceeded, }, - { - name: "schemaVersion > 65535", - msg: MsgRevokeX509Cert{ - Signer: sample.AccAddress(), - Subject: testconstants.RootSubject, - SubjectKeyId: testconstants.RootSubjectKeyID, - Info: testconstants.Info, - Time: 12345, - SchemaVersion: 65536, - }, - err: validator.ErrFieldUpperBoundViolated, - }, } positiveTests := []struct { diff --git a/x/pki/types/noc_root_certificates_by_vid_and_skid.pb.go b/x/pki/types/noc_root_certificates_by_vid_and_skid.pb.go index e53232df1..0cf275b11 100644 --- a/x/pki/types/noc_root_certificates_by_vid_and_skid.pb.go +++ b/x/pki/types/noc_root_certificates_by_vid_and_skid.pb.go @@ -25,10 +25,11 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type NocRootCertificatesByVidAndSkid struct { - Vid int32 `protobuf:"varint,1,opt,name=vid,proto3" json:"vid,omitempty" validate:"gte=1,lte=65535"` - SubjectKeyId string `protobuf:"bytes,2,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty"` - Certs []*Certificate `protobuf:"bytes,3,rep,name=certs,proto3" json:"certs,omitempty"` - Tq float32 `protobuf:"fixed32,4,opt,name=tq,proto3" json:"tq,omitempty"` + Vid int32 `protobuf:"varint,1,opt,name=vid,proto3" json:"vid,omitempty" validate:"gte=1,lte=65535"` + SubjectKeyId string `protobuf:"bytes,2,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty"` + Certs []*Certificate `protobuf:"bytes,3,rep,name=certs,proto3" json:"certs,omitempty"` + Tq float32 `protobuf:"fixed32,4,opt,name=tq,proto3" json:"tq,omitempty"` + SchemaVersion uint32 `protobuf:"varint,5,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *NocRootCertificatesByVidAndSkid) Reset() { *m = NocRootCertificatesByVidAndSkid{} } @@ -92,6 +93,13 @@ func (m *NocRootCertificatesByVidAndSkid) GetTq() float32 { return 0 } +func (m *NocRootCertificatesByVidAndSkid) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*NocRootCertificatesByVidAndSkid)(nil), "zigbeealliance.distributedcomplianceledger.pki.NocRootCertificatesByVidAndSkid") } @@ -101,29 +109,31 @@ func init() { } var fileDescriptor_f3e80b73a145a96e = []byte{ - // 345 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0x31, 0x4b, 0xc3, 0x40, - 0x14, 0x80, 0x7b, 0xa9, 0x15, 0x8c, 0xe2, 0x10, 0x1c, 0x42, 0x87, 0x6b, 0xc8, 0x94, 0xc1, 0x26, - 0x6a, 0xa9, 0x83, 0x52, 0xd0, 0xea, 0x22, 0x82, 0x60, 0x04, 0x87, 0x0e, 0x86, 0xe4, 0xee, 0x8c, - 0xcf, 0xa4, 0xb9, 0x34, 0x79, 0x2d, 0xc6, 0x5f, 0xe1, 0xcf, 0x72, 0xec, 0x28, 0x0e, 0x22, 0xed, - 0x3f, 0xf0, 0x17, 0x48, 0x1b, 0xc1, 0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, 0xd5, 0xa8, 0x5a, 0x9b, - 0x07, 0xc7, 0x2b, 0x16, 0xb1, 0x17, 0x74, 0xdd, 0x92, 0xa4, 0x6d, 0xab, 0x0a, 0x0e, 0xf4, 0x35, - 0x83, 0x58, 0x8a, 0xab, 0xe0, 0xa0, 0x7b, 0xf7, 0x3a, 0xa1, 0x64, 0x3c, 0xa1, 0xe4, 0x73, 0x42, - 0xc9, 0xcb, 0x94, 0x56, 0xc6, 0x53, 0x5a, 0x79, 0x9b, 0xd2, 0x4a, 0xef, 0x3c, 0x04, 0x7c, 0x18, - 0x06, 0x36, 0x93, 0x7d, 0xa7, 0xbc, 0xdb, 0xfc, 0x2b, 0x62, 0xf3, 0xf7, 0x72, 0xf3, 0x27, 0xe3, - 0xd3, 0x3c, 0x24, 0x16, 0xa9, 0xc8, 0x83, 0xf5, 0x79, 0xc3, 0xd6, 0x77, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x51, 0xc7, 0x5b, 0x3f, 0x29, 0x02, 0x00, 0x00, + // 371 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0xc1, 0x4a, 0xe3, 0x40, + 0x18, 0xc7, 0x3b, 0xe9, 0x76, 0x61, 0xb3, 0xdb, 0x3d, 0x84, 0x3d, 0x84, 0x1e, 0xd2, 0x10, 0xf6, + 0x90, 0xc3, 0x36, 0x59, 0x2d, 0xf5, 0xa0, 0x14, 0xb4, 0x7a, 0x11, 0x41, 0x30, 0x42, 0x0f, 0x3d, + 0x18, 0x92, 0x99, 0xcf, 0xf4, 0x33, 0x69, 0x26, 0xcd, 0x4c, 0x8b, 0xf1, 0xe4, 0x23, 0xf8, 0x58, + 0x1e, 0x7b, 0xf4, 0x24, 0xd2, 0xbe, 0x81, 0x4f, 0x20, 0x6d, 0x04, 0x5b, 0x10, 0xa1, 0xb7, 0xe1, + 0xcf, 0x7c, 0x3f, 0x7e, 0xfc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d7, 0x2b, 0x49, 0xda, + 0x6f, 0x55, 0x91, 0x63, 0xfd, 0x9b, 0x49, 0x6c, 0xc5, 0x53, 0xe4, 0x58, 0xfb, 0xab, 0xd6, 0x05, + 0x1d, 0xc2, 0x28, 0xe8, 0x43, 0x2e, 0x90, 0xa7, 0x7a, 0xcd, 0x24, 0x76, 0xdd, 0xdb, 0x1c, 0x7b, + 0x57, 0x8f, 0x73, 0x83, 0xcc, 0xe6, 0x06, 0x79, 0x99, 0x1b, 0xe4, 0x61, 0x61, 0x54, 0x66, 0x0b, + 0xa3, 0xf2, 0xb4, 0x30, 0x2a, 0x83, 0x93, 0x08, 0xe5, 0x70, 0x12, 0x3a, 0x94, 0x8f, 0xdc, 0xd2, + 0xae, 0xf5, 0x59, 0xea, 0xd6, 0x87, 0x5f, 0xeb, 0x3d, 0xf6, 0xed, 0x2a, 0xb7, 0x2c, 0x32, 0x10, + 0xe1, 0xf7, 0x55, 0xe9, 0xf6, 0x5b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xac, 0xd2, 0xcd, 0x04, 0x4f, + 0x02, 0x00, 0x00, } func (m *NocRootCertificatesByVidAndSkid) Marshal() (dAtA []byte, err error) { @@ -146,6 +156,11 @@ func (m *NocRootCertificatesByVidAndSkid) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintNocRootCertificatesByVidAndSkid(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x28 + } if m.Tq != 0 { i -= 4 encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Tq)))) @@ -214,6 +229,9 @@ func (m *NocRootCertificatesByVidAndSkid) Size() (n int) { if m.Tq != 0 { n += 5 } + if m.SchemaVersion != 0 { + n += 1 + sovNocRootCertificatesByVidAndSkid(uint64(m.SchemaVersion)) + } return n } @@ -348,6 +366,25 @@ func (m *NocRootCertificatesByVidAndSkid) Unmarshal(dAtA []byte) error { v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.Tq = float32(math.Float32frombits(v)) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNocRootCertificatesByVidAndSkid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipNocRootCertificatesByVidAndSkid(dAtA[iNdEx:]) diff --git a/x/pki/types/pki_revocation_distribution_points_by_issuer_subject_key_id.pb.go b/x/pki/types/pki_revocation_distribution_points_by_issuer_subject_key_id.pb.go index af7deff1c..9e0785442 100644 --- a/x/pki/types/pki_revocation_distribution_points_by_issuer_subject_key_id.pb.go +++ b/x/pki/types/pki_revocation_distribution_points_by_issuer_subject_key_id.pb.go @@ -25,6 +25,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type PkiRevocationDistributionPointsByIssuerSubjectKeyID struct { IssuerSubjectKeyID string `protobuf:"bytes,1,opt,name=issuerSubjectKeyID,proto3" json:"issuerSubjectKeyID,omitempty"` Points []*PkiRevocationDistributionPoint `protobuf:"bytes,2,rep,name=points,proto3" json:"points,omitempty"` + SchemaVersion uint32 `protobuf:"varint,3,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *PkiRevocationDistributionPointsByIssuerSubjectKeyID) Reset() { @@ -78,6 +79,13 @@ func (m *PkiRevocationDistributionPointsByIssuerSubjectKeyID) GetPoints() []*Pki return nil } +func (m *PkiRevocationDistributionPointsByIssuerSubjectKeyID) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*PkiRevocationDistributionPointsByIssuerSubjectKeyID)(nil), "zigbeealliance.distributedcomplianceledger.pki.PkiRevocationDistributionPointsByIssuerSubjectKeyID") } @@ -87,25 +95,26 @@ func init() { } var fileDescriptor_0b1940ba04139c1b = []byte{ - // 278 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x2a, 0xa8, 0xca, 0x4c, 0x4f, - 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, - 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, - 0xa7, 0x16, 0xe9, 0x17, 0x64, 0x67, 0x82, 0x70, 0x7c, 0x51, 0x6a, 0x59, 0x7e, 0x72, 0x62, 0x49, - 0x66, 0x7e, 0x5e, 0x3c, 0x5c, 0x39, 0x88, 0x53, 0x90, 0x9f, 0x99, 0x57, 0x52, 0x1c, 0x9f, 0x54, - 0x19, 0x9f, 0x59, 0x5c, 0x5c, 0x9a, 0x5a, 0x14, 0x5f, 0x5c, 0x9a, 0x94, 0x95, 0x9a, 0x5c, 0x12, - 0x9f, 0x9d, 0x5a, 0x19, 0x9f, 0x99, 0xa2, 0x57, 0x50, 0x94, 0x5f, 0x92, 0x2f, 0xa4, 0x87, 0x6a, - 0xa3, 0x1e, 0x1e, 0x1b, 0xf5, 0x0a, 0xb2, 0x33, 0xa5, 0xc2, 0xa8, 0xed, 0x42, 0x88, 0x3b, 0x94, - 0xce, 0x32, 0x72, 0x19, 0x07, 0x64, 0x67, 0x06, 0xc1, 0x95, 0xba, 0x20, 0xa9, 0x0c, 0x00, 0x7b, - 0xc5, 0xa9, 0xd2, 0x13, 0xec, 0x91, 0x60, 0x88, 0x3f, 0xbc, 0x53, 0x2b, 0x3d, 0x5d, 0x84, 0xf4, - 0xb8, 0x84, 0x32, 0x31, 0x44, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xb0, 0xc8, 0x08, 0xa5, - 0x71, 0xb1, 0x41, 0x02, 0x46, 0x82, 0x49, 0x81, 0x59, 0x83, 0xdb, 0xc8, 0x8f, 0xc4, 0x00, 0xd0, - 0xc3, 0xef, 0xc8, 0x20, 0xa8, 0xe9, 0x4e, 0x71, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, - 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, - 0xc7, 0x10, 0xe5, 0x92, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0xb1, - 0x5b, 0x17, 0x5b, 0x68, 0xea, 0x22, 0x6c, 0xd7, 0x85, 0x86, 0x67, 0x05, 0x38, 0x44, 0x4b, 0x2a, - 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xc1, 0x66, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x94, 0x1c, - 0xff, 0x07, 0x32, 0x02, 0x00, 0x00, + // 304 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x90, 0x4f, 0x4a, 0x03, 0x31, + 0x14, 0xc6, 0x1b, 0x0b, 0x05, 0x47, 0xba, 0x99, 0x55, 0x71, 0x11, 0x8a, 0xb8, 0xe8, 0xa6, 0x29, + 0xd8, 0x1b, 0x94, 0x6e, 0x8a, 0x20, 0x65, 0x84, 0x2e, 0x5c, 0x18, 0x26, 0x99, 0x67, 0xfb, 0x9c, + 0x3f, 0x09, 0x49, 0x46, 0x1c, 0x4f, 0xe1, 0xb1, 0x5c, 0x76, 0xe9, 0x52, 0x66, 0x8e, 0xe0, 0x05, + 0xa4, 0x33, 0xa5, 0x5a, 0x2c, 0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d, 0xad, 0x2b, 0xda, + 0x7a, 0xaf, 0x68, 0xeb, 0x6e, 0xba, 0x44, 0xb7, 0xca, 0x05, 0x93, 0x2a, 0x1d, 0x35, 0x84, 0xc3, + 0x43, 0xce, 0x87, 0xdf, 0x8c, 0xc3, 0xad, 0xf5, 0xe7, 0xda, 0xbb, 0x2b, 0x34, 0x58, 0xd1, 0xa9, + 0xe5, 0x8e, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x18, 0x8d, 0x09, 0xb4, 0x58, 0x02, 0x00, 0x00, } func (m *PkiRevocationDistributionPointsByIssuerSubjectKeyID) Marshal() (dAtA []byte, err error) { @@ -128,6 +137,11 @@ func (m *PkiRevocationDistributionPointsByIssuerSubjectKeyID) MarshalToSizedBuff _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintPkiRevocationDistributionPointsByIssuerSubjectKeyId(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x18 + } if len(m.Points) > 0 { for iNdEx := len(m.Points) - 1; iNdEx >= 0; iNdEx-- { { @@ -179,6 +193,9 @@ func (m *PkiRevocationDistributionPointsByIssuerSubjectKeyID) Size() (n int) { n += 1 + l + sovPkiRevocationDistributionPointsByIssuerSubjectKeyId(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovPkiRevocationDistributionPointsByIssuerSubjectKeyId(uint64(m.SchemaVersion)) + } return n } @@ -283,6 +300,25 @@ func (m *PkiRevocationDistributionPointsByIssuerSubjectKeyID) Unmarshal(dAtA []b return err } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPkiRevocationDistributionPointsByIssuerSubjectKeyId + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipPkiRevocationDistributionPointsByIssuerSubjectKeyId(dAtA[iNdEx:]) diff --git a/x/pki/types/revoked_noc_root_certificates.pb.go b/x/pki/types/revoked_noc_root_certificates.pb.go index b049fa6af..09db907d6 100644 --- a/x/pki/types/revoked_noc_root_certificates.pb.go +++ b/x/pki/types/revoked_noc_root_certificates.pb.go @@ -23,9 +23,10 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type RevokedNocRootCertificates struct { - Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` - SubjectKeyId string `protobuf:"bytes,2,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty"` - Certs []*Certificate `protobuf:"bytes,3,rep,name=certs,proto3" json:"certs,omitempty"` + Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` + SubjectKeyId string `protobuf:"bytes,2,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty"` + Certs []*Certificate `protobuf:"bytes,3,rep,name=certs,proto3" json:"certs,omitempty"` + SchemaVersion uint32 `protobuf:"varint,4,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *RevokedNocRootCertificates) Reset() { *m = RevokedNocRootCertificates{} } @@ -82,6 +83,13 @@ func (m *RevokedNocRootCertificates) GetCerts() []*Certificate { return nil } +func (m *RevokedNocRootCertificates) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*RevokedNocRootCertificates)(nil), "zigbeealliance.distributedcomplianceledger.pki.RevokedNocRootCertificates") } @@ -91,24 +99,26 @@ func init() { } var fileDescriptor_05cdc636552868bf = []byte{ - // 270 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x0a, 0xaa, 0xca, 0x4c, 0x4f, - 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, - 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, - 0xa7, 0x16, 0xe9, 0x17, 0x64, 0x67, 0xea, 0x17, 0xa5, 0x96, 0xe5, 0x67, 0xa7, 0xa6, 0xc4, 0xe7, - 0xe5, 0x27, 0xc7, 0x17, 0xe5, 0xe7, 0x97, 0xc4, 0x27, 0xa7, 0x16, 0x95, 0x64, 0xa6, 0x65, 0x26, - 0x27, 0x96, 0xa4, 0x16, 0xeb, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xe9, 0xa1, 0x9a, 0xa9, 0x87, - 0xc7, 0x4c, 0xbd, 0x82, 0xec, 0x4c, 0x29, 0x07, 0x12, 0xdd, 0x80, 0x64, 0x25, 0xc4, 0x46, 0xa5, - 0xb5, 0x8c, 0x5c, 0x52, 0x41, 0x10, 0x97, 0xf9, 0xe5, 0x27, 0x07, 0xe5, 0xe7, 0x97, 0x38, 0x23, - 0x39, 0x4b, 0x48, 0x82, 0x8b, 0xbd, 0xb8, 0x34, 0x29, 0x2b, 0x35, 0xb9, 0x44, 0x82, 0x51, 0x81, - 0x51, 0x83, 0x33, 0x08, 0xc6, 0x15, 0x52, 0xe2, 0xe2, 0x81, 0x32, 0xbd, 0x53, 0x2b, 0x3d, 0x53, - 0x24, 0x98, 0xc0, 0xd2, 0x28, 0x62, 0x42, 0x81, 0x5c, 0xac, 0x20, 0x1b, 0x8b, 0x25, 0x98, 0x15, - 0x98, 0x35, 0xb8, 0x8d, 0xac, 0x49, 0xf4, 0x9e, 0x1e, 0x92, 0x53, 0x82, 0x20, 0x26, 0x39, 0xc5, - 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, - 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x4b, 0x7a, 0x66, 0x49, 0x46, - 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xc4, 0x1e, 0x5d, 0x6c, 0xe1, 0xa2, 0x8b, 0xb0, 0x49, - 0x17, 0x1a, 0x32, 0x15, 0xe0, 0xb0, 0x29, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0x07, 0x8b, - 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x47, 0x00, 0x55, 0xda, 0xde, 0x01, 0x00, 0x00, + // 296 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0x3f, 0x4b, 0xfc, 0x30, + 0x1c, 0xc6, 0x2f, 0xbf, 0xfb, 0xa9, 0x18, 0xbd, 0xa5, 0x53, 0xb9, 0x21, 0x1c, 0x87, 0xc3, 0x2d, + 0x97, 0x82, 0x8e, 0x2e, 0xa2, 0x2e, 0x22, 0x08, 0x66, 0x70, 0x70, 0xb0, 0xb4, 0xe9, 0xd7, 0x5e, + 0xec, 0x9f, 0x6f, 0x49, 0x52, 0xf1, 0x7c, 0x15, 0xbe, 0x2c, 0xc7, 0x03, 0x17, 0x47, 0x69, 0xdf, + 0x88, 0xd8, 0x9e, 0xd8, 0x82, 0x08, 0xb7, 0x25, 0x4f, 0xe0, 0x79, 0x3e, 0xf9, 0x50, 0xf1, 0xac, + 0xe2, 0x10, 0x20, 0x48, 0x53, 0x15, 0xe4, 0x12, 0xbc, 0x48, 0x19, 0xab, 0x55, 0x58, 0x5a, 0x88, + 0x24, 0x66, 0x45, 0x9b, 0xa6, 0x10, 0xc5, 0xa0, 0xbd, 0x22, 0x51, 0x9e, 0x86, 0x47, 0x4c, 0x20, + 0xf2, 0x73, 0x94, 0xbe, 0x46, 0xb4, 0xbe, 0x04, 0x6d, 0xd5, 0xbd, 0x92, 0x81, 0x05, 0xc3, 0x0b, + 0x8d, 0x16, 0x1d, 0xde, 0xef, 0xe4, 0x7f, 0x74, 0xf2, 0x22, 0x51, 0xe3, 0x93, 0x0d, 0x19, 0x3a, + 0x93, 0xed, 0xe2, 0xf4, 0x8d, 0xd0, 0xb1, 0x68, 0xc9, 0xae, 0x50, 0x0a, 0x44, 0x7b, 0xd6, 0xc1, + 0x72, 0x5c, 0xba, 0x63, 0xca, 0xf0, 0x01, 0xa4, 0x75, 0xc9, 0x84, 0xcc, 0x76, 0xc5, 0xf7, 0xd5, + 0x99, 0xd2, 0xfd, 0xf5, 0xf1, 0x12, 0x96, 0x17, 0x91, 0xfb, 0xaf, 0x79, 0xee, 0x65, 0xce, 0x35, + 0xdd, 0xfa, 0x5a, 0x34, 0xee, 0x70, 0x32, 0x9c, 0xed, 0x1d, 0x1e, 0x6f, 0xf8, 0x3d, 0xde, 0x41, + 0x11, 0x6d, 0x93, 0x73, 0x40, 0x47, 0x46, 0x2e, 0x20, 0x0b, 0x6e, 0x40, 0x1b, 0x85, 0xb9, 0xfb, + 0x7f, 0x42, 0x66, 0x23, 0xd1, 0x0f, 0x4f, 0xef, 0x5e, 0x2b, 0x46, 0x56, 0x15, 0x23, 0x1f, 0x15, + 0x23, 0x2f, 0x35, 0x1b, 0xac, 0x6a, 0x36, 0x78, 0xaf, 0xd9, 0xe0, 0xf6, 0x3c, 0x56, 0x76, 0x51, + 0x86, 0x5c, 0x62, 0xe6, 0xb5, 0x34, 0xf3, 0xdf, 0xec, 0xcd, 0x7f, 0x78, 0xe6, 0x6b, 0x7f, 0x4f, + 0x8d, 0x41, 0xbb, 0x2c, 0xc0, 0x84, 0xdb, 0x8d, 0xbc, 0xa3, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x45, 0xc8, 0xf0, 0x74, 0x04, 0x02, 0x00, 0x00, } func (m *RevokedNocRootCertificates) Marshal() (dAtA []byte, err error) { @@ -131,6 +141,11 @@ func (m *RevokedNocRootCertificates) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintRevokedNocRootCertificates(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x20 + } if len(m.Certs) > 0 { for iNdEx := len(m.Certs) - 1; iNdEx >= 0; iNdEx-- { { @@ -193,6 +208,9 @@ func (m *RevokedNocRootCertificates) Size() (n int) { n += 1 + l + sovRevokedNocRootCertificates(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovRevokedNocRootCertificates(uint64(m.SchemaVersion)) + } return n } @@ -329,6 +347,25 @@ func (m *RevokedNocRootCertificates) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRevokedNocRootCertificates + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipRevokedNocRootCertificates(dAtA[iNdEx:]) diff --git a/x/pki/types/revoked_root_certificates.pb.go b/x/pki/types/revoked_root_certificates.pb.go index 3a562f638..d152bad58 100644 --- a/x/pki/types/revoked_root_certificates.pb.go +++ b/x/pki/types/revoked_root_certificates.pb.go @@ -23,7 +23,8 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type RevokedRootCertificates struct { - Certs []*CertificateIdentifier `protobuf:"bytes,1,rep,name=certs,proto3" json:"certs,omitempty"` + Certs []*CertificateIdentifier `protobuf:"bytes,1,rep,name=certs,proto3" json:"certs,omitempty"` + SchemaVersion uint32 `protobuf:"varint,2,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *RevokedRootCertificates) Reset() { *m = RevokedRootCertificates{} } @@ -66,6 +67,13 @@ func (m *RevokedRootCertificates) GetCerts() []*CertificateIdentifier { return nil } +func (m *RevokedRootCertificates) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*RevokedRootCertificates)(nil), "zigbeealliance.distributedcomplianceledger.pki.RevokedRootCertificates") } @@ -75,7 +83,7 @@ func init() { } var fileDescriptor_e94861023281b0eb = []byte{ - // 237 bytes of a gzipped FileDescriptorProto + // 265 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0xab, 0xca, 0x4c, 0x4f, 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, @@ -83,14 +91,16 @@ var fileDescriptor_e94861023281b0eb = []byte{ 0xe5, 0xe7, 0x97, 0xc4, 0x27, 0xa7, 0x16, 0x95, 0x64, 0xa6, 0x65, 0x26, 0x27, 0x96, 0xa4, 0x16, 0xeb, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xe9, 0xa1, 0x9a, 0xa7, 0x87, 0xc7, 0x3c, 0xbd, 0x82, 0xec, 0x4c, 0x29, 0x6f, 0x12, 0xed, 0x47, 0xb2, 0x32, 0x3e, 0x33, 0x25, 0x35, 0x0f, 0xc4, 0x01, - 0x19, 0x05, 0xb2, 0x5c, 0xa9, 0x8c, 0x4b, 0x3c, 0x08, 0xe2, 0xbe, 0xa0, 0xfc, 0xfc, 0x12, 0x67, - 0x24, 0xd7, 0x09, 0x45, 0x73, 0xb1, 0x82, 0xb4, 0x16, 0x4b, 0x30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xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, + 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x2e, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, + 0xfa, 0x10, 0x77, 0xe9, 0x62, 0x0b, 0x11, 0x5d, 0x84, 0xcb, 0x74, 0xa1, 0x61, 0x52, 0x01, 0x0e, + 0x95, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0x70, 0x28, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x22, 0x19, 0xe5, 0xda, 0xd4, 0x01, 0x00, 0x00, } func (m *RevokedRootCertificates) Marshal() (dAtA []byte, err error) { @@ -113,6 +123,11 @@ func (m *RevokedRootCertificates) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintRevokedRootCertificates(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x10 + } if len(m.Certs) > 0 { for iNdEx := len(m.Certs) - 1; iNdEx >= 0; iNdEx-- { { @@ -153,6 +168,9 @@ func (m *RevokedRootCertificates) Size() (n int) { n += 1 + l + sovRevokedRootCertificates(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovRevokedRootCertificates(uint64(m.SchemaVersion)) + } return n } @@ -225,6 +243,25 @@ func (m *RevokedRootCertificates) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRevokedRootCertificates + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipRevokedRootCertificates(dAtA[iNdEx:]) diff --git a/x/pki/types/tx.pb.go b/x/pki/types/tx.pb.go index 54c8df107..54e9f88a6 100644 --- a/x/pki/types/tx.pb.go +++ b/x/pki/types/tx.pb.go @@ -36,7 +36,6 @@ type MsgProposeAddX509RootCert struct { Time int64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"` Vid int32 `protobuf:"varint,5,opt,name=vid,proto3" json:"vid,omitempty" validate:"gte=1,lte=65535,required"` CertSchemaVersion uint32 `protobuf:"varint,6,opt,name=certSchemaVersion,proto3" json:"certSchemaVersion,omitempty" validate:"gte=0,lte=65535"` - SchemaVersion uint32 `protobuf:"varint,7,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty" validate:"gte=0,lte=65535"` } func (m *MsgProposeAddX509RootCert) Reset() { *m = MsgProposeAddX509RootCert{} } @@ -114,13 +113,6 @@ func (m *MsgProposeAddX509RootCert) GetCertSchemaVersion() uint32 { return 0 } -func (m *MsgProposeAddX509RootCert) GetSchemaVersion() uint32 { - if m != nil { - return m.SchemaVersion - } - return 0 -} - type MsgProposeAddX509RootCertResponse struct { } @@ -275,7 +267,6 @@ type MsgAddX509Cert struct { Info string `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty" validate:"max=4096"` Time int64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"` CertSchemaVersion uint32 `protobuf:"varint,5,opt,name=certSchemaVersion,proto3" json:"certSchemaVersion,omitempty" validate:"gte=0,lte=65535"` - SchemaVersion uint32 `protobuf:"varint,6,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty" validate:"gte=0,lte=65535"` } func (m *MsgAddX509Cert) Reset() { *m = MsgAddX509Cert{} } @@ -346,13 +337,6 @@ func (m *MsgAddX509Cert) GetCertSchemaVersion() uint32 { return 0 } -func (m *MsgAddX509Cert) GetSchemaVersion() uint32 { - if m != nil { - return m.SchemaVersion - } - return 0 -} - type MsgAddX509CertResponse struct { } @@ -390,14 +374,13 @@ func (m *MsgAddX509CertResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgAddX509CertResponse proto.InternalMessageInfo type MsgProposeRevokeX509RootCert struct { - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" validate:"required"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty" validate:"required,max=1024"` - SubjectKeyId string `protobuf:"bytes,3,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty" validate:"required,max=256"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty" validate:"max=4096"` - Time int64 `protobuf:"varint,5,opt,name=time,proto3" json:"time,omitempty"` - SerialNumber string `protobuf:"bytes,6,opt,name=serialNumber,proto3" json:"serialNumber,omitempty"` - RevokeChild bool `protobuf:"varint,7,opt,name=revokeChild,proto3" json:"revokeChild,omitempty"` - SchemaVersion uint32 `protobuf:"varint,8,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty" validate:"gte=0,lte=65535"` + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" validate:"required"` + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty" validate:"required,max=1024"` + SubjectKeyId string `protobuf:"bytes,3,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty" validate:"required,max=256"` + Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty" validate:"max=4096"` + Time int64 `protobuf:"varint,5,opt,name=time,proto3" json:"time,omitempty"` + SerialNumber string `protobuf:"bytes,6,opt,name=serialNumber,proto3" json:"serialNumber,omitempty"` + RevokeChild bool `protobuf:"varint,7,opt,name=revokeChild,proto3" json:"revokeChild,omitempty"` } func (m *MsgProposeRevokeX509RootCert) Reset() { *m = MsgProposeRevokeX509RootCert{} } @@ -482,13 +465,6 @@ func (m *MsgProposeRevokeX509RootCert) GetRevokeChild() bool { return false } -func (m *MsgProposeRevokeX509RootCert) GetSchemaVersion() uint32 { - if m != nil { - return m.SchemaVersion - } - return 0 -} - type MsgProposeRevokeX509RootCertResponse struct { } @@ -646,14 +622,13 @@ func (m *MsgApproveRevokeX509RootCertResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgApproveRevokeX509RootCertResponse proto.InternalMessageInfo type MsgRevokeX509Cert struct { - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" validate:"required"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty" validate:"required,max=1024"` - SubjectKeyId string `protobuf:"bytes,3,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty" validate:"required,max=256"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty" validate:"max=4096"` - Time int64 `protobuf:"varint,5,opt,name=time,proto3" json:"time,omitempty"` - SerialNumber string `protobuf:"bytes,6,opt,name=serialNumber,proto3" json:"serialNumber,omitempty"` - RevokeChild bool `protobuf:"varint,7,opt,name=revokeChild,proto3" json:"revokeChild,omitempty"` - SchemaVersion uint32 `protobuf:"varint,8,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty" validate:"gte=0,lte=65535"` + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" validate:"required"` + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty" validate:"required,max=1024"` + SubjectKeyId string `protobuf:"bytes,3,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty" validate:"required,max=256"` + Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty" validate:"max=4096"` + Time int64 `protobuf:"varint,5,opt,name=time,proto3" json:"time,omitempty"` + SerialNumber string `protobuf:"bytes,6,opt,name=serialNumber,proto3" json:"serialNumber,omitempty"` + RevokeChild bool `protobuf:"varint,7,opt,name=revokeChild,proto3" json:"revokeChild,omitempty"` } func (m *MsgRevokeX509Cert) Reset() { *m = MsgRevokeX509Cert{} } @@ -738,13 +713,6 @@ func (m *MsgRevokeX509Cert) GetRevokeChild() bool { return false } -func (m *MsgRevokeX509Cert) GetSchemaVersion() uint32 { - if m != nil { - return m.SchemaVersion - } - return 0 -} - type MsgRevokeX509CertResponse struct { } @@ -782,12 +750,11 @@ func (m *MsgRevokeX509CertResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRevokeX509CertResponse proto.InternalMessageInfo type MsgRejectAddX509RootCert struct { - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" validate:"required"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty" validate:"required,max=1024"` - SubjectKeyId string `protobuf:"bytes,3,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty" validate:"required,max=256"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty" validate:"max=4096"` - Time int64 `protobuf:"varint,5,opt,name=time,proto3" json:"time,omitempty"` - SchemaVersion uint32 `protobuf:"varint,6,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty" validate:"gte=0,lte=65535"` + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" validate:"required"` + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty" validate:"required,max=1024"` + SubjectKeyId string `protobuf:"bytes,3,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty" validate:"required,max=256"` + Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty" validate:"max=4096"` + Time int64 `protobuf:"varint,5,opt,name=time,proto3" json:"time,omitempty"` } func (m *MsgRejectAddX509RootCert) Reset() { *m = MsgRejectAddX509RootCert{} } @@ -858,13 +825,6 @@ func (m *MsgRejectAddX509RootCert) GetTime() int64 { return 0 } -func (m *MsgRejectAddX509RootCert) GetSchemaVersion() uint32 { - if m != nil { - return m.SchemaVersion - } - return 0 -} - type MsgRejectAddX509RootCertResponse struct { } @@ -1473,7 +1433,6 @@ type MsgAddNocX509RootCert struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" validate:"required"` Cert string `protobuf:"bytes,2,opt,name=cert,proto3" json:"cert,omitempty" validate:"required,max=10485760"` CertSchemaVersion uint32 `protobuf:"varint,4,opt,name=certSchemaVersion,proto3" json:"certSchemaVersion,omitempty" validate:"gte=0,lte=65535"` - SchemaVersion uint32 `protobuf:"varint,5,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty" validate:"gte=0,lte=65535"` } func (m *MsgAddNocX509RootCert) Reset() { *m = MsgAddNocX509RootCert{} } @@ -1530,13 +1489,6 @@ func (m *MsgAddNocX509RootCert) GetCertSchemaVersion() uint32 { return 0 } -func (m *MsgAddNocX509RootCert) GetSchemaVersion() uint32 { - if m != nil { - return m.SchemaVersion - } - return 0 -} - type MsgAddNocX509RootCertResponse struct { } @@ -1681,7 +1633,6 @@ type MsgAddNocX509IcaCert struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" validate:"required"` Cert string `protobuf:"bytes,2,opt,name=cert,proto3" json:"cert,omitempty" validate:"required,max=10485760"` CertSchemaVersion uint32 `protobuf:"varint,3,opt,name=certSchemaVersion,proto3" json:"certSchemaVersion,omitempty" validate:"gte=0,lte=65535"` - SchemaVersion uint32 `protobuf:"varint,4,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty" validate:"gte=0,lte=65535"` } func (m *MsgAddNocX509IcaCert) Reset() { *m = MsgAddNocX509IcaCert{} } @@ -1738,13 +1689,6 @@ func (m *MsgAddNocX509IcaCert) GetCertSchemaVersion() uint32 { return 0 } -func (m *MsgAddNocX509IcaCert) GetSchemaVersion() uint32 { - if m != nil { - return m.SchemaVersion - } - return 0 -} - type MsgAddNocX509IcaCertResponse struct { } @@ -1782,14 +1726,13 @@ func (m *MsgAddNocX509IcaCertResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgAddNocX509IcaCertResponse proto.InternalMessageInfo type MsgRevokeNocX509RootCert struct { - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" validate:"required"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty" validate:"required,max=1024"` - SubjectKeyId string `protobuf:"bytes,3,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty" validate:"required,max=256"` - SerialNumber string `protobuf:"bytes,4,opt,name=serialNumber,proto3" json:"serialNumber,omitempty"` - Info string `protobuf:"bytes,5,opt,name=info,proto3" json:"info,omitempty" validate:"max=4096"` - Time int64 `protobuf:"varint,6,opt,name=time,proto3" json:"time,omitempty"` - RevokeChild bool `protobuf:"varint,7,opt,name=revokeChild,proto3" json:"revokeChild,omitempty"` - SchemaVersion uint32 `protobuf:"varint,8,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty" validate:"gte=0,lte=65535"` + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" validate:"required"` + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty" validate:"required,max=1024"` + SubjectKeyId string `protobuf:"bytes,3,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty" validate:"required,max=256"` + SerialNumber string `protobuf:"bytes,4,opt,name=serialNumber,proto3" json:"serialNumber,omitempty"` + Info string `protobuf:"bytes,5,opt,name=info,proto3" json:"info,omitempty" validate:"max=4096"` + Time int64 `protobuf:"varint,6,opt,name=time,proto3" json:"time,omitempty"` + RevokeChild bool `protobuf:"varint,7,opt,name=revokeChild,proto3" json:"revokeChild,omitempty"` } func (m *MsgRevokeNocX509RootCert) Reset() { *m = MsgRevokeNocX509RootCert{} } @@ -1874,13 +1817,6 @@ func (m *MsgRevokeNocX509RootCert) GetRevokeChild() bool { return false } -func (m *MsgRevokeNocX509RootCert) GetSchemaVersion() uint32 { - if m != nil { - return m.SchemaVersion - } - return 0 -} - type MsgRevokeNocX509RootCertResponse struct { } @@ -1918,14 +1854,13 @@ func (m *MsgRevokeNocX509RootCertResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRevokeNocX509RootCertResponse proto.InternalMessageInfo type MsgRevokeNocX509IcaCert struct { - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" validate:"required"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty" validate:"required,max=1024"` - SubjectKeyId string `protobuf:"bytes,3,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty" validate:"required,max=256"` - SerialNumber string `protobuf:"bytes,4,opt,name=serialNumber,proto3" json:"serialNumber,omitempty"` - Info string `protobuf:"bytes,5,opt,name=info,proto3" json:"info,omitempty" validate:"max=4096"` - Time int64 `protobuf:"varint,6,opt,name=time,proto3" json:"time,omitempty"` - RevokeChild bool `protobuf:"varint,7,opt,name=revokeChild,proto3" json:"revokeChild,omitempty"` - SchemaVersion uint32 `protobuf:"varint,8,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty" validate:"gte=0,lte=65535"` + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" validate:"required"` + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty" validate:"required,max=1024"` + SubjectKeyId string `protobuf:"bytes,3,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty" validate:"required,max=256"` + SerialNumber string `protobuf:"bytes,4,opt,name=serialNumber,proto3" json:"serialNumber,omitempty"` + Info string `protobuf:"bytes,5,opt,name=info,proto3" json:"info,omitempty" validate:"max=4096"` + Time int64 `protobuf:"varint,6,opt,name=time,proto3" json:"time,omitempty"` + RevokeChild bool `protobuf:"varint,7,opt,name=revokeChild,proto3" json:"revokeChild,omitempty"` } func (m *MsgRevokeNocX509IcaCert) Reset() { *m = MsgRevokeNocX509IcaCert{} } @@ -2010,13 +1945,6 @@ func (m *MsgRevokeNocX509IcaCert) GetRevokeChild() bool { return false } -func (m *MsgRevokeNocX509IcaCert) GetSchemaVersion() uint32 { - if m != nil { - return m.SchemaVersion - } - return 0 -} - type MsgRevokeNocX509IcaCertResponse struct { } @@ -2305,106 +2233,105 @@ func init() { } var fileDescriptor_3047b9df3153e42a = []byte{ - // 1582 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x13, 0xc7, - 0x1b, 0x66, 0xfd, 0x91, 0x8f, 0x37, 0x21, 0x12, 0xf3, 0x0b, 0xe0, 0x18, 0x7e, 0xb6, 0x59, 0x10, - 0x44, 0x6a, 0x12, 0x27, 0x01, 0x87, 0x0f, 0x95, 0x56, 0x09, 0x2e, 0x10, 0x91, 0xd0, 0x74, 0x03, - 0xb4, 0xaa, 0xaa, 0xa2, 0xb5, 0x77, 0x58, 0xa6, 0xb1, 0xbd, 0xdb, 0xdd, 0x75, 0x44, 0xb8, 0xf5, - 0xd4, 0xde, 0x8a, 0x54, 0xf5, 0xda, 0x5b, 0x5b, 0x09, 0xa9, 0x88, 0xaa, 0x1f, 0xd7, 0x5e, 0x7b, - 0xa9, 0x84, 0x7a, 0x69, 0x4f, 0x16, 0x02, 0xa9, 0xaa, 0xd4, 0x9b, 0xff, 0x82, 0x6a, 0x3f, 0x3c, - 0xeb, 0xb5, 0x67, 0x1d, 0x7b, 0xbd, 0xa9, 0x20, 0xe4, 0xe6, 0x1d, 0xcf, 0xfb, 0xce, 0xcc, 0xf3, - 0x3c, 0xef, 0xbb, 0x33, 0xef, 0x2c, 0x9c, 0xbd, 0x4f, 0xe4, 0x02, 0xc6, 0x62, 0xa9, 0x44, 0xc4, - 0x4a, 0x11, 0x67, 0x25, 0xa2, 0x1b, 0x1a, 0x29, 0x54, 0x0d, 0x2c, 0x15, 0x95, 0xb2, 0x6a, 0xb7, - 0x96, 0xb0, 0x24, 0x63, 0x2d, 0xab, 0x6e, 0x90, 0xac, 0x71, 0x6f, 0x46, 0xd5, 0x14, 0x43, 0x41, - 0x33, 0x5e, 0xc3, 0x99, 0x0e, 0x86, 0x33, 0xea, 0x06, 0x49, 0x4e, 0x14, 0x15, 0xbd, 0xac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xed, 0x65, 0x03, 0x5f, 0x9c, 0x9b, 0x2a, 0x19, 0xf8, 0xe2, - 0x42, 0x2e, 0x77, 0x3a, 0x37, 0x45, 0x17, 0x24, 0x98, 0x36, 0x68, 0x05, 0x0e, 0x98, 0x73, 0x58, - 0x2f, 0xde, 0xc5, 0x65, 0xf1, 0x16, 0xd6, 0x74, 0xa2, 0x54, 0x12, 0x03, 0x19, 0x6e, 0x72, 0xff, - 0x52, 0xaa, 0x5e, 0x4b, 0x27, 0xbd, 0x8e, 0x66, 0x5d, 0x47, 0xbc, 0xd0, 0x6e, 0x88, 0xf2, 0xb0, - 0x5f, 0xf7, 0x78, 0x1a, 0xec, 0xca, 0x93, 0xd7, 0x88, 0x3f, 0x0e, 0xc7, 0x7c, 0xf9, 0x12, 0xb0, - 0xae, 0x2a, 0x15, 0x1d, 0xf3, 0xdf, 0x44, 0x2c, 0x56, 0x17, 0x55, 0x55, 0x53, 0x36, 0x77, 0x8e, - 0xd5, 0x0b, 0x30, 0xa8, 0x57, 0x0b, 0x1f, 0xe1, 0x62, 0x83, 0xd8, 0x4c, 0xbd, 0x96, 0x3e, 0xea, - 0x4b, 0xec, 0xfc, 0x19, 0x5e, 0x68, 0x18, 0xa0, 0x4b, 0x30, 0xea, 0xfc, 0xbc, 0x86, 0xb7, 0x96, - 0x25, 0x87, 0xdf, 0x74, 0xbd, 0x96, 0x3e, 0xe2, 0xe3, 0x60, 0x3e, 0xb7, 0xc0, 0x0b, 0x1e, 0x23, - 0x2a, 0x8e, 0x58, 0x2f, 0xe2, 0x88, 0xbb, 0xe2, 0x70, 0xd0, 0x64, 0xe3, 0x44, 0xd1, 0xfc, 0x3b, - 0x02, 0x63, 0x66, 0x2f, 0xfb, 0xef, 0x5d, 0x13, 0x18, 0x4c, 0x75, 0xc7, 0x43, 0x53, 0xf7, 0x40, - 0x10, 0x75, 0x27, 0xe0, 0x90, 0x17, 0x69, 0x4a, 0xc2, 0x4f, 0x51, 0x38, 0xea, 0x0a, 0x5f, 0xc0, - 0x9b, 0xca, 0x06, 0xde, 0x53, 0x35, 0x53, 0xd5, 0x88, 0x87, 0x51, 0x1d, 0x6b, 0x44, 0x2c, 0x5d, - 0xaf, 0x96, 0x0b, 0x58, 0xb3, 0xa8, 0x18, 0x16, 0x3c, 0x6d, 0x28, 0x03, 0x23, 0x9a, 0x05, 0xe2, - 0xa5, 0xbb, 0xa4, 0x24, 0x59, 0xb9, 0x68, 0x48, 0x68, 0x6e, 0x6a, 0x67, 0x74, 0x28, 0x08, 0xa3, - 0x27, 0xe1, 0x44, 0x27, 0xda, 0x28, 0xbf, 0xbf, 0x45, 0x2c, 0x7e, 0x9d, 0x50, 0x7c, 0x25, 0xf8, - 0x8d, 0xf7, 0xc2, 0xef, 0x40, 0x07, 0x7e, 0x07, 0xdb, 0xf9, 0x75, 0x70, 0xf7, 0x85, 0x93, 0xe2, - 0xfe, 0x30, 0x0a, 0x07, 0x56, 0x75, 0xd9, 0xed, 0xb1, 0x17, 0x4c, 0x2f, 0x6e, 0x30, 0x1d, 0xb1, - 0x5e, 0xeb, 0x5e, 0xae, 0x28, 0x93, 0xff, 0x44, 0x20, 0x61, 0xfd, 0x6b, 0x2e, 0x7e, 0xef, 0x9d, - 0xef, 0x4b, 0x68, 0x38, 0x6f, 0x2a, 0x1e, 0x32, 0x7e, 0x60, 0x53, 0x46, 0x1e, 0x0d, 0xd8, 0x41, - 0x28, 0x49, 0x6b, 0x1b, 0xc4, 0x64, 0xad, 0x28, 0x1a, 0x44, 0xa9, 0xe4, 0x1b, 0x9b, 0x78, 0xa2, - 0x54, 0xd6, 0x14, 0x52, 0x09, 0x91, 0x1d, 0x67, 0xb3, 0x1b, 0x09, 0xb0, 0xd9, 0x9d, 0x85, 0xa8, - 0x4a, 0x6c, 0x4e, 0xe2, 0xdb, 0x82, 0x61, 0x76, 0x45, 0xe3, 0x10, 0x27, 0xfa, 0xda, 0xe2, 0xa2, - 0x45, 0xc5, 0x90, 0x60, 0x3f, 0xa0, 0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0x20, 0x0e, 0xa7, 0x56, 0x75, - 0xf9, 0xa6, 0x6a, 0x0e, 0xf0, 0x12, 0xc4, 0x18, 0x8d, 0x8d, 0x68, 0x57, 0xb1, 0x31, 0xef, 0x13, - 0x1b, 0x56, 0xea, 0xeb, 0x29, 0x04, 0xe2, 0xbd, 0x87, 0xc0, 0x82, 0x1b, 0x02, 0x76, 0x2c, 0x1e, - 0xad, 0xd7, 0xd2, 0x09, 0xd7, 0x5a, 0x29, 0x13, 0x03, 0x97, 0x55, 0x63, 0x6b, 0x9b, 0x18, 0x18, - 0xdc, 0x36, 0x06, 0x86, 0xba, 0x88, 0x81, 0x61, 0x66, 0x0c, 0xb4, 0x49, 0x18, 0xc2, 0x93, 0xf0, - 0x48, 0x30, 0x09, 0xcf, 0x41, 0xb6, 0x4b, 0x45, 0x52, 0x15, 0x7f, 0x1d, 0xb1, 0x54, 0x6c, 0xfa, - 0xd8, 0x8d, 0x2a, 0x66, 0x2b, 0x32, 0xd6, 0xb3, 0x22, 0x1d, 0x68, 0xbb, 0x81, 0x89, 0x42, 0xfb, - 0x45, 0x04, 0x46, 0xcd, 0x8c, 0xa2, 0x9b, 0xab, 0xbe, 0x45, 0xa4, 0x5d, 0xb4, 0x0f, 0x72, 0x08, - 0x8c, 0xf5, 0x4e, 0x20, 0x7f, 0x08, 0xc6, 0x9b, 0x41, 0x71, 0xf7, 0x2b, 0x11, 0x38, 0x68, 0xe7, - 0xdf, 0xeb, 0x4a, 0xf1, 0x45, 0x2b, 0x04, 0x32, 0xcb, 0x15, 0xb1, 0xd0, 0xca, 0x15, 0xf1, 0x20, - 0x9b, 0xc0, 0x34, 0xfc, 0x9f, 0x89, 0x17, 0x45, 0xf4, 0x93, 0x88, 0x73, 0xba, 0x2a, 0x2b, 0x9b, - 0xbb, 0xf1, 0x74, 0xd5, 0x7a, 0x38, 0x8a, 0x31, 0x4e, 0xa2, 0x8d, 0x43, 0x4b, 0x33, 0x04, 0x14, - 0xa0, 0xef, 0x22, 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x6b, 0x61, 0x79, 0xa2, 0xb3, 0x7e, 0xcc, 0xc1, 0x38, 0xfb, 0xec, 0xdb, 0xef, 0x50, 0x0d, 0x94, - 0xdf, 0x0e, 0xc9, 0x51, 0xcb, 0x94, 0x59, 0x07, 0xbb, 0xc0, 0xb2, 0x0b, 0x65, 0xca, 0xfe, 0x27, - 0x2c, 0x47, 0x1b, 0xac, 0xe3, 0xd5, 0xd5, 0x7e, 0x87, 0xea, 0x53, 0x1b, 0x1d, 0x0e, 0x3a, 0x4b, - 0x1f, 0xfe, 0xfa, 0x2c, 0xc5, 0x3d, 0x79, 0x96, 0xe2, 0x9e, 0x3e, 0x4b, 0x71, 0x0f, 0x9e, 0xa7, - 0xf6, 0x3d, 0x79, 0x9e, 0xda, 0xf7, 0xe7, 0xf3, 0xd4, 0xbe, 0xf7, 0xf3, 0x32, 0x31, 0xee, 0x56, - 0x0b, 0x33, 0x45, 0xa5, 0x9c, 0xb5, 0x47, 0x9d, 0x66, 0x7d, 0x82, 0x3b, 0xed, 0x8e, 0x3b, 0xed, - 0x7c, 0x84, 0x7b, 0xcf, 0xfe, 0x0c, 0x77, 0x4b, 0xc5, 0x7a, 0x61, 0xc0, 0xfa, 0x52, 0xf6, 0xf4, - 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x51, 0xcc, 0x91, 0xc5, 0x2b, 0x00, 0x00, + // 1553 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xef, 0x3a, 0x76, 0x3e, 0x5e, 0xd2, 0x48, 0x1d, 0xd2, 0x76, 0xe3, 0x16, 0xdb, 0xdd, 0x56, + 0x6d, 0x24, 0x12, 0x3b, 0x49, 0xeb, 0xf4, 0x43, 0x14, 0x94, 0xd4, 0xb4, 0x8d, 0x9a, 0x94, 0xb0, + 0x69, 0x0b, 0x42, 0x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, 0xba, 0xa0, 0x96, 0x32, 0xf6, 0xa8, 0x33, 0xac, 0x8f, 0x21, 0x67, 0xbc, + 0x71, 0x67, 0x9c, 0xcf, 0x21, 0xef, 0xd9, 0x1f, 0x44, 0x6e, 0x55, 0xb0, 0x9e, 0x1f, 0xb4, 0xbe, + 0x59, 0x3c, 0xfd, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x14, 0xb1, 0x4e, 0x73, 0x4f, 0x29, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3119,11 +3046,6 @@ func (m *MsgProposeAddX509RootCert) MarshalToSizedBuffer(dAtA []byte) (int, erro _ = i var l int _ = l - if m.SchemaVersion != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.SchemaVersion)) - i-- - dAtA[i] = 0x38 - } if m.CertSchemaVersion != 0 { i = encodeVarintTx(dAtA, i, uint64(m.CertSchemaVersion)) i-- @@ -3285,11 +3207,6 @@ func (m *MsgAddX509Cert) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.SchemaVersion != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.SchemaVersion)) - i-- - dAtA[i] = 0x30 - } if m.CertSchemaVersion != 0 { i = encodeVarintTx(dAtA, i, uint64(m.CertSchemaVersion)) i-- @@ -3367,11 +3284,6 @@ func (m *MsgProposeRevokeX509RootCert) MarshalToSizedBuffer(dAtA []byte) (int, e _ = i var l int _ = l - if m.SchemaVersion != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.SchemaVersion)) - i-- - dAtA[i] = 0x40 - } if m.RevokeChild { i-- if m.RevokeChild { @@ -3554,11 +3466,6 @@ func (m *MsgRevokeX509Cert) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.SchemaVersion != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.SchemaVersion)) - i-- - dAtA[i] = 0x40 - } if m.RevokeChild { i-- if m.RevokeChild { @@ -3655,11 +3562,6 @@ func (m *MsgRejectAddX509RootCert) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l - if m.SchemaVersion != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.SchemaVersion)) - i-- - dAtA[i] = 0x30 - } if m.Time != 0 { i = encodeVarintTx(dAtA, i, uint64(m.Time)) i-- @@ -4133,11 +4035,6 @@ func (m *MsgAddNocX509RootCert) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.SchemaVersion != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.SchemaVersion)) - i-- - dAtA[i] = 0x28 - } if m.CertSchemaVersion != 0 { i = encodeVarintTx(dAtA, i, uint64(m.CertSchemaVersion)) i-- @@ -4277,11 +4174,6 @@ func (m *MsgAddNocX509IcaCert) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.SchemaVersion != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.SchemaVersion)) - i-- - dAtA[i] = 0x20 - } if m.CertSchemaVersion != 0 { i = encodeVarintTx(dAtA, i, uint64(m.CertSchemaVersion)) i-- @@ -4347,11 +4239,6 @@ func (m *MsgRevokeNocX509RootCert) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l - if m.SchemaVersion != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.SchemaVersion)) - i-- - dAtA[i] = 0x40 - } if m.RevokeChild { i-- if m.RevokeChild { @@ -4448,11 +4335,6 @@ func (m *MsgRevokeNocX509IcaCert) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if m.SchemaVersion != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.SchemaVersion)) - i-- - dAtA[i] = 0x40 - } if m.RevokeChild { i-- if m.RevokeChild { @@ -4715,9 +4597,6 @@ func (m *MsgProposeAddX509RootCert) Size() (n int) { if m.CertSchemaVersion != 0 { n += 1 + sovTx(uint64(m.CertSchemaVersion)) } - if m.SchemaVersion != 0 { - n += 1 + sovTx(uint64(m.SchemaVersion)) - } return n } @@ -4791,9 +4670,6 @@ func (m *MsgAddX509Cert) Size() (n int) { if m.CertSchemaVersion != 0 { n += 1 + sovTx(uint64(m.CertSchemaVersion)) } - if m.SchemaVersion != 0 { - n += 1 + sovTx(uint64(m.SchemaVersion)) - } return n } @@ -4838,9 +4714,6 @@ func (m *MsgProposeRevokeX509RootCert) Size() (n int) { if m.RevokeChild { n += 2 } - if m.SchemaVersion != 0 { - n += 1 + sovTx(uint64(m.SchemaVersion)) - } return n } @@ -4926,9 +4799,6 @@ func (m *MsgRevokeX509Cert) Size() (n int) { if m.RevokeChild { n += 2 } - if m.SchemaVersion != 0 { - n += 1 + sovTx(uint64(m.SchemaVersion)) - } return n } @@ -4966,9 +4836,6 @@ func (m *MsgRejectAddX509RootCert) Size() (n int) { if m.Time != 0 { n += 1 + sovTx(uint64(m.Time)) } - if m.SchemaVersion != 0 { - n += 1 + sovTx(uint64(m.SchemaVersion)) - } return n } @@ -5189,9 +5056,6 @@ func (m *MsgAddNocX509RootCert) Size() (n int) { if m.CertSchemaVersion != 0 { n += 1 + sovTx(uint64(m.CertSchemaVersion)) } - if m.SchemaVersion != 0 { - n += 1 + sovTx(uint64(m.SchemaVersion)) - } return n } @@ -5255,9 +5119,6 @@ func (m *MsgAddNocX509IcaCert) Size() (n int) { if m.CertSchemaVersion != 0 { n += 1 + sovTx(uint64(m.CertSchemaVersion)) } - if m.SchemaVersion != 0 { - n += 1 + sovTx(uint64(m.SchemaVersion)) - } return n } @@ -5302,9 +5163,6 @@ func (m *MsgRevokeNocX509RootCert) Size() (n int) { if m.RevokeChild { n += 2 } - if m.SchemaVersion != 0 { - n += 1 + sovTx(uint64(m.SchemaVersion)) - } return n } @@ -5349,9 +5207,6 @@ func (m *MsgRevokeNocX509IcaCert) Size() (n int) { if m.RevokeChild { n += 2 } - if m.SchemaVersion != 0 { - n += 1 + sovTx(uint64(m.SchemaVersion)) - } return n } @@ -5620,25 +5475,6 @@ func (m *MsgProposeAddX509RootCert) Unmarshal(dAtA []byte) error { break } } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) - } - m.SchemaVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SchemaVersion |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -6120,25 +5956,6 @@ func (m *MsgAddX509Cert) Unmarshal(dAtA []byte) error { break } } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) - } - m.SchemaVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SchemaVersion |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -6438,25 +6255,6 @@ func (m *MsgProposeRevokeX509RootCert) Unmarshal(dAtA []byte) error { } } m.RevokeChild = bool(v != 0) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) - } - m.SchemaVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SchemaVersion |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -7035,25 +6833,6 @@ func (m *MsgRevokeX509Cert) Unmarshal(dAtA []byte) error { } } m.RevokeChild = bool(v != 0) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) - } - m.SchemaVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SchemaVersion |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -7301,25 +7080,6 @@ func (m *MsgRejectAddX509RootCert) Unmarshal(dAtA []byte) error { break } } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) - } - m.SchemaVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SchemaVersion |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -8791,25 +8551,6 @@ func (m *MsgAddNocX509RootCert) Unmarshal(dAtA []byte) error { break } } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) - } - m.SchemaVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SchemaVersion |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -9221,25 +8962,6 @@ func (m *MsgAddNocX509IcaCert) Unmarshal(dAtA []byte) error { break } } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) - } - m.SchemaVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SchemaVersion |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -9539,25 +9261,6 @@ func (m *MsgRevokeNocX509RootCert) Unmarshal(dAtA []byte) error { } } m.RevokeChild = bool(v != 0) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) - } - m.SchemaVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SchemaVersion |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -9857,25 +9560,6 @@ func (m *MsgRevokeNocX509IcaCert) Unmarshal(dAtA []byte) error { } } m.RevokeChild = bool(v != 0) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) - } - m.SchemaVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SchemaVersion |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/pki/types/unique_certificate.pb.go b/x/pki/types/unique_certificate.pb.go index 69a745880..f2d44a33d 100644 --- a/x/pki/types/unique_certificate.pb.go +++ b/x/pki/types/unique_certificate.pb.go @@ -23,9 +23,10 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type UniqueCertificate struct { - Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` - SerialNumber string `protobuf:"bytes,2,opt,name=serialNumber,proto3" json:"serialNumber,omitempty"` - Present bool `protobuf:"varint,3,opt,name=present,proto3" json:"present,omitempty"` + Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` + SerialNumber string `protobuf:"bytes,2,opt,name=serialNumber,proto3" json:"serialNumber,omitempty"` + Present bool `protobuf:"varint,3,opt,name=present,proto3" json:"present,omitempty"` + SchemaVersion uint32 `protobuf:"varint,4,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *UniqueCertificate) Reset() { *m = UniqueCertificate{} } @@ -82,6 +83,13 @@ func (m *UniqueCertificate) GetPresent() bool { return false } +func (m *UniqueCertificate) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*UniqueCertificate)(nil), "zigbeealliance.distributedcomplianceledger.pki.UniqueCertificate") } @@ -91,23 +99,24 @@ func init() { } var fileDescriptor_59ed78d3487c5a69 = []byte{ - // 242 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xbf, 0x4a, 0xc4, 0x40, - 0x10, 0xc6, 0xb3, 0x0a, 0xa7, 0x2e, 0x36, 0xa6, 0x90, 0x54, 0xcb, 0x71, 0xd5, 0x35, 0xd9, 0x14, - 0xbe, 0x81, 0x0a, 0x76, 0x16, 0x07, 0x36, 0x16, 0x4a, 0x76, 0x33, 0xc6, 0xe1, 0xf2, 0x67, 0x9d, - 0x9d, 0x05, 0xf5, 0x29, 0x7c, 0x2c, 0xcb, 0x2b, 0x2d, 0x25, 0x79, 0x11, 0x61, 0xef, 0xe4, 0x08, - 0x88, 0xe5, 0xf7, 0x0d, 0xfc, 0x98, 0xef, 0x27, 0x6f, 0xde, 0xb1, 0x36, 0x00, 0x65, 0xd3, 0x60, - 0xd9, 0x59, 0x28, 0x2a, 0xf4, 0x4c, 0x68, 0x02, 0x43, 0x65, 0xfb, 0xd6, 0x6d, 0xdb, 0x06, 0xaa, - 0x1a, 0xa8, 0x70, 0x6b, 0x2c, 0x42, 0x87, 0x2f, 0x01, 0x1e, 0x2d, 0x10, 0xe3, 0x13, 0xda, 0x92, - 0x41, 0x3b, 0xea, 0xb9, 0x4f, 0xf5, 0x14, 0xa4, 0xff, 0x01, 0x69, 0xb7, 0xc6, 0x05, 0xca, 0xb3, - 0xbb, 0xc8, 0xba, 0xda, 0xa3, 0xd2, 0x73, 0x39, 0x43, 0xef, 0x03, 0x50, 0x26, 0xe6, 0x62, 0x79, - 0xb2, 0xda, 0xa5, 0x74, 0x21, 0x4f, 0x3d, 0x10, 0x96, 0xcd, 0x6d, 0x68, 0x0d, 0x50, 0x76, 0x10, - 0xaf, 0x93, 0x2e, 0xcd, 0xe4, 0x91, 0x23, 0xf0, 0xd0, 0x71, 0x76, 0x38, 0x17, 0xcb, 0xe3, 0xd5, - 0x6f, 0xbc, 0x7c, 0xf8, 0x1c, 0x94, 0xd8, 0x0c, 0x4a, 0x7c, 0x0f, 0x4a, 0x7c, 0x8c, 0x2a, 0xd9, - 0x8c, 0x2a, 0xf9, 0x1a, 0x55, 0x72, 0x7f, 0x5d, 0x23, 0x3f, 0x07, 0xa3, 0x6d, 0xdf, 0x16, 0xdb, - 0xff, 0xf3, 0xbf, 0x4c, 0xe4, 0xfb, 0x05, 0xf9, 0xce, 0xc5, 0x6b, 0xb4, 0xc1, 0x6f, 0x0e, 0xbc, - 0x99, 0x45, 0x03, 0x17, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x2c, 0x89, 0x85, 0x4c, 0x01, - 0x00, 0x00, + // 264 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xbf, 0x4a, 0xf4, 0x40, + 0x14, 0x47, 0x33, 0xdf, 0x27, 0xab, 0x0e, 0x6e, 0x61, 0x0a, 0x49, 0x35, 0x84, 0xc5, 0x22, 0x4d, + 0x26, 0x85, 0x6f, 0xa0, 0x82, 0x9d, 0x45, 0x40, 0x0b, 0x0b, 0x65, 0x66, 0x72, 0xcd, 0x5e, 0x36, + 0xc9, 0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xf3, 0xdf, 0x82, 0xe5, 0xbb, 0xa1, 0xf9, 0x36, 0xd9, + 0xf3, 0x18, 0xcd, 0xbf, 0x18, 0x70, 0x72, 0x36, 0x86, 0x3a, 0xfb, 0x0e, 0x00, 0x00, 0xff, 0xff, + 0x52, 0xb9, 0x65, 0x8b, 0x73, 0x01, 0x00, 0x00, } func (m *UniqueCertificate) Marshal() (dAtA []byte, err error) { @@ -130,6 +139,11 @@ func (m *UniqueCertificate) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintUniqueCertificate(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x20 + } if m.Present { i-- if m.Present { @@ -185,6 +199,9 @@ func (m *UniqueCertificate) Size() (n int) { if m.Present { n += 2 } + if m.SchemaVersion != 0 { + n += 1 + sovUniqueCertificate(uint64(m.SchemaVersion)) + } return n } @@ -307,6 +324,25 @@ func (m *UniqueCertificate) Unmarshal(dAtA []byte) error { } } m.Present = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUniqueCertificate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipUniqueCertificate(dAtA[iNdEx:]) diff --git a/x/validator/types/description.pb.go b/x/validator/types/description.pb.go index 8d3d76e57..192b3ca05 100644 --- a/x/validator/types/description.pb.go +++ b/x/validator/types/description.pb.go @@ -31,7 +31,8 @@ type Description struct { // optional website link. Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"` // optional details. - Details string `protobuf:"bytes,4,opt,name=details,proto3" json:"details,omitempty"` + Details string `protobuf:"bytes,4,opt,name=details,proto3" json:"details,omitempty"` + SchemaVersion uint32 `protobuf:"varint,5,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *Description) Reset() { *m = Description{} } @@ -94,6 +95,13 @@ func (m *Description) GetDetails() string { return "" } +func (m *Description) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*Description)(nil), "zigbeealliance.distributedcomplianceledger.validator.Description") } @@ -103,24 +111,26 @@ func init() { } var fileDescriptor_2ad296d0157123cf = []byte{ - // 268 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0xab, 0xca, 0x4c, 0x4f, - 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, - 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, - 0xa7, 0x16, 0xe9, 0x97, 0x25, 0xe6, 0x64, 0xa6, 0x24, 0x96, 0xe4, 0x17, 0xe9, 0xa7, 0xa4, 0x16, - 0x27, 0x17, 0x65, 0x16, 0x94, 0x64, 0xe6, 0xe7, 0xe9, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x99, - 0xa0, 0x9a, 0xa3, 0x87, 0xc7, 0x1c, 0x3d, 0xb8, 0x39, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, - 0x03, 0xf4, 0x41, 0x2c, 0x88, 0x59, 0x4a, 0x8d, 0x8c, 0x5c, 0xdc, 0x2e, 0x08, 0x1b, 0x84, 0x24, - 0xb8, 0xd8, 0x73, 0xf3, 0xf3, 0x32, 0xb3, 0x53, 0x8b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, - 0x60, 0x5c, 0x21, 0x29, 0x2e, 0x8e, 0xcc, 0x94, 0xd4, 0xbc, 0x92, 0xcc, 0x92, 0x4a, 0x09, 0x26, - 0xb0, 0x14, 0x9c, 0x0f, 0xd2, 0x55, 0x9e, 0x9a, 0x54, 0x9c, 0x59, 0x92, 0x2a, 0xc1, 0x0c, 0xd1, - 0x05, 0xe5, 0x82, 0x64, 0x52, 0x52, 0x4b, 0x12, 0x33, 0x73, 0x8a, 0x25, 0x58, 0x20, 0x32, 0x50, - 0xae, 0x15, 0xc7, 0x8c, 0x05, 0xf2, 0x0c, 0x2f, 0x16, 0xc8, 0x33, 0x3a, 0xa5, 0x9c, 0x78, 0x24, - 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, - 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x57, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, - 0x72, 0x7e, 0xae, 0x3e, 0xc4, 0xd3, 0xba, 0xd8, 0x42, 0x4f, 0x17, 0xe1, 0x6d, 0x5d, 0x68, 0xf8, - 0x55, 0x20, 0x85, 0x60, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0xc3, 0xc6, 0x80, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xd0, 0x24, 0x4c, 0xf4, 0x86, 0x01, 0x00, 0x00, + // 290 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xbd, 0x4e, 0xc3, 0x30, + 0x14, 0x85, 0x63, 0x7e, 0x4b, 0x50, 0x97, 0x88, 0xc1, 0xea, 0xe0, 0x56, 0x88, 0xa1, 0x4b, 0x92, + 0x01, 0x26, 0x46, 0x84, 0x18, 0x18, 0x3b, 0x30, 0xb0, 0x39, 0xf1, 0x55, 0x7a, 0x45, 0x12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x2d, 0x4b, 0xc1, 0xbe, 0x4a, 0xc1, 0x5e, 0x2b, 0xe1, 0x2c, 0x2b, + 0xe1, 0x7c, 0x56, 0xc2, 0xb9, 0xbf, 0x4d, 0x90, 0xa6, 0xb3, 0x28, 0x88, 0x75, 0x16, 0xb6, 0x6a, + 0xfc, 0xff, 0x1c, 0xfb, 0x6b, 0x39, 0x7e, 0x67, 0xf9, 0xf9, 0x8f, 0x67, 0x9a, 0x17, 0x60, 0xa3, + 0x83, 0x46, 0xcb, 0xf9, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x98, 0x24, 0x41, 0xc8, 0xac, 0x01, + 0x00, 0x00, } func (this *Description) Equal(that interface{}) bool { @@ -154,6 +164,9 @@ func (this *Description) Equal(that interface{}) bool { if this.Details != that1.Details { return false } + if this.SchemaVersion != that1.SchemaVersion { + return false + } return true } func (m *Description) Marshal() (dAtA []byte, err error) { @@ -176,6 +189,11 @@ func (m *Description) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintDescription(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x28 + } if len(m.Details) > 0 { i -= len(m.Details) copy(dAtA[i:], m.Details) @@ -240,6 +258,9 @@ func (m *Description) Size() (n int) { if l > 0 { n += 1 + l + sovDescription(uint64(l)) } + if m.SchemaVersion != 0 { + n += 1 + sovDescription(uint64(m.SchemaVersion)) + } return n } @@ -406,6 +427,25 @@ func (m *Description) Unmarshal(dAtA []byte) error { } m.Details = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDescription + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipDescription(dAtA[iNdEx:]) diff --git a/x/validator/types/disabled_validator.pb.go b/x/validator/types/disabled_validator.pb.go index dc9f12965..defb88249 100644 --- a/x/validator/types/disabled_validator.pb.go +++ b/x/validator/types/disabled_validator.pb.go @@ -29,6 +29,7 @@ type DisabledValidator struct { Approvals []*Grant `protobuf:"bytes,3,rep,name=approvals,proto3" json:"approvals,omitempty"` DisabledByNodeAdmin bool `protobuf:"varint,4,opt,name=disabledByNodeAdmin,proto3" json:"disabledByNodeAdmin,omitempty"` Rejects []*Grant `protobuf:"bytes,5,rep,name=rejects,proto3" json:"rejects,omitempty"` + SchemaVersion uint32 `protobuf:"varint,6,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *DisabledValidator) Reset() { *m = DisabledValidator{} } @@ -99,6 +100,13 @@ func (m *DisabledValidator) GetRejects() []*Grant { return nil } +func (m *DisabledValidator) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*DisabledValidator)(nil), "zigbeealliance.distributedcomplianceledger.validator.DisabledValidator") } @@ -108,28 +116,30 @@ func init() { } var fileDescriptor_ad0ec23eb7309c10 = []byte{ - // 333 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x91, 0x31, 0x4b, 0xc3, 0x40, - 0x18, 0x86, 0x9b, 0x56, 0xad, 0x8d, 0x93, 0xd1, 0x21, 0x76, 0x08, 0xc5, 0xa9, 0x4b, 0x2e, 0x52, - 0xdd, 0x5c, 0x6c, 0x11, 0x04, 0x41, 0x87, 0x8a, 0x82, 0x2e, 0xe5, 0x72, 0xf7, 0x11, 0x4f, 0x2e, - 0xb9, 0x70, 0x77, 0x2d, 0xd6, 0x5f, 0xe1, 0x8f, 0xf1, 0x47, 0x38, 0x16, 0x27, 0x37, 0xa5, 0xf9, - 0x23, 0x92, 0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fd, 0x65, 0x2b, 0xe7, 0xda, 0xae, 0x4b, - 0x78, 0x00, 0xa2, 0x95, 0xbb, 0xfe, 0xff, 0x28, 0x25, 0xab, 0x47, 0x5f, 0xa7, 0x9e, 0x35, 0x99, - 0x7a, 0xd6, 0xe7, 0xd4, 0xb3, 0x9e, 0x33, 0xaf, 0x32, 0xc9, 0xbc, 0xca, 0x7b, 0xe6, 0x55, 0xee, - 0xce, 0x23, 0xa6, 0xef, 0x87, 0x21, 0x22, 0x22, 0x0e, 0xcc, 0x25, 0x7f, 0x59, 0x93, 0xfe, 0xe2, - 0x96, 0x5f, 0x74, 0xf9, 0xf8, 0xad, 0x4d, 0x3d, 0x4e, 0x41, 0x85, 0x1b, 0xb3, 0x3a, 0x0f, 0xbf, - 0x02, 0x00, 0x00, 0xff, 0xff, 0x37, 0x1f, 0xa8, 0x9f, 0xb2, 0x02, 0x00, 0x00, + // 357 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x91, 0x31, 0x4b, 0xf3, 0x40, + 0x1c, 0xc6, 0x9b, 0xb7, 0xef, 0xdb, 0xbe, 0x8d, 0x74, 0x30, 0x3a, 0x9c, 0x1d, 0x42, 0x10, 0x87, + 0x2c, 0x49, 0xa4, 0xba, 0xb9, 0xd8, 0x22, 0x08, 0x82, 0x0e, 0x11, 0x0b, 0xba, 0x94, 0xcb, 0xdd, + 0x9f, 0xf4, 0x24, 0xc9, 0x85, 0xbb, 0x6b, 0xb1, 0xee, 0xee, 0x7e, 0x18, 0x3f, 0x84, 0x63, 0x71, + 0x72, 0x94, 0xf6, 0x8b, 0x48, 0x9a, 0xa4, 0xb5, 0x50, 0x14, 0xea, 0x78, 0xff, 0xff, 0xf3, 0xfc, + 0xee, 0xb9, 0x7b, 0xf4, 0xcb, 0x47, 0x16, 0x06, 0x00, 0x38, 0x8a, 0x18, 0x4e, 0x08, 0x78, 0x94, + 0x49, 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0x92, 0xf1, 0x04, 0xd5, 0x2c, 0xcd, 0x6e, 0xfa, 0xab, + 0xc3, 0x2e, 0x7d, 0x9d, 0x9a, 0xda, 0x64, 0x6a, 0x6a, 0x1f, 0x53, 0x53, 0x7b, 0x9e, 0x99, 0x95, + 0xc9, 0xcc, 0xac, 0xbc, 0xcf, 0xcc, 0xca, 0xdd, 0x45, 0xc8, 0xd4, 0x60, 0x18, 0xb8, 0x84, 0xc7, + 0x5e, 0x9e, 0xc7, 0x59, 0xd7, 0xb7, 0xb3, 0x4c, 0xe4, 0x14, 0x8d, 0x3f, 0x7c, 0xe9, 0x5c, 0x8d, + 0x53, 0x90, 0x41, 0x6d, 0x5e, 0xfa, 0xd1, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x0c, 0x64, + 0x34, 0xd8, 0x02, 0x00, 0x00, } func (m *DisabledValidator) Marshal() (dAtA []byte, err error) { @@ -152,6 +162,11 @@ func (m *DisabledValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintDisabledValidator(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x30 + } if len(m.Rejects) > 0 { for iNdEx := len(m.Rejects) - 1; iNdEx >= 0; iNdEx-- { { @@ -247,6 +262,9 @@ func (m *DisabledValidator) Size() (n int) { n += 1 + l + sovDisabledValidator(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovDisabledValidator(uint64(m.SchemaVersion)) + } return n } @@ -437,6 +455,25 @@ func (m *DisabledValidator) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDisabledValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipDisabledValidator(dAtA[iNdEx:]) diff --git a/x/validator/types/grant.pb.go b/x/validator/types/grant.pb.go index f944d8677..39c76ca2b 100644 --- a/x/validator/types/grant.pb.go +++ b/x/validator/types/grant.pb.go @@ -24,9 +24,10 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Grant struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Time int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` - Info string `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Time int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` + Info string `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` + SchemaVersion uint32 `protobuf:"varint,4,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *Grant) Reset() { *m = Grant{} } @@ -83,6 +84,13 @@ func (m *Grant) GetInfo() string { return "" } +func (m *Grant) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*Grant)(nil), "zigbeealliance.distributedcomplianceledger.validator.Grant") } @@ -92,23 +100,25 @@ func init() { } var fileDescriptor_8991a374e1961121 = []byte{ - // 253 bytes of a gzipped FileDescriptorProto + // 280 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0xa8, 0xca, 0x4c, 0x4f, 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, 0xa7, 0x16, 0xe9, 0x97, 0x25, 0xe6, 0x64, 0xa6, 0x24, 0x96, 0xe4, 0x17, 0xe9, 0xa7, 0x17, 0x25, 0xe6, 0x95, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x99, 0xa0, 0x9a, 0xa0, 0x87, 0xc7, 0x04, 0x3d, 0xb8, 0x09, 0x52, 0x92, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0x60, 0x33, 0xf4, 0x21, - 0x1c, 0x88, 0x81, 0x4a, 0xc9, 0x5c, 0xac, 0xee, 0x20, 0xf3, 0x85, 0x8c, 0xb8, 0xd8, 0x13, 0x53, - 0x52, 0x8a, 0x52, 0x8b, 0x8b, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x9d, 0x24, 0x2e, 0x6d, 0xd1, - 0x15, 0x81, 0xaa, 0x75, 0x84, 0xc8, 0x04, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x07, 0xc1, 0x14, 0x0a, - 0x09, 0x71, 0xb1, 0x94, 0x64, 0xe6, 0xa6, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0x30, 0x07, 0x81, 0xd9, - 0x20, 0xb1, 0xcc, 0xbc, 0xb4, 0x7c, 0x09, 0x66, 0x90, 0x21, 0x41, 0x60, 0xb6, 0x53, 0xca, 0x89, - 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, - 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x79, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, - 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x43, 0xbc, 0xa6, 0x8b, 0x2d, 0x74, 0x74, 0x11, 0x9e, 0xd3, 0x85, - 0x86, 0x4f, 0x05, 0x52, 0x08, 0x95, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x7d, 0x64, 0x0c, - 0x08, 0x00, 0x00, 0xff, 0xff, 0x9f, 0xa9, 0xc7, 0x85, 0x66, 0x01, 0x00, 0x00, + 0x1c, 0x88, 0x81, 0x4a, 0x9d, 0x8c, 0x5c, 0xac, 0xee, 0x20, 0x0b, 0x84, 0x8c, 0xb8, 0xd8, 0x13, + 0x53, 0x52, 0x8a, 0x52, 0x8b, 0x8b, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x9d, 0x24, 0x2e, 0x6d, + 0xd1, 0x15, 0x81, 0x2a, 0x76, 0x84, 0xc8, 0x04, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x07, 0xc1, 0x14, + 0x0a, 0x09, 0x71, 0xb1, 0x94, 0x64, 0xe6, 0xa6, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0x30, 0x07, 0x81, + 0xd9, 0x20, 0xb1, 0xcc, 0xbc, 0xb4, 0x7c, 0x09, 0x66, 0x90, 0x21, 0x41, 0x60, 0xb6, 0x90, 0x0a, + 0x17, 0x6f, 0x71, 0x72, 0x46, 0x6a, 0x6e, 0x62, 0x58, 0x6a, 0x51, 0x71, 0x66, 0x7e, 0x9e, 0x04, + 0x8b, 0x02, 0xa3, 0x06, 0x6f, 0x10, 0xaa, 0xa0, 0x53, 0xca, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, + 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, + 0x1e, 0xcb, 0x31, 0x44, 0x79, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, + 0x43, 0x42, 0x40, 0x17, 0x5b, 0x20, 0xea, 0x22, 0xc2, 0x40, 0x17, 0x1a, 0x8c, 0x15, 0x48, 0x01, + 0x59, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0xf6, 0xb8, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, + 0x72, 0x9c, 0x8c, 0x62, 0x8d, 0x01, 0x00, 0x00, } func (m *Grant) Marshal() (dAtA []byte, err error) { @@ -131,6 +141,11 @@ func (m *Grant) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintGrant(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x20 + } if len(m.Info) > 0 { i -= len(m.Info) copy(dAtA[i:], m.Info) @@ -181,6 +196,9 @@ func (m *Grant) Size() (n int) { if l > 0 { n += 1 + l + sovGrant(uint64(l)) } + if m.SchemaVersion != 0 { + n += 1 + sovGrant(uint64(m.SchemaVersion)) + } return n } @@ -302,6 +320,25 @@ func (m *Grant) Unmarshal(dAtA []byte) error { } m.Info = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrant + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGrant(dAtA[iNdEx:]) diff --git a/x/validator/types/last_validator_power.pb.go b/x/validator/types/last_validator_power.pb.go index 1841b0f21..628628729 100644 --- a/x/validator/types/last_validator_power.pb.go +++ b/x/validator/types/last_validator_power.pb.go @@ -25,8 +25,9 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type LastValidatorPower struct { - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - Power int32 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"` + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + Power int32 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"` + SchemaVersion uint32 `protobuf:"varint,3,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *LastValidatorPower) Reset() { *m = LastValidatorPower{} } @@ -70,7 +71,7 @@ func init() { } var fileDescriptor_9fb3d0fe36b404c9 = []byte{ - // 282 bytes of a gzipped FileDescriptorProto + // 309 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0xaf, 0xca, 0x4c, 0x4f, 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, @@ -78,17 +79,19 @@ var fileDescriptor_9fb3d0fe36b404c9 = []byte{ 0x97, 0xc4, 0xc3, 0xb9, 0xf1, 0x05, 0xf9, 0xe5, 0xa9, 0x45, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x26, 0xa8, 0x06, 0xea, 0xe1, 0x31, 0x50, 0x0f, 0x6e, 0x82, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0xd8, 0x00, 0x7d, 0x10, 0x0b, 0x62, 0x96, 0x94, 0x64, 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x71, - 0x3c, 0x44, 0x02, 0xc2, 0x81, 0x48, 0x29, 0x65, 0x70, 0x09, 0xf9, 0x24, 0x16, 0x97, 0x84, 0xc1, - 0x4c, 0x08, 0x00, 0x39, 0x41, 0x48, 0x8f, 0x8b, 0x35, 0xbf, 0x3c, 0x2f, 0xb5, 0x48, 0x82, 0x51, - 0x81, 0x51, 0x83, 0xd3, 0x49, 0xe2, 0xd2, 0x16, 0x5d, 0x11, 0xa8, 0x36, 0xc7, 0x94, 0x94, 0xa2, - 0xd4, 0xe2, 0xe2, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0xf4, 0x20, 0x88, 0x32, 0x21, 0x11, 0x2e, 0x56, - 0xb0, 0xdb, 0x25, 0x98, 0x14, 0x18, 0x35, 0x58, 0x83, 0x20, 0x1c, 0x2b, 0x9e, 0x8e, 0x05, 0xf2, - 0x0c, 0x33, 0x16, 0xc8, 0x33, 0xbc, 0x58, 0x20, 0xcf, 0xe0, 0x94, 0x72, 0xe2, 0x91, 0x1c, 0xe3, - 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, - 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x5e, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, - 0xb9, 0xfa, 0x10, 0x5f, 0xeb, 0x62, 0x0b, 0x47, 0x5d, 0x84, 0xbf, 0x75, 0xa1, 0x21, 0x59, 0x81, - 0x14, 0x96, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0x6f, 0x19, 0x03, 0x02, 0x00, 0x00, - 0xff, 0xff, 0xdf, 0x44, 0x3d, 0x14, 0x90, 0x01, 0x00, 0x00, + 0x3c, 0x44, 0x02, 0xc2, 0x81, 0x48, 0x29, 0xf5, 0x31, 0x72, 0x09, 0xf9, 0x24, 0x16, 0x97, 0x84, + 0xc1, 0x8c, 0x08, 0x00, 0xb9, 0x41, 0x48, 0x8f, 0x8b, 0x35, 0xbf, 0x3c, 0x2f, 0xb5, 0x48, 0x82, + 0x51, 0x81, 0x51, 0x83, 0xd3, 0x49, 0xe2, 0xd2, 0x16, 0x5d, 0x11, 0xa8, 0x3e, 0xc7, 0x94, 0x94, + 0xa2, 0xd4, 0xe2, 0xe2, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0xf4, 0x20, 0x88, 0x32, 0x21, 0x11, 0x2e, + 0x56, 0xb0, 0xe3, 0x25, 0x98, 0x14, 0x18, 0x35, 0x58, 0x83, 0x20, 0x1c, 0x21, 0x15, 0x2e, 0xde, + 0xe2, 0xe4, 0x8c, 0xd4, 0xdc, 0xc4, 0xb0, 0xd4, 0xa2, 0xe2, 0xcc, 0xfc, 0x3c, 0x09, 0x66, 0x05, + 0x46, 0x0d, 0xde, 0x20, 0x54, 0x41, 0x2b, 0x9e, 0x8e, 0x05, 0xf2, 0x0c, 0x33, 0x16, 0xc8, 0x33, + 0xbc, 0x58, 0x20, 0xcf, 0xe0, 0x94, 0x72, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, + 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, + 0x51, 0x5e, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x90, 0xc0, 0xd1, + 0xc5, 0x16, 0xdc, 0xba, 0x88, 0xe0, 0xd1, 0x85, 0x06, 0x78, 0x05, 0x52, 0x90, 0x97, 0x54, 0x16, + 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x7d, 0x6f, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xa6, 0xc2, 0x1d, + 0x4e, 0xb7, 0x01, 0x00, 0x00, } func (m *LastValidatorPower) Marshal() (dAtA []byte, err error) { @@ -111,6 +114,11 @@ func (m *LastValidatorPower) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintLastValidatorPower(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x18 + } if m.Power != 0 { i = encodeVarintLastValidatorPower(dAtA, i, uint64(m.Power)) i-- @@ -150,6 +158,9 @@ func (m *LastValidatorPower) Size() (n int) { if m.Power != 0 { n += 1 + sovLastValidatorPower(uint64(m.Power)) } + if m.SchemaVersion != 0 { + n += 1 + sovLastValidatorPower(uint64(m.SchemaVersion)) + } return n } @@ -239,6 +250,25 @@ func (m *LastValidatorPower) Unmarshal(dAtA []byte) error { break } } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLastValidatorPower + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipLastValidatorPower(dAtA[iNdEx:]) diff --git a/x/validator/types/proposed_disable_validator.pb.go b/x/validator/types/proposed_disable_validator.pb.go index 73aa60b09..088fa6c09 100644 --- a/x/validator/types/proposed_disable_validator.pb.go +++ b/x/validator/types/proposed_disable_validator.pb.go @@ -24,10 +24,11 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ProposedDisableValidator struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` - Approvals []*Grant `protobuf:"bytes,3,rep,name=approvals,proto3" json:"approvals,omitempty"` - Rejects []*Grant `protobuf:"bytes,4,rep,name=rejects,proto3" json:"rejects,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` + Approvals []*Grant `protobuf:"bytes,3,rep,name=approvals,proto3" json:"approvals,omitempty"` + Rejects []*Grant `protobuf:"bytes,4,rep,name=rejects,proto3" json:"rejects,omitempty"` + SchemaVersion uint32 `protobuf:"varint,5,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *ProposedDisableValidator) Reset() { *m = ProposedDisableValidator{} } @@ -91,6 +92,13 @@ func (m *ProposedDisableValidator) GetRejects() []*Grant { return nil } +func (m *ProposedDisableValidator) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*ProposedDisableValidator)(nil), "zigbeealliance.distributedcomplianceledger.validator.ProposedDisableValidator") } @@ -100,27 +108,29 @@ func init() { } var fileDescriptor_f9591474ec756c15 = []byte{ - // 316 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x91, 0xb1, 0x4a, 0x03, 0x31, - 0x1c, 0xc6, 0x7b, 0xad, 0x58, 0x7a, 0x6e, 0x87, 0x43, 0xec, 0x10, 0x8a, 0x53, 0x97, 0xcb, 0x41, - 0x75, 0x73, 0xd1, 0x22, 0x08, 0x4e, 0x52, 0xa9, 0xa0, 0x4b, 0xc9, 0x25, 0x7f, 0xce, 0x48, 0xda, - 0x84, 0x24, 0x2d, 0xea, 0x53, 0xf8, 0x30, 0x7d, 0x08, 0xc7, 0xe2, 0xe4, 0x28, 0xbd, 0x17, 0x91, - 0x6b, 0xee, 0x5a, 0x05, 0x51, 0xa8, 0x63, 0xf2, 0xff, 0xbe, 0xdf, 0xff, 0x4b, 0xbe, 0x70, 0xf8, - 0x2c, 0xb2, 0x14, 0x80, 0x4a, 0x29, 0xe8, 0x84, 0x41, 0xc2, 0x85, 0x75, 0x46, 0xa4, 0x53, 0x07, - 0x9c, 0xa9, 0xb1, 0xf6, 0xb7, 0x12, 0x78, 0x06, 0x26, 0x99, 0x51, 0x29, 0x38, 0x75, 0xca, 0x24, - 0xda, 0x28, 0xad, 0x2c, 0xf0, 0x11, 0x17, 0x96, 0xa6, 0x12, 0x46, 0xeb, 0x11, 0xd1, 0x46, 0x39, - 0x15, 0x1d, 0x7f, 0xc7, 0x92, 0x5f, 0xb0, 0x64, 0xed, 0x6d, 0x1f, 0x30, 0x65, 0xc7, 0xca, 0x8e, - 0x56, 0x8c, 0xc4, 0x1f, 0x3c, 0xb0, 0x7d, 0xba, 0x55, 0xce, 0xcc, 0xd0, 0x89, 0xf3, 0x84, 0xc3, - 0x79, 0x3d, 0x44, 0x57, 0x65, 0xee, 0x73, 0x1f, 0xfb, 0xa6, 0x12, 0x46, 0xbd, 0xb0, 0x49, 0x39, - 0x37, 0x60, 0x2d, 0x0a, 0x3a, 0x41, 0xb7, 0xd5, 0x47, 0x6f, 0xf3, 0x78, 0xbf, 0x4c, 0x70, 0xe6, - 0x27, 0xd7, 0xce, 0x88, 0x49, 0x36, 0xa8, 0x84, 0x85, 0x87, 0x19, 0x28, 0xec, 0xa8, 0xfe, 0x97, - 0xa7, 0x14, 0x46, 0xb7, 0x61, 0x8b, 0x6a, 0x6d, 0xd4, 0x8c, 0x4a, 0x8b, 0x1a, 0x9d, 0x46, 0x77, - 0xaf, 0x77, 0x42, 0xb6, 0xf9, 0x2b, 0x72, 0x51, 0x3c, 0x6d, 0xb0, 0xa1, 0x45, 0xc3, 0xb0, 0x69, - 0xe0, 0x01, 0x98, 0xb3, 0x68, 0xe7, 0xff, 0xe0, 0x8a, 0xd5, 0xe7, 0xaf, 0x4b, 0x1c, 0x2c, 0x96, - 0x38, 0xf8, 0x58, 0xe2, 0xe0, 0x25, 0xc7, 0xb5, 0x45, 0x8e, 0x6b, 0xef, 0x39, 0xae, 0xdd, 0x5d, - 0x66, 0xc2, 0xdd, 0x4f, 0x53, 0xc2, 0xd4, 0x38, 0xf1, 0x9b, 0xe2, 0x9f, 0xea, 0x89, 0x37, 0xbb, - 0xe2, 0xb2, 0xa0, 0xc7, 0x2f, 0x15, 0xb9, 0x27, 0x0d, 0x36, 0xdd, 0x5d, 0x75, 0x74, 0xf4, 0x19, - 0x00, 0x00, 0xff, 0xff, 0xd5, 0xca, 0x13, 0xb9, 0x8f, 0x02, 0x00, 0x00, + // 340 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x91, 0xc1, 0x4a, 0xeb, 0x40, + 0x14, 0x86, 0x9b, 0xf6, 0x5e, 0x4b, 0x23, 0xdd, 0x04, 0x17, 0x63, 0x17, 0xa1, 0x88, 0x8b, 0x6e, + 0x92, 0x40, 0x75, 0xe7, 0x46, 0x8b, 0x20, 0xb8, 0x92, 0x4a, 0x0b, 0xba, 0x29, 0x93, 0x99, 0x43, + 0x3a, 0x92, 0x64, 0x86, 0x39, 0xd3, 0xa2, 0x3e, 0x85, 0x0f, 0xe3, 0x43, 0xb8, 0x2c, 0xae, 0xc4, + 0x95, 0xb4, 0x2f, 0x22, 0xed, 0xa4, 0xad, 0x05, 0x51, 0xa8, 0xcb, 0x9c, 0x73, 0xfe, 0x8f, 0x2f, + 0xf3, 0xbb, 0xbd, 0x47, 0x91, 0xc4, 0x00, 0x34, 0x4d, 0x05, 0xcd, 0x19, 0x44, 0x5c, 0xa0, 0xd1, + 0x22, 0x1e, 0x19, 0xe0, 0x4c, 0x66, 0xca, 0x4e, 0x53, 0xe0, 0x09, 0xe8, 0x68, 0x4c, 0x53, 0xc1, + 0xa9, 0x91, 0x3a, 0x52, 0x5a, 0x2a, 0x89, 0xc0, 0x07, 0x5c, 0x20, 0x8d, 0x53, 0x18, 0xac, 0x56, + 0xa1, 0xd2, 0xd2, 0x48, 0xef, 0x78, 0x13, 0x1b, 0xfe, 0x80, 0x0d, 0x57, 0xd9, 0xc6, 0x3e, 0x93, + 0x98, 0x49, 0x1c, 0x2c, 0x18, 0x91, 0xfd, 0xb0, 0xc0, 0xc6, 0xe9, 0x56, 0x9e, 0x89, 0xa6, 0xb9, + 0xb1, 0x84, 0x83, 0xf7, 0xb2, 0x4b, 0xae, 0x0a, 0xef, 0x73, 0xab, 0xdd, 0x5f, 0x1e, 0x7a, 0x6d, + 0xb7, 0x4a, 0x39, 0xd7, 0x80, 0x48, 0x9c, 0xa6, 0xd3, 0xaa, 0x75, 0xc8, 0xeb, 0x73, 0xb0, 0x57, + 0x18, 0x9c, 0xd9, 0xcd, 0xb5, 0xd1, 0x22, 0x4f, 0xba, 0xcb, 0xc3, 0x79, 0x86, 0x69, 0x98, 0xc7, + 0x49, 0xf9, 0xb7, 0x4c, 0x71, 0xe8, 0xdd, 0xb8, 0x35, 0xaa, 0x94, 0x96, 0x63, 0x9a, 0x22, 0xa9, + 0x34, 0x2b, 0xad, 0xdd, 0xf6, 0x49, 0xb8, 0xcd, 0x5b, 0x85, 0x17, 0xf3, 0x5f, 0xeb, 0xae, 0x69, + 0x5e, 0xcf, 0xad, 0x6a, 0xb8, 0x03, 0x66, 0x90, 0xfc, 0xfb, 0x3b, 0x78, 0xc9, 0xf2, 0x0e, 0xdd, + 0x3a, 0xb2, 0x21, 0x64, 0xb4, 0x0f, 0x1a, 0x85, 0xcc, 0xc9, 0xff, 0xa6, 0xd3, 0xaa, 0x77, 0x37, + 0x87, 0x1d, 0xfe, 0x32, 0xf5, 0x9d, 0xc9, 0xd4, 0x77, 0x3e, 0xa6, 0xbe, 0xf3, 0x34, 0xf3, 0x4b, + 0x93, 0x99, 0x5f, 0x7a, 0x9b, 0xf9, 0xa5, 0xdb, 0xcb, 0x44, 0x98, 0xe1, 0x28, 0x0e, 0x99, 0xcc, + 0x22, 0xeb, 0x13, 0x7c, 0x57, 0x62, 0xb0, 0x36, 0x0a, 0x8a, 0x1a, 0xef, 0xbf, 0x14, 0x69, 0x1e, + 0x14, 0x60, 0xbc, 0xb3, 0x68, 0xf2, 0xe8, 0x33, 0x00, 0x00, 0xff, 0xff, 0x55, 0x8e, 0x95, 0x0b, + 0xb5, 0x02, 0x00, 0x00, } func (m *ProposedDisableValidator) Marshal() (dAtA []byte, err error) { @@ -143,6 +153,11 @@ func (m *ProposedDisableValidator) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintProposedDisableValidator(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x28 + } if len(m.Rejects) > 0 { for iNdEx := len(m.Rejects) - 1; iNdEx >= 0; iNdEx-- { { @@ -225,6 +240,9 @@ func (m *ProposedDisableValidator) Size() (n int) { n += 1 + l + sovProposedDisableValidator(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovProposedDisableValidator(uint64(m.SchemaVersion)) + } return n } @@ -395,6 +413,25 @@ func (m *ProposedDisableValidator) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposedDisableValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipProposedDisableValidator(dAtA[iNdEx:]) diff --git a/x/validator/types/rejected_validator.pb.go b/x/validator/types/rejected_validator.pb.go index 020617bbb..814620b14 100644 --- a/x/validator/types/rejected_validator.pb.go +++ b/x/validator/types/rejected_validator.pb.go @@ -24,10 +24,11 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type RejectedDisableValidator struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` - Approvals []*Grant `protobuf:"bytes,3,rep,name=approvals,proto3" json:"approvals,omitempty"` - Rejects []*Grant `protobuf:"bytes,4,rep,name=rejects,proto3" json:"rejects,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` + Approvals []*Grant `protobuf:"bytes,3,rep,name=approvals,proto3" json:"approvals,omitempty"` + Rejects []*Grant `protobuf:"bytes,4,rep,name=rejects,proto3" json:"rejects,omitempty"` + SchemaVersion uint32 `protobuf:"varint,5,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *RejectedDisableValidator) Reset() { *m = RejectedDisableValidator{} } @@ -91,6 +92,13 @@ func (m *RejectedDisableValidator) GetRejects() []*Grant { return nil } +func (m *RejectedDisableValidator) GetSchemaVersion() uint32 { + if m != nil { + return m.SchemaVersion + } + return 0 +} + func init() { proto.RegisterType((*RejectedDisableValidator)(nil), "zigbeealliance.distributedcomplianceledger.validator.RejectedDisableValidator") } @@ -100,27 +108,28 @@ func init() { } var fileDescriptor_3d5230ea0750343d = []byte{ - // 312 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0xad, 0xca, 0x4c, 0x4f, - 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29, - 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4, - 0xa7, 0x16, 0xe9, 0x97, 0x25, 0xe6, 0x64, 0xa6, 0x24, 0x96, 0xe4, 0x17, 0xe9, 0x17, 0xa5, 0x66, - 0xa5, 0x26, 0x97, 0xa4, 0xa6, 0xc4, 0xc3, 0x85, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x4c, - 0x50, 0x8d, 0xd3, 0xc3, 0x63, 0x9c, 0x1e, 0x5c, 0xaf, 0x94, 0x64, 0x72, 0x7e, 0x71, 0x6e, 0x7e, - 0x71, 0x3c, 0xd8, 0x0c, 0x7d, 0x08, 0x07, 0x62, 0xa0, 0x94, 0x03, 0x59, 0xee, 0x4b, 0x2f, 0x4a, - 0xcc, 0x2b, 0x81, 0x98, 0xa0, 0xb4, 0x85, 0x89, 0x4b, 0x22, 0x08, 0xea, 0x5e, 0x97, 0xcc, 0xe2, - 0xc4, 0xa4, 0x9c, 0xd4, 0x30, 0x98, 0x42, 0x21, 0x23, 0x2e, 0xf6, 0xc4, 0x94, 0x94, 0xa2, 0xd4, - 0xe2, 0x62, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x4e, 0x27, 0x89, 0x4b, 0x5b, 0x74, 0x45, 0xa0, 0x2e, - 0x70, 0x84, 0xc8, 0x04, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x07, 0xc1, 0x14, 0x82, 0xf4, 0x24, 0x17, - 0xa5, 0x82, 0xb4, 0x4b, 0x30, 0x11, 0xd2, 0x03, 0x55, 0x28, 0x14, 0xc9, 0xc5, 0x99, 0x58, 0x50, - 0x50, 0x94, 0x5f, 0x96, 0x98, 0x53, 0x2c, 0xc1, 0xac, 0xc0, 0xac, 0xc1, 0x6d, 0x64, 0xad, 0x47, - 0x4e, 0x58, 0xe9, 0xb9, 0x83, 0xbc, 0x16, 0x84, 0x30, 0x4d, 0x28, 0x94, 0x8b, 0x1d, 0x12, 0x1d, - 0xc5, 0x12, 0x2c, 0x94, 0x1b, 0x0c, 0x33, 0xcb, 0x29, 0xe5, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, - 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, - 0x8f, 0xe5, 0x18, 0xa2, 0xbc, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, - 0x21, 0x36, 0xe9, 0x62, 0x8b, 0x1e, 0x5d, 0x84, 0x5d, 0xba, 0xd0, 0x08, 0xaa, 0x40, 0x8a, 0xa2, - 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0x70, 0x1c, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, - 0xc0, 0x63, 0x8b, 0x0b, 0x87, 0x02, 0x00, 0x00, + // 333 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x91, 0x41, 0x4b, 0xc3, 0x30, + 0x1c, 0xc5, 0xd7, 0x4d, 0x1d, 0xab, 0xec, 0x52, 0x3c, 0xc4, 0x1d, 0xca, 0x10, 0x0f, 0xbb, 0x34, + 0x85, 0xe9, 0xcd, 0x8b, 0x0e, 0x41, 0x10, 0xbc, 0x54, 0x1c, 0xe8, 0x65, 0xa4, 0xc9, 0x9f, 0x2e, + 0x92, 0x36, 0x25, 0xc9, 0x86, 0xfa, 0x29, 0xfc, 0x30, 0x7e, 0x08, 0x8f, 0xc3, 0x93, 0x78, 0x92, + 0xed, 0x8b, 0xc8, 0x96, 0x76, 0x73, 0x20, 0x0a, 0xf3, 0x98, 0x97, 0xf7, 0x7e, 0xbc, 0xe4, 0xb9, + 0x57, 0x4f, 0x3c, 0x89, 0x01, 0x88, 0x10, 0x9c, 0x64, 0x14, 0x42, 0xc6, 0xb5, 0x51, 0x3c, 0x1e, + 0x19, 0x60, 0x54, 0xa6, 0xb9, 0x55, 0x05, 0xb0, 0x04, 0x54, 0x38, 0x26, 0x82, 0x33, 0x62, 0xa4, + 0x0a, 0x15, 0xdc, 0x03, 0x35, 0xc0, 0x06, 0x4b, 0x09, 0xe7, 0x4a, 0x1a, 0xe9, 0x1d, 0xaf, 0xe3, + 0xf0, 0x2f, 0x38, 0xbc, 0xcc, 0xb6, 0xf6, 0xa9, 0xd4, 0xa9, 0xd4, 0x83, 0x05, 0x23, 0xb4, 0x07, + 0x0b, 0x6c, 0x9d, 0x6e, 0xd4, 0x2f, 0x51, 0x24, 0x33, 0x96, 0x70, 0xf0, 0x51, 0x75, 0x51, 0x54, + 0xf4, 0x3d, 0xe7, 0x9a, 0xc4, 0x02, 0xfa, 0xa5, 0xd1, 0xeb, 0xba, 0x75, 0xc2, 0x98, 0x02, 0xad, + 0x91, 0xd3, 0x76, 0x3a, 0x8d, 0x1e, 0x7a, 0x7b, 0x09, 0xf6, 0x8a, 0x06, 0x67, 0xf6, 0xe6, 0xda, + 0x28, 0x9e, 0x25, 0x51, 0x69, 0x9c, 0x67, 0xa8, 0x82, 0x79, 0x1c, 0x55, 0xff, 0xca, 0x14, 0x46, + 0xef, 0xd6, 0x6d, 0x90, 0x3c, 0x57, 0x72, 0x4c, 0x84, 0x46, 0xb5, 0x76, 0xad, 0xb3, 0xdb, 0x3d, + 0xc1, 0x9b, 0xfc, 0x15, 0xbe, 0x98, 0x3f, 0x2d, 0x5a, 0xd1, 0xbc, 0x1b, 0xb7, 0x6e, 0xe7, 0xd0, + 0x68, 0xeb, 0xff, 0xe0, 0x92, 0xe5, 0x1d, 0xba, 0x4d, 0x4d, 0x87, 0x90, 0x92, 0x3e, 0x28, 0xcd, + 0x65, 0x86, 0xb6, 0xdb, 0x4e, 0xa7, 0x19, 0xad, 0x8b, 0x3d, 0xf6, 0x3a, 0xf5, 0x9d, 0xc9, 0xd4, + 0x77, 0x3e, 0xa7, 0xbe, 0xf3, 0x3c, 0xf3, 0x2b, 0x93, 0x99, 0x5f, 0x79, 0x9f, 0xf9, 0x95, 0xbb, + 0xcb, 0x84, 0x9b, 0xe1, 0x28, 0xc6, 0x54, 0xa6, 0xa1, 0xed, 0x13, 0xfc, 0x34, 0x62, 0xb0, 0x6a, + 0x14, 0x14, 0x33, 0x3e, 0x7c, 0x1b, 0xd2, 0x3c, 0xe6, 0xa0, 0xe3, 0x9d, 0xc5, 0x92, 0x47, 0x5f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xe1, 0x82, 0x1d, 0x27, 0xad, 0x02, 0x00, 0x00, } func (m *RejectedDisableValidator) Marshal() (dAtA []byte, err error) { @@ -143,6 +152,11 @@ func (m *RejectedDisableValidator) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintRejectedValidator(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x28 + } if len(m.Rejects) > 0 { for iNdEx := len(m.Rejects) - 1; iNdEx >= 0; iNdEx-- { { @@ -225,6 +239,9 @@ func (m *RejectedDisableValidator) Size() (n int) { n += 1 + l + sovRejectedValidator(uint64(l)) } } + if m.SchemaVersion != 0 { + n += 1 + sovRejectedValidator(uint64(m.SchemaVersion)) + } return n } @@ -395,6 +412,25 @@ func (m *RejectedDisableValidator) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRejectedValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipRejectedValidator(dAtA[iNdEx:]) diff --git a/x/validator/types/validator.pb.go b/x/validator/types/validator.pb.go index 009048f5c..2f0ee7d45 100644 --- a/x/validator/types/validator.pb.go +++ b/x/validator/types/validator.pb.go @@ -37,7 +37,8 @@ type Validator struct { // has the validator been removed from validator set Jailed bool `protobuf:"varint,5,opt,name=jailed,proto3" json:"jailed,omitempty"` // the reason of validator jailing - JailedReason string `protobuf:"bytes,6,opt,name=jailedReason,proto3" json:"jailedReason,omitempty"` + JailedReason string `protobuf:"bytes,6,opt,name=jailedReason,proto3" json:"jailedReason,omitempty"` + SchemaVersion uint32 `protobuf:"varint,7,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } func (m *Validator) Reset() { *m = Validator{} } @@ -81,32 +82,34 @@ func init() { } var fileDescriptor_dac29b5a8b0a342e = []byte{ - // 398 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0xb1, 0x8e, 0xd3, 0x40, - 0x10, 0x86, 0xbd, 0x07, 0xb6, 0xb8, 0xbd, 0xab, 0x2c, 0x0b, 0xed, 0x5d, 0xe1, 0x58, 0x57, 0xb9, - 0xf1, 0x5a, 0x02, 0x2a, 0xba, 0x44, 0xa7, 0x2b, 0xa0, 0x41, 0x46, 0xa2, 0xa0, 0x41, 0xb6, 0x77, - 0x59, 0x16, 0x39, 0x1e, 0x6b, 0x77, 0x4d, 0x30, 0x4f, 0x40, 0x49, 0x49, 0x99, 0x87, 0xe0, 0x21, - 0x22, 0xaa, 0x88, 0x8a, 0x12, 0x25, 0x0d, 0x8f, 0x81, 0xe2, 0x75, 0x88, 0x23, 0x21, 0x8a, 0x74, - 0xff, 0xcc, 0x78, 0x3e, 0xef, 0xfc, 0x3f, 0xbe, 0xfd, 0x24, 0x45, 0xc1, 0x79, 0x5e, 0x55, 0x32, - 0xaf, 0x4b, 0x9e, 0x32, 0xa9, 0x8d, 0x92, 0x45, 0x6b, 0x38, 0x2b, 0x61, 0xde, 0xd8, 0x6e, 0xc5, - 0x99, 0xe0, 0x2a, 0xfd, 0x90, 0x57, 0x92, 0xe5, 0x06, 0x46, 0x8a, 0x36, 0x0a, 0x0c, 0xf8, 0x4f, - 0x8e, 0x29, 0xf4, 0x3f, 0x14, 0xfa, 0x77, 0xf7, 0xfa, 0x4a, 0x00, 0x88, 0x8a, 0xa7, 0x3d, 0xa3, - 0x68, 0xdf, 0xa6, 0x79, 0xdd, 0x59, 0xe0, 0x75, 0x20, 0x40, 0x40, 0x2f, 0xd3, 0x9d, 0x1a, 0xba, - 0x57, 0x25, 0xe8, 0x39, 0xe8, 0x37, 0x76, 0x60, 0x8b, 0x61, 0x74, 0x77, 0xd2, 0x1d, 0x8c, 0xeb, - 0x52, 0xc9, 0xc6, 0x48, 0xa8, 0x2d, 0xe7, 0x66, 0x75, 0x86,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, - 0x1c, 0xdc, 0x49, 0x86, 0xe8, 0x3e, 0x8e, 0xc2, 0x33, 0x5d, 0xc3, 0x75, 0xe1, 0xf5, 0x57, 0x3f, - 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0x99, 0xb1, 0x7f, 0xad, 0xc9, 0x02, 0x00, 0x00, + // 421 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x7d, 0x85, 0x04, 0x7a, 0x6d, 0x17, 0x2b, 0x42, 0x6e, 0x07, 0xc7, 0xaa, 0x18, 0xbc, + 0xe4, 0x2c, 0x01, 0x13, 0x5b, 0xa2, 0xaa, 0x03, 0x2c, 0xc8, 0x48, 0x1d, 0x58, 0xd0, 0xf9, 0xee, + 0x71, 0x3d, 0xe4, 0xf8, 0x59, 0x77, 0x17, 0x8a, 0xf9, 0x04, 0x8c, 0x8c, 0x8c, 0xf9, 0x10, 0x7c, + 0x08, 0xc4, 0x54, 0x31, 0x31, 0xa2, 0x64, 0x61, 0xe2, 0x33, 0xa0, 0xf8, 0x5c, 0xe2, 0x48, 0x88, + 0xa1, 0xdb, 0x7b, 0xff, 0xe7, 0xf7, 0xb3, 0xfd, 0x7b, 0xf4, 0xec, 0x83, 0x56, 0x05, 0x00, 0x2f, + 0x4b, 0xcd, 0x2b, 0x01, 0x99, 0xd4, 0xd6, 0x19, 0x5d, 0x2c, 0x1c, 0x48, 0x81, 0xf3, 0xda, 0xa7, + 0x25, 0x48, 0x05, 0x26, 0x7b, 0xc7, 0x4b, 0x2d, 0xb9, 0xc3, 0x5e, 0xc5, 0x6a, 0x83, 0x0e, 0xc3, + 0x27, 0xbb, 0x14, 0xf6, 0x1f, 0x0a, 0xfb, 0xbb, 0x7b, 0x72, 0xac, 0x10, 0x55, 0x09, 0x59, 0xcb, + 0x28, 0x16, 0x6f, 0x32, 0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60, 0xec, 0x46, 0xc0, 0xbd, 0x84, 0xa4, + 0x47, 0xf9, 0x6e, 0xf8, 0xf4, 0xf0, 0xe3, 0x72, 0x1c, 0x7c, 0x5e, 0x8e, 0x83, 0x5f, 0xcb, 0x71, + 0x30, 0x93, 0x5f, 0x57, 0x31, 0xb9, 0x5e, 0xc5, 0xe4, 0xe7, 0x2a, 0x26, 0x9f, 0xd6, 0x71, 0x70, + 0xbd, 0x8e, 0x83, 0x1f, 0xeb, 0x38, 0x78, 0xf5, 0x4c, 0x69, 0x77, 0xb9, 0x28, 0x98, 0xc0, 0x79, + 0xe6, 0x0d, 0x4e, 0xfe, 0x75, 0xde, 0xc9, 0xd6, 0xe1, 0xa4, 0x3b, 0xf0, 0xfb, 0xde, 0x89, 0x5d, + 0x53, 0x83, 0x2d, 0x86, 0xad, 0x9b, 0xc7, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x41, 0x42, + 0x0f, 0xef, 0x02, 0x00, 0x00, } func (m *Validator) Marshal() (dAtA []byte, err error) { @@ -129,6 +132,11 @@ func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SchemaVersion != 0 { + i = encodeVarintValidator(dAtA, i, uint64(m.SchemaVersion)) + i-- + dAtA[i] = 0x38 + } if len(m.JailedReason) > 0 { i -= len(m.JailedReason) copy(dAtA[i:], m.JailedReason) @@ -224,6 +232,9 @@ func (m *Validator) Size() (n int) { if l > 0 { n += 1 + l + sovValidator(uint64(l)) } + if m.SchemaVersion != 0 { + n += 1 + sovValidator(uint64(m.SchemaVersion)) + } return n } @@ -437,6 +448,25 @@ func (m *Validator) Unmarshal(dAtA []byte) error { } m.JailedReason = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) + } + m.SchemaVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SchemaVersion |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipValidator(dAtA[iNdEx:])