Skip to content

Commit

Permalink
Merge pull request #114 from Neptune-Crypto/aszepieniec/amounts
Browse files Browse the repository at this point in the history
feat: Amounts

 - Implement (in compiler-friendly rust) a type script `NativeCurrency`
   that verifies that transactions are balanced, *i.e.*, do not generate
   new coins or have negative outputs.
 - Upgrades the dependency on `tasm-lib`.
 - Simplifies the internal representation of `NeptuneCoins` amounts:
   it now uses a `u128` rather than a `U32s<NUM_LIMBS>`.
  • Loading branch information
aszepieniec authored Mar 8, 2024
2 parents 4fac1cf + f7206db commit e6a1270
Show file tree
Hide file tree
Showing 28 changed files with 1,788 additions and 1,526 deletions.
46 changes: 35 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,7 @@ opt-level = 0
# rpath = false

[patch.crates-io]
# rev = "f711ae27d1402d733989624bbadd59b7e82a1972" is tip of tasm-lib master as of 2024-01-25
tasm-lib = { git = "https://github.com/TritonVM/tasm-lib.git", rev = "f711ae27d1402d733989624bbadd59b7e82a1972" }
# # rev = "f711ae27d1402d733989624bbadd59b7e82a1972" is tip of tasm-lib master as of 2024-01-25
# tasm-lib = { git = "https://github.com/TritonVM/tasm-lib.git", rev = "f711ae27d1402d733989624bbadd59b7e82a1972" }
# rev = "928b1fa7522aacdb055c4c04d144b44af241f2e6" is tip of tasm-lib master as of 2024-02-27
tasm-lib = { git = "https://github.com/TritonVM/tasm-lib.git", rev = "928b1fa7522aacdb055c4c04d144b44af241f2e6" }
12 changes: 6 additions & 6 deletions benchmarks/tasm_neptune_transaction_compute_indices.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[
{
"name": "tasm_neptune_transaction_compute_indices",
"clock_cycle_count": 5375,
"hash_table_height": 607,
"u32_table_height": 4378,
"clock_cycle_count": 5570,
"hash_table_height": 601,
"u32_table_height": 4604,
"case": "CommonCase"
},
{
"name": "tasm_neptune_transaction_compute_indices",
"clock_cycle_count": 5375,
"hash_table_height": 607,
"u32_table_height": 4514,
"clock_cycle_count": 5570,
"hash_table_height": 601,
"u32_table_height": 4740,
"case": "WorstCase"
}
]
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[
{
"name": "tasm_neptune_transaction_removal_records_integrity",
"clock_cycle_count": 29649,
"hash_table_height": 5633,
"u32_table_height": 13250,
"clock_cycle_count": 30848,
"hash_table_height": 5621,
"u32_table_height": 13828,
"case": "CommonCase"
}
]
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[
{
"name": "tasm_neptune_transaction_transaction_kernel_mast_hash",
"clock_cycle_count": 7758,
"hash_table_height": 3607,
"u32_table_height": 73,
"clock_cycle_count": 7819,
"hash_table_height": 3601,
"u32_table_height": 159,
"case": "CommonCase"
},
{
"name": "tasm_neptune_transaction_transaction_kernel_mast_hash",
"clock_cycle_count": 8490,
"hash_table_height": 3973,
"u32_table_height": 74,
"clock_cycle_count": 8551,
"hash_table_height": 3967,
"u32_table_height": 160,
"case": "WorstCase"
}
]
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[
{
"name": "tasm_neptune_transaction_verify_aocl_membership",
"clock_cycle_count": 682,
"clock_cycle_count": 717,
"hash_table_height": 366,
"u32_table_height": 112,
"u32_table_height": 144,
"case": "CommonCase"
},
{
"name": "tasm_neptune_transaction_verify_aocl_membership",
"clock_cycle_count": 667,
"clock_cycle_count": 702,
"hash_table_height": 366,
"u32_table_height": 116,
"u32_table_height": 148,
"case": "WorstCase"
}
]
Loading

0 comments on commit e6a1270

Please sign in to comment.