Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alphanet-v5 #85

Closed
wants to merge 46 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1794e37
Update upstream twenty-first, triton-vm, tasm-lib
Sword-Smith Jan 6, 2024
ac66f62
Port storage-handling to latest upstream
Sword-Smith Jan 6, 2024
43fac86
Upddate benchmarking results after porting to TVM 0.36
Sword-Smith Jan 6, 2024
8d925bf
Add comment about why RPC server is started late in init process
Sword-Smith Jan 6, 2024
85f3a97
Speedup init wallet-DB completeness check
Sword-Smith Jan 7, 2024
bd9bf7a
Adjust some default startup CLI arguments
Sword-Smith Jan 7, 2024
0e3ffeb
Alow bigger peer messages
Sword-Smith Jan 7, 2024
2e6e304
Update RPC names
Sword-Smith Jan 7, 2024
b652e38
Update deprecated comment
Sword-Smith Jan 7, 2024
6db7427
Add endpoint to read own instance ID
Sword-Smith Jan 7, 2024
afd9114
Align neptune-cli with RPC server
Sword-Smith Jan 7, 2024
21e51f4
Add Makefile recipe `install-linux` to help Linux users
Sword-Smith Jan 7, 2024
f944692
Move logic for clearing peer sanctions from GlobalState to Networking…
Sword-Smith Jan 7, 2024
e4b65fb
Add RPC endpoint to list all peer sanctions
Sword-Smith Jan 7, 2024
0911639
Run tests serially when run through Makefile recipe
Sword-Smith Jan 7, 2024
db0c504
Use new batch getters and setters for MUTXOs in `prune_abandoned_moni…
Sword-Smith Jan 7, 2024
44eab59
Avoid reading current header from insider MUTXO method
Sword-Smith Jan 7, 2024
d6d5f9c
Add more instructions to bash-completions script
Sword-Smith Jan 7, 2024
864b5cc
Don't mark monitored UTXO as abandoned more than once
Sword-Smith Jan 7, 2024
35380e0
Remove dead storage-related code
Sword-Smith Jan 7, 2024
00968d8
Use batch-fetching for all MUTXOs when reading balance
Sword-Smith Jan 8, 2024
e50417c
Don't fetch entire block when digest will do
Sword-Smith Jan 9, 2024
b0fd413
Batch-get monitored UTXOs when calculating number of confirmations
Sword-Smith Jan 9, 2024
b61085f
Batch-fetch MUTXOs when generating balance history
Sword-Smith Jan 9, 2024
9e6975a
Make human-readable part of generation address more descriptive
Sword-Smith Jan 9, 2024
472c5b7
Add Windows installation instructions to README
Sword-Smith Jan 9, 2024
25eabc7
Batch-fetch MUTXOs when scanning for own UTXO-spends
Sword-Smith Jan 9, 2024
147fe91
Use batch-db fetching most places in wallet state's block-updater
Sword-Smith Jan 9, 2024
be8586f
Use batch-fetching for checking wallet sync status
Sword-Smith Jan 9, 2024
061f4e9
Improve log warning for MUTXOs without valid MPs
Sword-Smith Jan 10, 2024
f1484c5
improve installation instructions
aszepieniec Jan 10, 2024
7a59359
Update README.md
aszepieniec Jan 10, 2024
bcddf8f
Update README.md
aszepieniec Jan 10, 2024
c82059b
Update README.md
aszepieniec Jan 10, 2024
5bc5eb2
add seed phrase support (bip-39)
aszepieniec Jan 10, 2024
79c27e4
update readme instruction
aszepieniec Jan 10, 2024
6ac3c9a
pass network as command line argument to neptune-cli
aszepieniec Jan 10, 2024
36ca367
merge like logic in command types
aszepieniec Jan 10, 2024
cbbb015
drop obsoleted function
aszepieniec Jan 10, 2024
e905358
minor changes
aszepieniec Jan 10, 2024
e94f48c
Ensure RPC server does not crash on invalid `send` call
Sword-Smith Jan 11, 2024
a62ce4c
Speedup initial syncing by reducing timer from 10s to 3s
Sword-Smith Jan 11, 2024
0671f70
Version 0.0.5
Sword-Smith Jan 6, 2024
ca530cd
improve installation instructions: use terminal and install CMake
aszepieniec Jan 11, 2024
aaa8384
add command which-wallet
aszepieniec Jan 11, 2024
9cc4c9a
get command from arguments list
aszepieniec Jan 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
409 changes: 325 additions & 84 deletions Cargo.lock

Large diffs are not rendered by default.

22 changes: 10 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Triton Software"]
edition = "2021"
name = "neptune-core"
version = "0.0.4"
version = "0.0.5"
default-run = "neptune-core"
publish = false

Expand All @@ -12,11 +12,12 @@ aes-gcm = "0"
anyhow = "1"
bech32 = "0"
bincode = "1"
tiny-bip39 = "1.0.0"
bytes = "1"
bytesize = "1"
chrono = "^0.4.31"
clap = { version = "4", features = ["derive"] }
clap_complete = "4.4.3"
clap_complete = "4.4.6"
console-subscriber = "0.2.0"
crossterm = "0"
directories = "5"
Expand All @@ -31,14 +32,14 @@ num-traits = "0"
priority-queue = "1"
rand = "0.8"
ratatui = "0.23"
rusty-leveldb = "3"
semver = "^1.0.20"
rs-leveldb = "0.1.5"
semver = "^1.0.21"
serde = { version = "1", features = ["derive"] }
serde_derive = "1"
serde_json = "1"
strum = { version = "0.25", features = ["derive"] }
tarpc = { version = "0", features = ["tokio1", "serde-transport", "tcp"] }
tasm-lib = { git = "https://github.com/TritonVM/tasm-lib.git", rev = "a0d7f2ef" }
tarpc = { version = "^0.34", features = ["tokio1", "serde-transport", "tcp"] }
tasm-lib = { git = "https://github.com/TritonVM/tasm-lib.git", rev = "20b7a7dc" }
tokio = { version = "1", features = ["full", "tracing"] }
tokio-serde = { version = "0", features = ["bincode", "json"] }
tokio-util = { version = "0", features = ["codec"] }
Expand All @@ -50,9 +51,10 @@ tracing-subscriber = { version = "0", features = [
"fmt",
] }
tracing-test = "0"
triton-vm = "0.35"
twenty-first = "0.34"
triton-vm = "0.36"
twenty-first = "0.36"
unicode-width = "0"
zeroize = "1.7.0"

[dev-dependencies]
pin-project-lite = "0.2.13"
Expand Down Expand Up @@ -85,7 +87,3 @@ opt-level = 3
# incremental = true
# codegen-units = 256
# rpath = false

[patch.crates-io]
# needed until 0.35.0 is released.
twenty-first = { git = "https://github.com/Neptune-Crypto/twenty-first.git", rev = "e0cf7e64" }
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ ctags:
format:
cargo fmt --all --check

install:
cp target/$(target)/$(prog) ~/bin/$(prog)$(extension)
install-linux:
cargo install --path .
@echo "\n\nPlease run:\n./scripts/linux/install-bash-completions.sh\nto install bash-completions for Neptune-core's CLI."

lint:
cargo clippy --all-targets
Expand All @@ -55,7 +56,7 @@ run:
test: export RUST_BACKTRACE = 1
test:
$(info RUSTFLAGS is $(RUSTFLAGS))
cargo test
cargo test -- --test-threads=1

bench:
$(info RUSTFLAGS is $(RUSTFLAGS))
Expand Down
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,34 @@

Neptune-core is the reference implementation for the [Neptune](https://neptune.cash/) protocol. The implementation is not complete yet, but already supports many integral components. In particular, alpha-net is live.

## Compiling from Source
## Installing

### Linux Debian/Ubuntu
### Compile from Source -- Linux Debian/Ubuntu

- Install curl: `apt install curl`
- Install the rust compiler and accessories: `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
- Source the rust environment: `source $HOME/.cargo/env`
- Install LebelDB: `apt install libleveldb-dev libsnappy-dev cmake`
- Open a terminal to run the following commands.
- Install curl: `sudo apt install curl`
- Install the rust compiler and accessories: `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y`
- Source the rust environment: `source "$HOME/.cargo/env"`
- Install LebelDB: `sudo apt install libleveldb-dev libsnappy-dev cmake`
- Download the repository: `git clone https://github.com/Neptune-Crypto/neptune-core.git`
- Enter the repository: `cd neptune-core`
- Build for release and put the binaries in your local path (`~/.cargo/bin/`): `cargo install --path .` (needs at least 3 GB of RAM)
- Build for release and put the binaries in your local path (`~/.cargo/bin/`): `cargo install --path .` (needs at least 3 GB of RAM and a few minutes)

### Windows

To install Rust and cargo on Windows, you can follow [these instructions](https://doc.rust-lang.org/cargo/getting-started/installation.html).
Installing cargo might require you to install Visual Studio with some C++ support but the cargo installer for Windows should handle that.
With a functioning version of cargo, compilation on Windows should just work out-of-the-box with cargo build etc.
- Download and run the CMake installer from the [website](https://cmake.org/download/).
- Open PowerShell to run the following commands.
- Download the repository: `git clone https://github.com/Neptune-Crypto/neptune-core.git`
- Enter the repository: `cd neptune-core`
- Run `cargo install --path .`


## Running & Connecting

- Generate a wallet file: `neptune-wallet-gen`
- Generate a wallet file: `neptune-cli generate-wallet`
- Run neptune-core daemon: `neptune-core` with flags
- `--peers [ip_address:port]` to connect to a given peer, for instance `--peers 51.15.139.238:9798` or `--peers 139.162.193.206:9798` or both
- `--mine` to mine — if you want to generate testnet coins to test sending and receiving
Expand Down
8 changes: 4 additions & 4 deletions benchmarks/tasm_neptune_transaction_compute_commitment.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[
{
"name": "tasm_neptune_transaction_compute_commitment",
"clock_cycle_count": 114,
"hash_table_height": 18,
"clock_cycle_count": 95,
"hash_table_height": 114,
"u32_table_height": 0,
"case": "CommonCase"
},
{
"name": "tasm_neptune_transaction_compute_commitment",
"clock_cycle_count": 114,
"hash_table_height": 18,
"clock_cycle_count": 95,
"hash_table_height": 114,
"u32_table_height": 0,
"case": "WorstCase"
}
Expand Down
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": 5933,
"hash_table_height": 0,
"u32_table_height": 4386,
"clock_cycle_count": 5367,
"hash_table_height": 607,
"u32_table_height": 4378,
"case": "CommonCase"
},
{
"name": "tasm_neptune_transaction_compute_indices",
"clock_cycle_count": 5933,
"hash_table_height": 0,
"u32_table_height": 4522,
"clock_cycle_count": 5367,
"hash_table_height": 607,
"u32_table_height": 4514,
"case": "WorstCase"
}
]
12 changes: 6 additions & 6 deletions benchmarks/tasm_neptune_transaction_hash_index_list.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[
{
"name": "tasm_neptune_transaction_hash_index_list",
"clock_cycle_count": 1307,
"hash_table_height": 0,
"u32_table_height": 145,
"clock_cycle_count": 390,
"hash_table_height": 217,
"u32_table_height": 14,
"case": "CommonCase"
},
{
"name": "tasm_neptune_transaction_hash_index_list",
"clock_cycle_count": 5275,
"hash_table_height": 0,
"u32_table_height": 787,
"clock_cycle_count": 1134,
"hash_table_height": 589,
"u32_table_height": 16,
"case": "WorstCase"
}
]
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[
{
"name": "tasm_neptune_transaction_hash_removal_record_indices",
"clock_cycle_count": 1301,
"hash_table_height": 0,
"u32_table_height": 145,
"clock_cycle_count": 392,
"hash_table_height": 223,
"u32_table_height": 14,
"case": "CommonCase"
},
{
"name": "tasm_neptune_transaction_hash_removal_record_indices",
"clock_cycle_count": 1301,
"hash_table_height": 0,
"u32_table_height": 145,
"clock_cycle_count": 392,
"hash_table_height": 223,
"u32_table_height": 14,
"case": "WorstCase"
}
]
8 changes: 4 additions & 4 deletions benchmarks/tasm_neptune_transaction_hash_utxo.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[
{
"name": "tasm_neptune_transaction_hash_utxo",
"clock_cycle_count": 273,
"hash_table_height": 0,
"clock_cycle_count": 168,
"hash_table_height": 115,
"u32_table_height": 11,
"case": "CommonCase"
},
{
"name": "tasm_neptune_transaction_hash_utxo",
"clock_cycle_count": 273,
"hash_table_height": 0,
"clock_cycle_count": 168,
"hash_table_height": 115,
"u32_table_height": 11,
"case": "WorstCase"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[
{
"name": "tasm_neptune_transaction_removal_records_integrity",
"clock_cycle_count": 52898,
"hash_table_height": 5489,
"u32_table_height": 16198,
"clock_cycle_count": 29578,
"hash_table_height": 5615,
"u32_table_height": 13250,
"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": 35160,
"hash_table_height": 42,
"u32_table_height": 6361,
"clock_cycle_count": 7822,
"hash_table_height": 3631,
"u32_table_height": 74,
"case": "CommonCase"
},
{
"name": "tasm_neptune_transaction_transaction_kernel_mast_hash",
"clock_cycle_count": 38774,
"hash_table_height": 42,
"u32_table_height": 7162,
"clock_cycle_count": 8484,
"hash_table_height": 3967,
"u32_table_height": 74,
"case": "WorstCase"
}
]
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[
{
"name": "tasm_neptune_transaction_verify_aocl_membership",
"clock_cycle_count": 849,
"hash_table_height": 36,
"clock_cycle_count": 682,
"hash_table_height": 366,
"u32_table_height": 112,
"case": "CommonCase"
},
{
"name": "tasm_neptune_transaction_verify_aocl_membership",
"clock_cycle_count": 834,
"hash_table_height": 36,
"clock_cycle_count": 667,
"hash_table_height": 366,
"u32_table_height": 116,
"case": "WorstCase"
}
Expand Down
Loading
Loading