From beb1ad2df75083febf9ccceaf1eef2d375e9dffb Mon Sep 17 00:00:00 2001 From: 0xmuralik Date: Thu, 2 Mar 2023 11:24:15 +0530 Subject: [PATCH] revert to '/' for hash ref --- .../registry/v1beta1/attributes.proto | 35 +++++++++---------- .../helpers/examples/binary_example.yml | 4 +-- .../examples/chain_registration_example.yml | 2 +- .../helpers/examples/docker_image_example.yml | 4 +-- x/registry/helpers/examples/example1.yml | 4 +-- .../helpers/examples/js_package_example.yml | 4 +-- .../examples/responder_contract_example.yml | 6 ++-- .../examples/watcher_registraion_example.yml | 6 ++-- .../examples/website_registration_example.yml | 6 ++-- 9 files changed, 34 insertions(+), 37 deletions(-) diff --git a/proto/vulcanize/registry/v1beta1/attributes.proto b/proto/vulcanize/registry/v1beta1/attributes.proto index b3caf74a..2534ea73 100644 --- a/proto/vulcanize/registry/v1beta1/attributes.proto +++ b/proto/vulcanize/registry/v1beta1/attributes.proto @@ -5,9 +5,6 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/cerc-io/laconicd/x/registry/types"; -message HashReference{ - string ref =1; -} message ServiceProviderRecord { string bond_id = 1 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""]; @@ -30,10 +27,10 @@ message ServiceProviderRecord { message WebsiteRegistrationRecord { string url = 1 [(gogoproto.moretags) = "json:\"url\" yaml:\"url\""]; - HashReference repo_reference = 2 + map repo_reference = 2 [(gogoproto.moretags) = "json:\"repoReference\" yaml:\"repoReference\""]; - HashReference build_artifact_ref = 3 [(gogoproto.moretags) = "json:\"buildArtifactRef\" yaml:\"buildArtifactRef\""]; - HashReference tls_cert_ref = 4 [(gogoproto.moretags) = "json:\"tlsCertRef\" yaml:\"tlsCertRef\""]; + map build_artifact_ref = 3 [(gogoproto.moretags) = "json:\"buildArtifactRef\" yaml:\"buildArtifactRef\""]; + map tls_cert_ref = 4 [(gogoproto.moretags) = "json:\"tlsCertRef\" yaml:\"tlsCertRef\""]; string type = 5 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""]; string version = 6 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""]; } @@ -47,36 +44,36 @@ message GitRepository{ } message Binary{ - HashReference hash_reference=1; + map hash_reference=1; string targeted_arch=2; string runtime_version=3; - HashReference repo_reference=4; + map repo_reference=4; string version=5; string type=6; } message DockerImage{ string image_id=1; - HashReference binary_reference=2; - HashReference repo_reference=3; + map binary_reference=2; + map repo_reference=3; string version=4; string type=5; } message WatcherRegistrationRecord{ WatcherMetadata metadata =1; - HashReference repo_reference=2; + map repo_reference=2; WASMBinary wasm=3; string version=4; string type=5; message WatcherMetadata{ string version=1; - HashReference chain_reference=2; + map chain_reference=2; } message WASMBinary{ - HashReference hash_reference=1; + map hash_reference=1; WASMBinaryMetadata metadata=2; } @@ -87,16 +84,16 @@ message WatcherRegistrationRecord{ } message ResponderContract{ - HashReference service_provider_ref=1; - HashReference auction_ref=2; - HashReference watcher_ref=3; + map service_provider_ref=1; + map auction_ref=2; + map watcher_ref=3; string version=4; string type=5; } message JSPackage{ - HashReference repo_reference=1; - HashReference js_package_ref=2; + map repo_reference=1; + map js_package_ref=2; string version=3; string type=4; string name =5; @@ -109,5 +106,5 @@ message ChainRegistrationRecord{ string version=4; string chain_id=5; string network_id=6; - HashReference genesis_hash=7; + map genesis_hash=7; } \ No newline at end of file diff --git a/x/registry/helpers/examples/binary_example.yml b/x/registry/helpers/examples/binary_example.yml index 88709fed..ad8db108 100644 --- a/x/registry/helpers/examples/binary_example.yml +++ b/x/registry/helpers/examples/binary_example.yml @@ -1,9 +1,9 @@ record: hash_reference: - ref: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 + /: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 targeted_arch: x86_64 runtime_version: go 1.18 repo_reference: - ref: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D version: 1.0.0 type: Binary \ No newline at end of file diff --git a/x/registry/helpers/examples/chain_registration_example.yml b/x/registry/helpers/examples/chain_registration_example.yml index c1324ec9..4fa89aa7 100644 --- a/x/registry/helpers/examples/chain_registration_example.yml +++ b/x/registry/helpers/examples/chain_registration_example.yml @@ -10,4 +10,4 @@ record: chain_id: laconic_9000-1 network_id: "1392" genesis_hash: - ref: f6fbe71210275adc7c7ef585a72c065cdb85f0c8d13dea0f229fd7c22d445a26 \ No newline at end of file + /: f6fbe71210275adc7c7ef585a72c065cdb85f0c8d13dea0f229fd7c22d445a26 \ No newline at end of file diff --git a/x/registry/helpers/examples/docker_image_example.yml b/x/registry/helpers/examples/docker_image_example.yml index 9f2bc677..b7ecd09e 100644 --- a/x/registry/helpers/examples/docker_image_example.yml +++ b/x/registry/helpers/examples/docker_image_example.yml @@ -1,8 +1,8 @@ record: image_id: 77af4d6b9913 binary_reference: - ref: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 + /: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 repo_reference: - ref: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D version: 1.0.0 type: DockerImage \ No newline at end of file diff --git a/x/registry/helpers/examples/example1.yml b/x/registry/helpers/examples/example1.yml index 2046737c..3f7b4863 100644 --- a/x/registry/helpers/examples/example1.yml +++ b/x/registry/helpers/examples/example1.yml @@ -2,6 +2,6 @@ record: attr1: value1 attr2: value2 link1: - ref: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D link2: - ref: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 + /: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 diff --git a/x/registry/helpers/examples/js_package_example.yml b/x/registry/helpers/examples/js_package_example.yml index a29bc00a..9b06fbc4 100644 --- a/x/registry/helpers/examples/js_package_example.yml +++ b/x/registry/helpers/examples/js_package_example.yml @@ -1,8 +1,8 @@ record: repo_reference: - ref: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 + /: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 js_package_ref: - ref: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D version: 1.0.0 type: JSPackage name: test-JSPackage \ No newline at end of file diff --git a/x/registry/helpers/examples/responder_contract_example.yml b/x/registry/helpers/examples/responder_contract_example.yml index a327604d..e503cc39 100644 --- a/x/registry/helpers/examples/responder_contract_example.yml +++ b/x/registry/helpers/examples/responder_contract_example.yml @@ -1,9 +1,9 @@ record: service_provider_ref: - ref: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 + /: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 auction_ref: - ref: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D watcher_ref: - ref: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR + /: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR version: 1.0.0 type: ResponderContract \ No newline at end of file diff --git a/x/registry/helpers/examples/watcher_registraion_example.yml b/x/registry/helpers/examples/watcher_registraion_example.yml index f0cf6e33..50b7d687 100644 --- a/x/registry/helpers/examples/watcher_registraion_example.yml +++ b/x/registry/helpers/examples/watcher_registraion_example.yml @@ -2,12 +2,12 @@ record: metadata: version: 0.32.0 chain_reference: - ref: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 + /: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 repo_reference: - ref: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D wasm: hash_reference: - ref: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR + /: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR metadata: compiler_version: 1.15.0 execution_engine_version: 0.16.1 diff --git a/x/registry/helpers/examples/website_registration_example.yml b/x/registry/helpers/examples/website_registration_example.yml index 0fd14d1b..8091d44a 100644 --- a/x/registry/helpers/examples/website_registration_example.yml +++ b/x/registry/helpers/examples/website_registration_example.yml @@ -2,9 +2,9 @@ record: type: WebsiteRegistrationRecord url: https://cerc.io repo_reference: - ref: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D build_artifact_ref: - ref: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 + /: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 tls_cert_ref: - ref: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR + /: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR version: 1.0.0 \ No newline at end of file