You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* AUTO: Sync ScalarDL docs in English to docs site repo
* Delete README.mdx
* Delete sdks.mdx
* Remove SDK section and SDK doc
The Java Client SDK doc doesn't provide much value and the contents have recently been referenced in other docs, so it along with the SDK section can be removed for now.
---------
Co-authored-by: josh-wong <joshua.wong@scalar-labs.com>
Co-authored-by: Josh Wong <23216828+josh-wong@users.noreply.github.com>
Copy file name to clipboardExpand all lines: versioned_docs/version-3.8/data-modeling.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,4 +111,4 @@ Depending on the characteristics of your data and its access patterns, there are
111
111
112
112
A simple way to store data in an asset is to always store the latest state of the data in its entirety. However, this approach is sometimes inefficient from a storage cost perspective because, if a small part of the data is updated frequently, almost all the parts of the data are stored as duplicates in the asset records.
113
113
114
-
In such a case, you can choose to put only the differential data when updating the asset and merge all the asset records when you want to get the whole image of the latest data. Although this approach is efficient from a storage cost perspective, it affects query performance since it requires scanning all asset records. To limit the affects of this trade-off, creating a snapshot at some point in time is also an option so that you do not have to scan all asset records every time.[The generic contracts for collection authenticity management](./use-generic-contracts.mdx#manage-collection-authenticity) follow this design pattern.
114
+
In such a case, you can choose to put only the differential data when updating the asset and merge all the asset records when you want to get the whole image of the latest data. Although this approach is efficient from a storage cost perspective, it affects query performance since it requires scanning all asset records. To limit the affects of this trade-off, creating a snapshot at some point in time is also an option so that you do not have to scan all asset records every time.
Copy file name to clipboardExpand all lines: versioned_docs/version-3.8/getting-started.mdx
+3-12Lines changed: 3 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ This getting started tutorial explains how to configure ScalarDL on your preferr
15
15
16
16
## Prerequisites
17
17
18
-
- One of the following Java Development Kits (JDKs)
18
+
- One of the following Java Development Kits (JDKs):
19
19
-**[Oracle JDK](https://www.oracle.com/java/):** 8, 11, 17, or 21 (LTS versions)
20
20
-**[OpenJDK](https://openjdk.org/) ([Eclipse Temurin](https://adoptium.net/temurin/), [Amazon Corretto](https://aws.amazon.com/corretto/), or [Microsoft Build of OpenJDK](https://learn.microsoft.com/en-us/java/openjdk/)):** 8, 11, 17, or 21 (LTS versions)
21
21
-[Docker](https://www.docker.com/get-started/) 20.10 or later with [Docker Compose](https://docs.docker.com/compose/install/) v2.20.0 or later
@@ -178,7 +178,7 @@ Select your database, and follow the instructions to deploy ScalarDL Ledger with
178
178
179
179
## Download the Client SDK
180
180
181
-
Next, you'll use the ScalarDL client tools and samples in the `scalardl-java-client-sdk` repository to interact with ScalarDL.
181
+
Next, you'll use the ScalarDL client tools and samples in the [`scalardl-java-client-sdk`](https://github.com/scalar-labs/scalardl-java-client-sdk) repository to interact with ScalarDL.
182
182
183
183
Specify a version that is the same as the deployed ScalarDL version and is used for downloading the tools by running the following command:
184
184
@@ -329,25 +329,16 @@ Briefly speaking, if only ScalarDL Ledger is used, the validation traverses asse
329
329
With ScalarDL Ledger and Auditor, the validation checks discrepancies (i.e., Byzantine faults) between the states of Ledger and Auditor without centralized coordination.
330
330
Please read [Getting Started with ScalarDL Auditor](getting-started-auditor.mdx) for more details about the validation with Auditor.
331
331
332
-
## Create your own contracts or use generic contracts
333
-
334
-
There are two options for preparing contracts: creating your own or using predefined ones.
332
+
## Create your own contracts
335
333
336
334
As explained above, what you need to do to create your contracts is to extend the predefined base contract classes and override the `invoke` method as you like. For details, see [A Guide on How to Write a Good Contract](how-to-write-contract.mdx).
337
335
338
-
Predefined ones are called generic contracts and provide basic functionalities for common use cases. For details, see [Use Generic Contracts and Functions](use-generic-contracts.mdx).
339
-
340
336
## See also
341
337
342
338
To write your own contracts, see the following:
343
339
344
340
* [A Guide on How to Write a Good Contract](how-to-write-contract.mdx)
345
341
346
-
To use generic contracts, see the following:
347
-
348
-
* [Use Generic Contracts and Functions](use-generic-contracts.mdx)
349
-
* [Generic Contracts and Functions Reference Guide](generic-contracts-reference.mdx)
350
-
351
342
To interact with ScalarDL components in your Java applications, see the following:
352
343
353
344
* [Write a ScalarDL Application in Java](how-to-write-applications.mdx)
Copy file name to clipboardExpand all lines: versioned_docs/version-3.8/how-to-write-applications.mdx
+6-15Lines changed: 6 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ This document explains how to write ScalarDL applications. You will learn how to
12
12
13
13
## Use the ScalarDL Client SDK
14
14
15
-
You have two options to interact with ScalarDL: using commands as shown in the [getting started guide](getting-started.mdx) or using the [Java Client SDK](scalardl-java-client-sdk/README.mdx).
15
+
You have two options to interact with ScalarDL: using [commands](scalardl-command-reference.mdx) as shown in the [getting started guide](getting-started.mdx) or using the [Java Client SDK](https://github.com/scalar-labs/scalardl-java-client-sdk).
16
16
Using commands is convenient because you don't need to write applications. However, they invoke a process for each execution, which is slow, so they are mainly for quickly testing your contracts. Instead, using the Client SDK is usually recommended when you write ScalarDL-based applications because it is more efficient.
17
17
18
18
The Client SDK is available on [Maven Central](https://search.maven.org/search?q=a:scalardl-java-client-sdk). You can install it in your application by using a build tool such as Gradle. For example in Gradle, you can add the following dependency to `build.gradle`, replacing `VERSION` with the version of ScalarDL that you want to use.
@@ -53,7 +53,7 @@ For more information, please take a look at [Javadoc](https://javadoc.io/doc/com
53
53
54
54
## Handle errors
55
55
56
-
If an error occurs in your application, the ClientSDK will return an exception with a status code and an error message with an error code. You should check the status code and the error code to identify the cause of the error.
56
+
If an error occurs in your application, the ClientSDK will return an exception with a status code. You should check the status code to identify the cause of the error.
57
57
58
58
### Implement error handling
59
59
@@ -85,15 +85,6 @@ Status codes explain what kind of status request you ended up with. The status c
85
85
86
86
For more details, see <JavadocLink packageName="scalardl-common" path="com/scalar/dl/ledger/service" className="StatusCode" />.
87
87
88
-
### Error codes
89
-
90
-
Error codes explain more details about an error that a request encountered. For details about error codes, see the following:
- [ScalarDL Common Error Codes](scalardl-common-status-codes.mdx)
96
-
97
88
## Validate your data
98
89
99
90
In ScalarDL, you occasionally need to validate your data to make sure all the data is in a valid state. A valid state varies depending on how you set up and configure ScalarDL.
@@ -134,15 +125,15 @@ Asset Proof in ScalarDL is a set of information about an asset record and used a
134
125
135
126
#### Benefits of Asset Proof
136
127
137
-
Since Asset Proof is evidence at the time of execution by Ledger, it is difficult for Ledger to tamper data after the evidence is created because the proofs and Ledger states would be diverged. Thus, making use of Asset Proof appropriately could reduce the risk of data tampering.
128
+
Since Asset Proof is evidence at the time of execution by Ledger, it is difficult for Ledger to tamper data after the evidence is created because the Asset Proofs and Ledger states would be diverged. Thus, making use of Asset Proof appropriately could reduce the risk of data tampering.
138
129
139
130
#### How to access Asset Proof from your applications
140
131
141
-
You can get <JavadocLink packageName="scalardl-common" path="com/scalar/dl/ledger/asset" className="AssetProof" /> from the result <JavadocLink packageName="scalardl-common" path="com/scalar/dl/ledger/model" className="ContractExecutionResult" /> of the `executeContract` method of the Client SDK. A proof can be validated if it is not tampered and it is from Ledger by verifying the signature.
132
+
You can get <JavadocLink packageName="scalardl-common" path="com/scalar/dl/ledger/asset" className="AssetProof" /> from the result <JavadocLink packageName="scalardl-common" path="com/scalar/dl/ledger/model" className="ContractExecutionResult" /> of the `executeContract` method of the Client SDK. An Asset Proof can be validated if it is not tampered and it is from Ledger by verifying the signature.
142
133
143
-
Storing proofs outside of a domain in which Ledger runs is recommended. This is so that malicious activities in one domain can be detected by the other domain. Storing proofs in cloud storages for ease of management is also worth considering.
134
+
Storing Asset Proofs outside of a domain in which Ledger runs is recommended. This is so that malicious activities in one domain can be detected by the other domain. Storing Asset Proofs in cloud storages for ease of management is also worth considering.
144
135
145
-
The proofs obtained in execution can be used when you do `validateLedger`. `validateLedger` also returns the proof of a specified asset record after doing Ledger-side validation. Then, the client can check if the proof is the same as the one that was previously returned from Ledger.
136
+
The Asset Proofs obtained in execution can be used when you do `validateLedger`. `validateLedger` also returns the Asset Proof of a specified asset record after doing Ledger-side validation. Then, the client can check if the Asset Proof is the same as the one that was previously returned from Ledger.
0 commit comments