Skip to content

Commit a3575f8

Browse files
Merge pull request #325 from dashpay/develop
1.0.0
2 parents d4e550d + f028ddb commit a3575f8

File tree

19 files changed

+539
-109
lines changed

19 files changed

+539
-109
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,6 @@ From here we can build:
237237
There is a work in progress implementation of a debugger layer for GroveDB. To use this library with
238238
these capabilities enabled one needs to set a dependency with `grovedbg` feature.
239239

240-
At build time this requires two environment dependencies:
241-
1. `wasm32-unknown-unknown` Rust toolchain;
242-
2. [trunk](https://trunkrs.dev/) utility.
243-
244240
Then, to launch visualizer tool to observe the database structure inside of your browser on a port,
245241
let's say 10000, the following snippet should do:
246242

costs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "grovedb-costs"
3-
version = "1.0.0-rc.2"
3+
version = "1.0.0"
44
edition = "2021"
55
license = "MIT"
66
description = "Costs extension crate for GroveDB"

grovedb-version/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
name = "grovedb-version"
33
authors = ["Samuel Westrich <sam@dash.org>"]
44
description = "Versioning library for Platform"
5-
version = "1.0.0-rc.2"
5+
version = "1.0.0"
66
edition = "2021"
77
license = "MIT"
88

99
[dependencies]
10-
thiserror = { version = "1.0.59" }
11-
versioned-feature-core = { git = "https://github.com/dashpay/versioned-feature-core", version = "1.0.0" }
10+
thiserror = "1.0.59"
11+
versioned-feature-core = "1.0.0"
1212

1313
[features]
1414
mock-versions = []

grovedb/Cargo.toml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "grovedb"
33
description = "Fully featured database using balanced hierarchical authenticated data structures"
4-
version = "1.0.0-rc.2"
4+
version = "1.0.0"
55
authors = ["Samuel Westrich <sam@dash.org>", "Wisdom Ogwu <wisdom@dash.org", "Evgeny Fomin <evgeny.fomin@dash.org>"]
66
edition = "2021"
77
license = "MIT"
@@ -11,29 +11,29 @@ readme = "../README.md"
1111
documentation = "https://docs.rs/grovedb"
1212

1313
[dependencies]
14-
grovedb-merk = { version = "1.0.0-rc.2", path = "../merk", optional = true, default-features = false }
14+
grovedb-merk = { version = "1.0.0", path = "../merk", optional = true, default-features = false }
1515
thiserror = { version = "1.0.59", optional = true }
1616
tempfile = { version = "3.10.1", optional = true }
1717
bincode = { version = "2.0.0-rc.3" }
18-
grovedb-storage = { version = "1.0.0-rc.2", path = "../storage", optional = true }
19-
grovedb-visualize = { version = "1.0.0-rc.2", path = "../visualize", optional = true }
20-
hex = { version = "0.4.3"}
18+
grovedb-storage = { version = "1.0.0", path = "../storage", optional = true }
19+
grovedb-visualize = { version = "1.0.0", path = "../visualize", optional = true }
20+
hex = "0.4.3"
2121
itertools = { version = "0.12.1", optional = true }
22-
derive_more = { version = "0.99.18" }
22+
derive_more = "0.99.18"
2323
integer-encoding = { version = "4.0.0", optional = true }
24-
grovedb-costs = { version = "1.0.0-rc.2", path = "../costs", optional = true }
24+
grovedb-costs = { version = "1.0.0", path = "../costs", optional = true }
2525
nohash-hasher = { version = "0.2.0", optional = true }
26-
indexmap = { version = "2.2.6"}
26+
indexmap = "2.2.6"
2727
intmap = { version = "2.0.0", optional = true }
28-
grovedb-path = { version = "1.0.0-rc.2", path = "../path" }
29-
grovedbg-types = { version = "1.0.0-rc.2", path = "../grovedbg-types", optional = true }
28+
grovedb-path = { version = "1.0.0", path = "../path" }
29+
grovedbg-types = { version = "1.0.0", path = "../grovedbg-types", optional = true }
3030
tokio = { version = "1.37.0", features = ["rt-multi-thread", "net"], optional = true }
3131
axum = { version = "0.7.5", features = ["macros"], optional = true }
3232
tower-http = { version = "0.5.2", features = ["fs"], optional = true }
3333
blake3 = "1.4.0"
3434
bitvec = "1"
3535
zip-extensions = { version ="0.6.2", optional = true }
36-
grovedb-version = { version = "1.0.0-rc.2", path = "../grovedb-version" }
36+
grovedb-version = { path = "../grovedb-version", version = "1.0.0" }
3737

3838
[dev-dependencies]
3939
rand = "0.8.5"
@@ -82,4 +82,6 @@ grovedbg = [
8282
]
8383

8484
[build-dependencies]
85-
zip-extensions = "0.6.2"
85+
hex-literal = "0.4.1"
86+
reqwest = { version = "0.12.5", features = ["blocking"] }
87+
sha2 = "0.10.8"

grovedb/build.rs

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
11
#[cfg(feature = "grovedbg")]
22
fn main() {
3-
use std::{
4-
env,
5-
path::PathBuf,
6-
process::{Command, ExitStatus, Output},
7-
};
3+
use std::{env, fs::File, io::Cursor, path::PathBuf};
4+
5+
use hex_literal::hex;
6+
use sha2::{digest::FixedOutput, Digest, Sha256};
7+
8+
const GROVEDBG_SHA256: [u8; 32] =
9+
hex!("c6636f10b43c703128b621a7c4b94139a1a7d0a603e26fca1771734a7994bb7c");
10+
const GROVEDBG_VERSION: &str = "v1.0.0-rc.5";
811

912
let out_dir = PathBuf::from(&env::var_os("OUT_DIR").unwrap());
13+
let grovedbg_zip_path = out_dir.join("grovedbg.zip");
14+
15+
if !grovedbg_zip_path.exists() {
16+
let response = reqwest::blocking::get(format!("https://github.com/dashpay/grovedbg/releases/download/{GROVEDBG_VERSION}/grovedbg-{GROVEDBG_VERSION}.zip"))
17+
.expect("can't download GroveDBG artifact");
1018

11-
let Output {
12-
status,
13-
stdout,
14-
stderr,
15-
} = Command::new("trunk")
16-
.arg("build")
17-
.arg("--release")
18-
.arg("--dist")
19-
.arg(&out_dir)
20-
.arg("grovedbg/index.html")
21-
.output()
22-
.expect("cannot start trunk process");
23-
24-
if !status.success() {
25-
let stdout_msg = String::from_utf8_lossy(&stdout);
26-
let stderr_msg = String::from_utf8_lossy(&stderr);
27-
let bindgen_version = env::var_os("TRUNK_TOOLS_WASM_BINDGEN").unwrap_or_default();
28-
panic!("Error running `trunk build --release`\nbindgen version:{bindgen_version:?}\n{stdout_msg}\n{stderr_msg}");
19+
let mut grovedbg_zip = File::create(&grovedbg_zip_path).unwrap();
20+
let mut content = Cursor::new(response.bytes().unwrap());
21+
std::io::copy(&mut content, &mut grovedbg_zip).unwrap();
2922
}
3023

31-
let zip_file = out_dir.join("grovedbg.zip");
32-
zip_extensions::write::zip_create_from_directory(&zip_file, &out_dir)
33-
.expect("can't create a grovedbg zip archive");
24+
let mut grovedbg_zip = File::open(&grovedbg_zip_path).unwrap();
25+
26+
let mut sha256 = Sha256::new();
27+
std::io::copy(&mut grovedbg_zip, &mut sha256).unwrap();
28+
let hash = sha256.finalize_fixed();
29+
30+
assert_eq!(hash.as_slice(), GROVEDBG_SHA256);
3431
}
3532

3633
#[cfg(not(feature = "grovedbg"))]

grovedb/grovedbg

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)