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.9/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
@@ -112,4 +112,4 @@ Depending on the characteristics of your data and its access patterns, there are
112
112
113
113
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.
114
114
115
-
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.
115
+
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.9/getting-started.mdx
+2-11Lines changed: 2 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,7 +179,7 @@ Select your database, and follow the instructions to deploy ScalarDL Ledger with
179
179
180
180
## Download the Client SDK
181
181
182
-
Next, you'll use the ScalarDL client tools and samples in the `scalardl-java-client-sdk` repository to interact with ScalarDL.
182
+
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.
183
183
184
184
Specify a version that is the same as the deployed ScalarDL version and is used for downloading the tools by running the following command:
185
185
@@ -330,25 +330,16 @@ Briefly speaking, if only ScalarDL Ledger is used, the validation traverses asse
330
330
With ScalarDL Ledger and Auditor, the validation checks discrepancies (i.e., Byzantine faults) between the states of Ledger and Auditor without centralized coordination.
331
331
Please read [Getting Started with ScalarDL Auditor](getting-started-auditor.mdx) for more details about the validation with Auditor.
332
332
333
-
## Create your own contracts or use generic contracts
334
-
335
-
There are two options for preparing contracts: creating your own or using predefined ones.
333
+
## Create your own contracts
336
334
337
335
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).
338
336
339
-
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).
340
-
341
337
## See also
342
338
343
339
To write your own contracts, see the following:
344
340
345
341
* [A Guide on How to Write a Good Contract](how-to-write-contract.mdx)
346
342
347
-
To use generic contracts, see the following:
348
-
349
-
* [Use Generic Contracts and Functions](use-generic-contracts.mdx)
350
-
* [Generic Contracts and Functions Reference Guide](generic-contracts-reference.mdx)
351
-
352
343
To interact with ScalarDL components in your Java applications, see the following:
353
344
354
345
* [Write a ScalarDL Application in Java](how-to-write-applications.mdx)
Copy file name to clipboardExpand all lines: versioned_docs/version-3.9/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
@@ -13,7 +13,7 @@ This document explains how to write ScalarDL applications. You will learn how to
13
13
14
14
## Use the ScalarDL Client SDK
15
15
16
-
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](scalardl-java-client-sdk/README.mdx).
16
+
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).
17
17
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.
18
18
19
19
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.
@@ -54,7 +54,7 @@ For more information, please take a look at [Javadoc](https://javadoc.io/doc/com
54
54
55
55
## Handle errors
56
56
57
-
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.
57
+
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.
58
58
59
59
### Implement error handling
60
60
@@ -86,15 +86,6 @@ Status codes explain what kind of status request you ended up with. The status c
86
86
87
87
For more details, see <JavadocLink packageName="scalardl-common" path="com/scalar/dl/ledger/service" className="StatusCode" />.
88
88
89
-
### Error codes
90
-
91
-
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)
97
-
98
89
## Validate your data
99
90
100
91
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.
@@ -135,15 +126,15 @@ Asset Proof in ScalarDL is a set of information about an asset record and used a
135
126
136
127
#### Benefits of Asset Proof
137
128
138
-
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.
129
+
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.
139
130
140
131
#### How to access Asset Proof from your applications
141
132
142
-
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.
133
+
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.
143
134
144
-
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.
135
+
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.
145
136
146
-
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.
137
+
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