Skip to content

Commit 0dc8d9e

Browse files
refactor: Delete legacy operation related to credentials (#831)
* ATL-6668: Delete legacy operation related to credentials This commit deletes the IssueCredentialBatchOperation and RevokeCredentialsOperation. It does not delete node API, daos nor repositories related to credentials * ATL-6668: Delete more files related to VCs This commit deletes even more files related to VC operations. It also removes some dependencies on the old SDK * ATL-6668: Delete unused tables This commit deletes tables and indexes from VC legacy operations * ATL-6668: Fix formatting * ATL-6668: Address review comments This commit deletes references to legacy VC code in protobuf and sql definitions
1 parent 25d1fae commit 0dc8d9e

File tree

70 files changed

+913
-4091
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+913
-4091
lines changed

build.sbt

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -108,19 +108,10 @@ lazy val Dependencies = new {
108108

109109
// We have to exclude bouncycastle since for some reason bitcoinj depends on bouncycastle jdk15to18
110110
// (i.e. JDK 1.5 to 1.8), but we are using JDK 11
111-
val prismCredentials =
112-
"io.iohk.atala" % "prism-credentials-jvm" % versions.prismSdk excludeAll ExclusionRule(
113-
organization = "org.bouncycastle"
114-
)
115-
val prismProtos =
116-
"io.iohk.atala" % "prism-protos-jvm" % versions.prismSdk % "protobuf-src" intransitive ()
117-
val vaultProtos =
118-
"io.iohk.atala" % "vault-api-jvm" % versions.vaultSdk % "protobuf-src" intransitive ()
119-
// Can be used only in tests!
120-
val prismApi =
121-
"io.iohk.atala" % "prism-api-jvm" % versions.prismSdk % Test excludeAll ExclusionRule(
122-
organization = "org.bouncycastle"
123-
)
111+
val prismCrypto =
112+
"io.iohk.atala" % "prism-crypto-jvm" % versions.prismSdk
113+
val prismIdentity =
114+
"io.iohk.atala" % "prism-identity-jvm" % versions.prismSdk
124115

125116
// Test dependencies
126117
val catsScalatest =
@@ -163,7 +154,7 @@ lazy val Dependencies = new {
163154
val sttpDependencies = Seq(sttpCore, sttpCE2)
164155
val tofuDependencies = Seq(tofu, tofuLogging, tofuDerevoTagless)
165156
val prismDependencies =
166-
Seq(prismCredentials, prismProtos, prismApi, vaultProtos)
157+
Seq(prismCrypto, prismIdentity)
167158
val scalapbDependencies = Seq(
168159
"com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion % "protobuf",
169160
"com.thesamet.scalapb" %% "scalapb-runtime-grpc" % scalapb.compiler.Version.scalapbVersion
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
syntax = "proto3";
2+
3+
option java_multiple_files = true;
4+
option java_package = "io.iohk.atala.prism.protos";
5+
6+
package io.iohk.atala.prism.protos;
7+
8+
import "status.proto";
9+
import "google/protobuf/timestamp.proto";
10+
11+
/**
12+
* A request that can be used to check service health.
13+
* All PRISM services expose an RPC that accepts this message as request.
14+
*/
15+
message HealthCheckRequest {}
16+
17+
/**
18+
* A response that represents service health.
19+
* Status code 0 with empty response represents a healthy and reachable service,
20+
* while all other status codes represent issues with the service.
21+
*/
22+
message HealthCheckResponse {}
23+
24+
/**
25+
* The supported ledger types. Specifies which chain is used for storing transactions.
26+
*/
27+
enum Ledger {
28+
reserved 2; // Removed BITCOIN_TESTNET
29+
reserved "BITCOIN_TESTNET";
30+
reserved 3; // Removed BITCOIN_MAINNET
31+
reserved "BITCOIN_MAINNET";
32+
33+
UNKNOWN_LEDGER = 0; // Invalid default value.
34+
IN_MEMORY = 1; // Store transactions in memory instead of blockchain, used only for development.
35+
CARDANO_TESTNET = 4; // Cardano testnet, used for testing.
36+
CARDANO_MAINNET = 5; // Cardano mainnet, used in production.
37+
}
38+
39+
/**
40+
* Information about a ledger block.
41+
* See Ledger documentation for details on which ledgers are possible.
42+
*/
43+
message BlockInfo {
44+
reserved 2; // Removed timestamp_deprecated field
45+
reserved "timestamp_deprecated";
46+
47+
int32 number = 1; // Number of the block in the ledger.
48+
int32 index = 3; // Index of the transaction within the block.
49+
google.protobuf.Timestamp timestamp = 4; // Timestamp when the block was created.
50+
}
51+
52+
/**
53+
* Information about a ledger transaction and the block that the transaction is included in.
54+
*/
55+
message TransactionInfo {
56+
string transaction_id = 1; // Transaction ID.
57+
Ledger ledger = 2; // Ledger the transaction was published to.
58+
BlockInfo block = 3; // Block the transaction was included in.
59+
}
60+
61+
/**
62+
* The status of an Atala operation.
63+
*/
64+
enum OperationStatus {
65+
UNKNOWN_OPERATION = 0; // The operation hasn't been received by the node service yet.
66+
PENDING_SUBMISSION = 1; // The transaction containing this operation hasn't been published to the chain yet.
67+
AWAIT_CONFIRMATION = 2; // The transaction containing this operation has been published to the chain, but hasn't been processed by PRISM yet.
68+
CONFIRMED_AND_APPLIED = 3; // The operation has been successfully applied to the PRISM.
69+
CONFIRMED_AND_REJECTED = 4; // The operation has been processed by PRISM, but rejected because of some error.
70+
}
71+
72+
message AtalaErrorMessage {
73+
google.rpc.Status status = 1;
74+
}
75+
76+
message AtalaMessage {
77+
oneof message {
78+
AtalaErrorMessage atala_error_message = 9;
79+
}
80+
}
81+
82+
message ConnectionsStatusRequest {
83+
repeated string connection_tokens = 1;
84+
}

node/src/main/protobuf/health.proto

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Copyright 2015 The gRPC Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// The canonical version of this proto can be found at
16+
// https://github.com/grpc/grpc-proto/blob/master/grpc/health/v1/health.proto
17+
18+
syntax = "proto3";
19+
20+
package grpc.health.v1;
21+
22+
option csharp_namespace = "Grpc.Health.V1";
23+
option go_package = "google.golang.org/grpc/health/grpc_health_v1";
24+
//option java_multiple_files = true;
25+
//option java_outer_classname = "HealthProto";
26+
//option java_package = "io.grpc.health.v1";
27+
28+
message HealthCheckRequest {
29+
string service = 1;
30+
}
31+
32+
message HealthCheckResponse {
33+
enum ServingStatus {
34+
UNKNOWN = 0;
35+
SERVING = 1;
36+
NOT_SERVING = 2;
37+
SERVICE_UNKNOWN = 3; // Used only by the Watch method.
38+
}
39+
ServingStatus status = 1;
40+
}
41+
42+
service Health {
43+
// If the requested service is unknown, the call will fail with status
44+
// NOT_FOUND.
45+
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
46+
47+
// Performs a watch for the serving status of the requested service.
48+
// The server will immediately send back a message indicating the current
49+
// serving status. It will then subsequently send a new message whenever
50+
// the service's serving status changes.
51+
//
52+
// If the requested service is unknown when the call is received, the
53+
// server will send a message setting the serving status to
54+
// SERVICE_UNKNOWN but will *not* terminate the call. If at some
55+
// future point, the serving status of the service becomes known, the
56+
// server will send a new message with the service's serving status.
57+
//
58+
// If the call terminates with status UNIMPLEMENTED, then clients
59+
// should assume this method is not supported and should not retry the
60+
// call. If the call terminates with any other status (including OK),
61+
// clients should retry the call with appropriate exponential backoff.
62+
rpc Watch(HealthCheckRequest) returns (stream HealthCheckResponse);
63+
}

0 commit comments

Comments
 (0)