Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
f8eff73
scaffold comrade & component
DougAnderson444 May 3, 2025
39559f7
add parser
DougAnderson444 May 4, 2025
85d94ba
eval script test passing
DougAnderson444 May 4, 2025
8ae49f0
fix comments
DougAnderson444 May 4, 2025
32f382a
fixup comments
DougAnderson444 May 4, 2025
5a58574
cleanup
DougAnderson444 May 4, 2025
cfa6f97
fix bug in lock/unlock curr/proposed stack push
DougAnderson444 May 4, 2025
6ad18d2
rename crypto to reference
DougAnderson444 May 4, 2025
664a84d
add wasm component
DougAnderson444 May 4, 2025
6fc829c
cleanup
DougAnderson444 May 4, 2025
9ca8903
WIP: Start to scaffold the main API
DougAnderson444 May 8, 2025
aeecb58
nice clean api
DougAnderson444 May 8, 2025
9d2f295
add rustdoc comments
DougAnderson444 May 8, 2025
023bb63
scaffold virtual runtime
DougAnderson444 May 8, 2025
c1b49bf
rename vm -> runtime
DougAnderson444 May 8, 2025
1c8a852
haul in deps for wasm runtime
DougAnderson444 May 8, 2025
5ff10c8
makeruntimes optional and extensible
DougAnderson444 May 9, 2025
a0dbb77
add runtime trait and Runner bounds
DougAnderson444 May 9, 2025
1a7edd0
fix typo
DougAnderson444 May 9, 2025
a35d0b4
scaffold build bytes and justfile recipes
DougAnderson444 May 9, 2025
ddec8dd
set wasmi_runtime_layer to v0.40
DougAnderson444 May 9, 2025
a8b415f
add wasm32 build, test, just recipes
DougAnderson444 May 9, 2025
329359e
random module is for wasm32 only
DougAnderson444 May 9, 2025
d589f0d
add layer definitions
DougAnderson444 May 9, 2025
a1b21a1
use Pairable supertrait
DougAnderson444 May 9, 2025
1ec524e
tested logs
DougAnderson444 May 9, 2025
5440039
impl try_unlock
DougAnderson444 May 9, 2025
05256aa
more tests
DougAnderson444 May 9, 2025
0b6a1f1
test passing!
DougAnderson444 May 9, 2025
0a6cc28
add readme rustdoc tests
DougAnderson444 May 9, 2025
4f0263f
small fixes
DougAnderson444 May 10, 2025
8fae6e5
add direct runtime
DougAnderson444 May 10, 2025
9c04122
switch to direct runtime as default
DougAnderson444 May 10, 2025
cf20a8b
web tests
DougAnderson444 May 10, 2025
1766174
rm dead code
DougAnderson444 May 10, 2025
021e701
use CondSync
DougAnderson444 May 10, 2025
9c619ae
comrade use Pairs only
DougAnderson444 May 12, 2025
006f694
mk comrade worspace dep
DougAnderson444 May 12, 2025
e1cea03
update lifetime
DougAnderson444 May 12, 2025
7e7dee5
fix missing dep (again)
DougAnderson444 May 12, 2025
35dfacd
update trait to incl Error too
DougAnderson444 May 12, 2025
55664cc
update plog and open
DougAnderson444 May 12, 2025
7d6914f
haul in bs-p2p
DougAnderson444 May 12, 2025
4da17d1
use RPITIT instead of async_trait
DougAnderson444 May 12, 2025
fb8a462
use Self::Error assoc type in traits
DougAnderson444 May 12, 2025
3b79da9
add cond_send for wasm32 and native compat
DougAnderson444 May 12, 2025
ccac040
constraint data references by (Cond)Sync bounds
DougAnderson444 May 12, 2025
ad0d902
elide lifetimes where poss, add Panics comments to uncheched fns
DougAnderson444 May 12, 2025
7bd77a8
rm workspace dep with js feat
DougAnderson444 May 13, 2025
b1513a4
trait, associate types, sync and async
DougAnderson444 May 13, 2025
a5f8911
add `with_domain` for non-"/" paths
DougAnderson444 May 13, 2025
7a5a3ff
readme edits
DougAnderson444 May 13, 2025
464d280
add readme
DougAnderson444 May 13, 2025
2c1b3a3
readme
DougAnderson444 May 13, 2025
3df3ccf
use shiny new traits in bs and cli
DougAnderson444 May 14, 2025
a388363
READMEs (plural)
DougAnderson444 May 14, 2025
b1aeac3
README
DougAnderson444 May 14, 2025
f98881a
map_err
DougAnderson444 May 14, 2025
c4767b3
use set_error method
DougAnderson444 May 14, 2025
6ad949b
WIP: Stash
DougAnderson444 May 15, 2025
5649be3
add prev_cid to VerifyIter
DougAnderson444 May 15, 2025
81b2c99
fix comments
DougAnderson444 May 15, 2025
1cafb6d
Merge branch 'doug/comrade' into doug/bs-p2p
DougAnderson444 May 15, 2025
0fda2d7
first pass (incomplete)
DougAnderson444 May 27, 2025
a3a8407
add wallet with updated traits
DougAnderson444 May 28, 2025
1171258
update deps
DougAnderson444 May 28, 2025
7cafc89
fix content-addressable errors and tests
DougAnderson444 May 28, 2025
08c032b
immutable trait
DougAnderson444 May 28, 2025
06eeb05
use wallet in browser peer
DougAnderson444 May 28, 2025
bcf2b3f
fix Error types in trait and tests
DougAnderson444 May 28, 2025
9abc295
add README note for running tests
DougAnderson444 May 28, 2025
7584d57
fix Codec
DougAnderson444 May 28, 2025
1522d8d
fix the fix
DougAnderson444 May 28, 2025
028b3bc
add entry_key mod
DougAnderson444 May 29, 2025
5e5a194
fix bug in verifyiter
DougAnderson444 May 29, 2025
7e4acec
add failing comrade tests
DougAnderson444 May 29, 2025
91fb667
upraded, passing tests
DougAnderson444 May 29, 2025
279b109
cleanup
DougAnderson444 May 29, 2025
c1be249
store BsPeer config to blockstore
DougAnderson444 May 29, 2025
8d60059
add tests to update_plog
DougAnderson444 May 29, 2025
478468b
update cli plog
DougAnderson444 May 29, 2025
4d954b5
use directories for blockstore
DougAnderson444 May 29, 2025
69fba04
save arbitrary data to log and blockstore
DougAnderson444 May 29, 2025
20ca4bf
add cargo config.toml
DougAnderson444 May 30, 2025
8f3faf7
add vlad.cid() method
DougAnderson444 May 30, 2025
5a5beb8
store plog entries to blockstore
DougAnderson444 May 30, 2025
d3eda9d
use test fixtures
DougAnderson444 May 30, 2025
7a6b091
evolve key, keypath and signing traits
DougAnderson444 May 31, 2025
fab95fc
tidy up
DougAnderson444 Jun 1, 2025
067db50
add dep
DougAnderson444 Jun 1, 2025
706cc7e
use NonZeroUsize for threshold and limit, plus general update
DougAnderson444 Jun 1, 2025
a396518
progress VladParams
DougAnderson444 Jun 1, 2025
850e045
modernize VladParams API
DougAnderson444 Jun 1, 2025
5760c4b
rn, mv, tightly couple FirstEntryKeyParams to Vlad
DougAnderson444 Jun 1, 2025
15169cb
refactor open::Config
DougAnderson444 Jun 1, 2025
20a135c
update cli and docs
DougAnderson444 Jun 1, 2025
8bfb412
refactor update::Config
DougAnderson444 Jun 1, 2025
3e04125
derive first lock script from within Vlad
DougAnderson444 Jun 1, 2025
0564fe1
web tests
DougAnderson444 Jun 1, 2025
c2a5d25
add update and load tests
DougAnderson444 Jun 1, 2025
59fa158
add network to bs-peer
DougAnderson444 Jun 2, 2025
39dc8fa
add resolver and interop test
DougAnderson444 Jun 3, 2025
d085d8e
progress tests
DougAnderson444 Jun 3, 2025
60d802c
passing interop tests
DougAnderson444 Jun 4, 2025
c9fd373
revamp Resolver trait
DougAnderson444 Jun 4, 2025
8caaf8d
use ResolverExt in bs crate
DougAnderson444 Jun 6, 2025
904a5ab
complete rustdoc para
DougAnderson444 Jun 12, 2025
8775f50
add log detail
DougAnderson444 Jun 16, 2025
97cce6b
add error details
DougAnderson444 Jun 16, 2025
23b26f7
plog get_value includes ops
DougAnderson444 Jun 16, 2025
3cf621a
improve native test
DougAnderson444 Jun 16, 2025
9ec5ba5
downgrade trace
DougAnderson444 Jun 16, 2025
ffec05c
add test README details
DougAnderson444 Jun 16, 2025
f36ee67
add more docs
DougAnderson444 Jun 16, 2025
8109ed7
export DefaultBsPeer
DougAnderson444 Jun 16, 2025
c4c14ca
export bs_peer utils
DougAnderson444 Jun 16, 2025
48061b3
impl Display for Vlad
DougAnderson444 Jun 16, 2025
54382bb
save swarm config to directories
DougAnderson444 Jun 21, 2025
8adebf7
re-exports
DougAnderson444 Jun 21, 2025
de4ec02
log runtime errors
DougAnderson444 Jun 22, 2025
41d275b
rename from peerpiper to bettersign
DougAnderson444 Jun 23, 2025
cebad02
export Client
DougAnderson444 Jun 23, 2025
6ed6862
scaffold bs-server
DougAnderson444 Jun 23, 2025
dbf143d
record plog to DHT
DougAnderson444 Jun 23, 2025
86b96c5
error is not connected and trying to DHT publish
DougAnderson444 Jun 23, 2025
19a13f8
convert Entry to use bon builder, add rustdocs
DougAnderson444 Jun 24, 2025
260f35f
update checks seqno for lipmaa and sets accordingly
DougAnderson444 Jun 24, 2025
0ce29a4
move entry as it gets signed
DougAnderson444 Jun 24, 2025
dc3b89e
no more cloning
DougAnderson444 Jun 24, 2025
1252472
update tests
DougAnderson444 Jun 24, 2025
2ede1eb
add justfile for chromedriver download
DougAnderson444 Jun 24, 2025
8c6e426
new Vlad generate API
DougAnderson444 Jun 27, 2025
361cd99
add Vlad::try_from_str
DougAnderson444 Jun 28, 2025
c414318
Nonce creation methods
DougAnderson444 Jun 28, 2025
b44592b
better rustdocs
DougAnderson444 Jun 28, 2025
fbfdbe9
re-export ResolverExt
DougAnderson444 Jun 29, 2025
43116af
mv Resolver to network client
DougAnderson444 Jun 29, 2025
515a60f
docs
DougAnderson444 Jun 29, 2025
759f509
add PartialEq
DougAnderson444 Jun 29, 2025
faab043
make public fn
DougAnderson444 Jun 29, 2025
28422aa
impl Clone for BsPeer
DougAnderson444 Jun 29, 2025
b59347b
entry signing key methods
DougAnderson444 Jun 29, 2025
c924dbd
wrap plog on Arc Mutex
DougAnderson444 Jun 30, 2025
341e92e
shorter lock hold in block
DougAnderson444 Jun 30, 2025
3211621
fix tests (deadlock)
DougAnderson444 Jul 1, 2025
1e74b99
enable StartConfig
DougAnderson444 Jul 1, 2025
18a6f85
derive Hash on types
DougAnderson444 Jul 1, 2025
d4d52bc
export Libp2pEvents
DougAnderson444 Jul 1, 2025
42f39c4
entrie vlad goes in DHT as bytes
DougAnderson444 Jul 1, 2025
b7c7af9
add tracing
DougAnderson444 Jul 1, 2025
41e5f47
add timeout, SuperResolver supertrait for CondSend
DougAnderson444 Jul 1, 2025
f86fcea
rm unneeded lock
DougAnderson444 Jul 2, 2025
fe3622c
store entries on update
DougAnderson444 Jul 2, 2025
d0b516f
cleanup deps
DougAnderson444 Jul 5, 2025
8831e1a
updated API and tests
DougAnderson444 Jul 5, 2025
d0b5f4a
add ability to rotate keys
DougAnderson444 Jul 5, 2025
89fc9b6
publish to pubsub too
DougAnderson444 Jul 5, 2025
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
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.wasm32-unknown-unknown]
rustflags = ["--cfg", "getrandom_backend=\"wasm_js\""]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Cargo.lock
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
.idea/
crates/bs-p2p/local_keypair
44 changes: 35 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ members = [
"crates/bs",
"crates/bs-p2p",
"crates/bs-traits",
"crates/comrade",
"crates/comrade-component",
"crates/comrade-reference",
"crates/bs-p2p",
"crates/content-addressable",
"crates/multibase",
"crates/multicid",
Expand All @@ -17,13 +21,19 @@ members = [
"crates/multiutil",
"crates/provenance-log",
"crates/rng",
"crates/wacc",
"crates/bs-peer",
"crates/interop-tests",
"crates/bs-wallets",
"crates/bs-server",
]

[workspace.package]
version = "1.0.0"
edition = "2021"
authors = ["Dave Grantham <[email protected]>"]
authors = [
"Dave Grantham <[email protected]>",
"Doug Anderson <[email protected]>",
]
description = "The BetterSign Provenance-Based Identity Solution"
readme = "README.md"
license = "FSL-1.1 OR Apache-2.0"
Expand All @@ -32,13 +42,17 @@ license = "FSL-1.1 OR Apache-2.0"
unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(feature, values("cargo-clippy"))',
'cfg(fuzzing)',
]}
] }

[workspace.dependencies]
# Crate ependencies
bs = { path = "crates/bs" }
bs-p2p = { path = "crates/bs-p2p" }
bs-peer = { path = "crates/bs-peer" }
bs-traits = { path = "crates/bs-traits" }
bs-wallets = { path = "crates/bs-wallets" }
comrade = { path = "crates/comrade" }
comrade-reference = { path = "crates/comrade-reference" }
multibase = { path = "crates/multibase" }
multicid = { path = "crates/multicid" }
multicodec = { path = "crates/multicodec" }
Expand All @@ -49,29 +63,41 @@ multitrait = { path = "crates/multitrait" }
multiutil = { path = "crates/multiutil" }
provenance-log = { path = "crates/provenance-log" }
rng = { path = "crates/rng" }
wacc = { path = "crates/wacc" }

# Core dependencies
best-practices = { version = "0.1.0", git = "https://github.com/cryptidtech/best-practices.git" }
blockstore = "0.7.1"
cid = "0.11.0"
criterion = "0.5.1"
elliptic-curve = "0.13.8"
hex = "0.4.3"
libp2p = { version = "0.54.1" }
multihash-codetable = { version = "0.1.4" }
rand = { version = "0.9.0", features = ["os_rng"] }
rand_core = "0.9.3"
rand_6 = { version = "0.6.4", package = "rand" }
rand_core_6 = { version = "0.6.4", package = "rand_core" }
serde = { version = "1.0.219", default-features = false, features = ["alloc", "derive"]}
serde_cbor = { version = "0.11.2", features = ["tags"]}
serde_json = { version = "1.0.104"}
serde_test = { version = "1.0.104"}
serde = { version = "1.0.219", default-features = false, features = [
"alloc",
"derive",
] }
serde_cbor = { version = "0.11.2", features = ["tags"] }
serde_json = { version = "1.0.104" }
serde_test = { version = "1.0.104" }
sha3 = "0.10.8"
test-log = { version = "0.2.17", features = ["trace", "color"] }
thiserror = "2.0.12"
tokio = { version = "1.44.2", features = ["fs", "io-util", "macros", "rt", "test-util"] }
tokio = { version = "1.44.2" }
tracing = "0.1.41"
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
unsigned-varint = { version = "0.8.0", features = ["std"] }
web-sys = { version = "0.3.77" }
wasm-bindgen-futures = "0.4.50"

[profile.bench]
opt-level = 3
debug = false

# until lands: https://github.com/libp2p/rust-libp2p/issues/5877
[patch.crates-io]
libp2p-webrtc-utils = { git = "https://github.com/DougAnderson444/rust-libp2p.git", branch = "core-v0.42-webrtc-utils-0.3.0" }
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@

[<img src="https://img.youtube.com/vi/LxU4wG4ryFo/hqdefault.jpg" width="100%" />](https://www.youtube.com/watch?v=LxU4wG4ryFo)

## Tests

Run the [just command](https://just.systems/man/en/) in the root of the repository to run the tests:

```
just test
```

## Introduction

BetterSign (`bs`) is a new signing tool designed to use provenance based
Expand Down
7 changes: 4 additions & 3 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ anyhow = "1.0"
async-trait = "0.1"
best-practices.workspace = true
bs.workspace = true
bs-traits.workspace = true
clap = { version = "4.5.36", features = ["cargo"] }
colored = "3.0.0"
csv = "1.3.1"
Expand All @@ -42,15 +43,15 @@ rustyline = { version = "15.0.0", features = ["derive"] }
serde = { workspace = true, optional = true }
serde_cbor.workspace = true
serde_json.workspace = true
ssh-key = { version = "0.6.2", features = ["crypto", "ed25519"]}
ssh-key = { version = "0.6.2", features = ["crypto", "ed25519"] }
ssh-agent-client-rs = "1.0.0"
structopt = "0.3.26"
thiserror.workspace = true
tokio = { version = "1.44.2", features = ["full"] }
tokio = { workspace = true, features = ["full"] }
toml = "0.8.20"
tracing.workspace = true
tracing-subscriber.workspace = true
wacc.workspace = true
comrade.workspace = true

[dev-dependencies]
tokio-test = "0.4.4"
19 changes: 19 additions & 0 deletions cli/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// SPDX-License-Identifier: FSL-1.1
use provenance_log::Key;

/// Errors generated from this crate
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
Expand Down Expand Up @@ -29,6 +31,15 @@ pub enum Error {
/// Bs errors
#[error(transparent)]
Bs(#[from] bs::Error),

/// Error opening a provenance log
#[error(transparent)]
Open(#[from] bs::error::OpenError),

/// Error updating a provenance log
#[error(transparent)]
Update(#[from] bs::error::UpdateError),

/// Multicid error
#[error(transparent)]
Multicid(#[from] multicid::Error),
Expand Down Expand Up @@ -98,6 +109,10 @@ pub enum Error {
/// Invalid backend type
#[error("Invalid backend type {0}")]
InvalidBackendType(String),

/// From<std::string::FromUtf8Error>
#[error(transparent)]
FromUtf8Error(#[from] std::string::FromUtf8Error),
}

/// SshAgent error
Expand Down Expand Up @@ -158,4 +173,8 @@ pub enum PlogError {
/// No string value given
#[error("No string value given")]
NoStringValue,

/// No key present for that KeyPath
#[error("No key present for that KeyPath {0}")]
NoKeyPresent(Key),
}
Loading