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

add support for persisting blocks #16

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
157 changes: 157 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'snapchain'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=snapchain"
],
"filter": {
"name": "snapchain",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'setup'",
"cargo": {
"args": [
"build",
"--bin=setup",
"--package=snapchain"
],
"filter": {
"name": "setup",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'setup'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=setup",
"--package=snapchain"
],
"filter": {
"name": "setup",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'snapchain'",
"cargo": {
"args": [
"build",
"--bin=snapchain",
"--package=snapchain"
],
"filter": {
"name": "snapchain",
"kind": "bin"
}
},
"args": ["--id", "1"],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'snapchain'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=snapchain",
"--package=snapchain"
],
"filter": {
"name": "snapchain",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'submit-message'",
"cargo": {
"args": [
"build",
"--bin=submit-message",
"--package=snapchain"
],
"filter": {
"name": "submit-message",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'submit-message'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=submit-message",
"--package=snapchain"
],
"filter": {
"name": "submit-message",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug integration test 'consensus_test'",
"cargo": {
"args": [
"test",
"--no-run",
"--test=consensus_test",
"--package=snapchain"
],
"filter": {
"name": "consensus_test",
"kind": "test"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ malachite-config = { path = "../malachite/code/crates/config" }
malachite-node = { path = "../malachite/code/crates/node" }
malachite-metrics = { path = "../malachite/code/crates/metrics" }
blake3 = "1.4.1"

tracing = "0.1.40"
thiserror = "1.0.66"
reqwest = { version = "0.12.9", features = ["json"] }
Expand All @@ -40,7 +39,8 @@ url = "2.5.3"
alloy-transport = "0.5.4"
alloy-sol-types = "0.8.11"
ed25519-dalek = "2.1.1"

rocksdb = {git = "https://github.com/rust-rocksdb/rust-rocksdb.git", features=["multi-threaded-cf"]}
walkdir = "2.5.0"

[build-dependencies]
tonic-build = "0.9.2"
Expand Down
2 changes: 2 additions & 0 deletions src/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub struct Config {
pub fnames: connectors::fname::Config,
pub onchain_events: connectors::onchain_events::Config,
pub consensus: consensus::consensus::Config,
pub rocksdb_dir: String,
}

impl Default for Config {
Expand All @@ -25,6 +26,7 @@ impl Default for Config {
fnames: connectors::fname::Config::default(),
onchain_events: connectors::onchain_events::Config::default(),
consensus: consensus::consensus::Config::default(),
rocksdb_dir: ".rocks".to_string(),
}
}
}
Expand Down
Loading