forked from MystenLabs/dapol
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust the API to read better, and improve some of the top code heira…
…rchy (#148)
- Loading branch information
Showing
52 changed files
with
2,038 additions
and
1,391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# There are various different accumulator types (e.g. NDM-SMT). | ||
# | ||
# This value must be set. | ||
accumulator_type = "ndm-smt" | ||
|
||
# This is a public value that is used to aid the KDF when generating secret | ||
# blinding factors for the Pedersen commitments. | ||
# | ||
# If it is not set then it will be randomly generated. | ||
salt_b = "salt_b" | ||
|
||
# This is a public value that is used to aid the KDF when generating secret | ||
# salt values, which are in turn used in the hash function when generating | ||
# node hashes. | ||
# | ||
# If it is not set then it will be randomly generated. | ||
salt_s = "salt_s" | ||
|
||
# Height of the tree. | ||
# | ||
# If not set the default height will be used: | ||
# `dapol::Height::default()`. | ||
height = 16 | ||
|
||
# This is a public value representing the maximum amount that any single | ||
# entity's liability can be, and is used in the range proofs: | ||
# $[0, 2^{\text{height}} \times \text{max_liability}]$ | ||
# | ||
# If not set then the default value will be used: | ||
# `2.pow(dapol::DEFAULT_RANGE_PROOF_UPPER_BOUND_BIT_LENGTH)`. | ||
max_liability = 10_000_000 | ||
|
||
# Max number of threads to be spawned for multi-threading algorithms. | ||
# | ||
# If not set the max parallelism of the underlying machine will be used. | ||
max_thread_count = 8 | ||
|
||
# Can be a file or directory (default file name given in this case) | ||
# | ||
# If not set then no serialization is done. | ||
serialization_path = "./tree.dapoltree" | ||
|
||
# At least one of file_path or generate_random must be present. | ||
# | ||
# If both are given then file_path is preferred and generate_random is ignored. | ||
[entities] | ||
|
||
# Path to a file containing a list of entity IDs and their liabilities. | ||
file_path = "./entities_example.csv" | ||
|
||
# Generate the given number of entities, with random IDs & liabilities. | ||
# This is useful for testing. | ||
num_random_entities= 100 | ||
|
||
# At least on of file_path or master_secret must be present. | ||
# The master secret is known only to the tree generator and is used to | ||
# generate all other secret values required by the tree. | ||
# | ||
# If both are given then file_path is preferred and master_secret is ignored. | ||
[secrets] | ||
|
||
# Path to a file containing a list of entity IDs and their liabilities. | ||
file_path = "./dapol_secrets_example.toml" | ||
|
||
# String value of the master secret. | ||
master_secret = "master_secret" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
master_secret = "master_secret" |
Oops, something went wrong.