merge patches for release v0.2.0-beta-rc.1

This commit is contained in:
c2m 2024-09-29 21:31:52 -04:00
commit d32d3a0a5c
20 changed files with 107 additions and 18797 deletions

View file

@ -16,14 +16,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt install -y libssl-dev build-essential
run: sudo apt install -y libssl-dev build-essential gettext ant
- name: Extract branch name
shell: bash
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >>$GITHUB_OUTPUT
id: extract_branch
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'
- run: ./scripts/build_release.sh ${{ steps.extract_branch.outputs.branch }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: neveko-x86_64-linux-gnu-${{ steps.extract_branch.outputs.branch }}
path: neveko-x86_64-linux-gnu-${{ steps.extract_branch.outputs.branch }}.tar.bz2

1
.gitignore vendored
View file

@ -30,3 +30,4 @@ peerProfiles/*
opt-backup/j4-i2p-rs/jassets/addressbook.war
**/i2p/*
neveko-x86_64-linux-gnu-*
*.lock

4351
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -13,4 +13,4 @@ neveko_core = { path = "./neveko-core" }
neveko_gui = { path = "./neveko-gui" }
neveko_market = { path = "./neveko-market" }
neveko_message = { path = "./neveko-message" }
rocket = { version = "0.5.0-rc.3", features = ["json"] }
rocket = { version = "0.5.1", features = ["json"] }

2873
neveko-auth/Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -9,4 +9,4 @@ edition = "2021"
env_logger = "0.11.0"
neveko_core = { path = "../neveko-core" }
log = "0.4"
rocket = { version = "0.5.0-rc.3", features = ["json"] }
rocket = { version = "0.5.1", features = ["json"] }

2873
neveko-contact/Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -9,4 +9,4 @@ edition = "2021"
env_logger = "0.11.0"
neveko_core = { path = "../neveko-core" }
log = "0.4"
rocket = { version = "0.5.0-rc.3", features = ["json"] }
rocket = { version = "0.5.1", features = ["json"] }

2968
neveko-core/Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -23,7 +23,7 @@ num = "0.4.1"
rand = "0.8.5"
rand_core = "0.6.4"
reqwest = { version = "0.11.12", features = ["json"] }
rocket = { version = "0.5.0-rc.3", features = ["json"] }
rocket = { version = "0.5.1", features = ["json"] }
rpassword = "0.0.4"
schedule_recv = "0.1.0"
sha2 = "0.10.6"

View file

@ -251,7 +251,7 @@ impl<'r> FromRequest<'r> for BearerToken {
debug!("claim address: {}", claims["address"]);
// verify address
if claims["address"] != address {
return Outcome::Failure((
return Outcome::Error((
Status::Unauthorized,
BearerTokenError::Invalid,
));
@ -260,17 +260,17 @@ impl<'r> FromRequest<'r> for BearerToken {
let now: i64 = chrono::offset::Utc::now().timestamp();
let expire = claims["expiration"].parse::<i64>().unwrap_or(0);
if now > expire {
return Outcome::Failure((
return Outcome::Error((
Status::Unauthorized,
BearerTokenError::Expired,
));
}
Outcome::Success(BearerToken(String::from(token)))
}
Err(_) => Outcome::Failure((Status::Unauthorized, BearerTokenError::Invalid)),
Err(_) => Outcome::Error((Status::Unauthorized, BearerTokenError::Invalid)),
};
}
None => Outcome::Failure((Status::Unauthorized, BearerTokenError::Missing)),
None => Outcome::Error((Status::Unauthorized, BearerTokenError::Missing)),
}
}
}

View file

@ -63,7 +63,7 @@ pub async fn create(
let created = chrono::offset::Utc::now().timestamp();
// get contact public message key and encipher the message
debug!("sending message: {:?}", &m);
let contact: Contact = contact::find(&m.to).map_err(|_| NevekoError::Message)?;
let contact: Contact = contact::find_by_i2p_address(&m.to).map_err(|_| NevekoError::Message)?;
let hex_nmpk: String = contact.nmpk;
let encipher = Some(String::from(neveko25519::ENCIPHER));
let e_body = neveko25519::cipher(&hex_nmpk, String::from(&m.body), encipher).await;

View file

@ -203,7 +203,7 @@ impl<'r> FromRequest<'r> for PaymentProof {
let subaddress = &claims["subaddress"];
let is_valid_subaddress = validate_subaddress(subaddress).await;
if !is_valid_subaddress {
return Outcome::Failure((
return Outcome::Error((
Status::PaymentRequired,
PaymentProofError::Invalid,
));
@ -224,7 +224,7 @@ impl<'r> FromRequest<'r> for PaymentProof {
let expire = utils::get_conf_threshold();
// TODO(c2m): offline verification from created and expire fields
if c_txp.confirmations > expire {
return Outcome::Failure((
return Outcome::Error((
Status::Unauthorized,
PaymentProofError::Expired,
));
@ -233,14 +233,14 @@ impl<'r> FromRequest<'r> for PaymentProof {
}
Err(e) => {
error!("jwp error: {:?}", e);
return Outcome::Failure((
return Outcome::Error((
Status::PaymentRequired,
PaymentProofError::Invalid,
));
}
};
}
None => Outcome::Failure((Status::PaymentRequired, PaymentProofError::Missing)),
None => Outcome::Error((Status::PaymentRequired, PaymentProofError::Missing)),
}
}
}

118
neveko-gui/Cargo.lock generated
View file

@ -105,6 +105,12 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04"
[[package]]
name = "android-tzdata"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
[[package]]
name = "android_system_properties"
version = "0.1.5"
@ -123,17 +129,32 @@ dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"anstyle-wincon 1.0.1",
"colorchoice",
"is-terminal",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.0"
name = "anstream"
version = "0.6.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d"
checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon 3.0.4",
"colorchoice",
"is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
[[package]]
name = "anstyle-parse"
@ -163,6 +184,16 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
dependencies = [
"anstyle",
"windows-sys 0.52.0",
]
[[package]]
name = "arboard"
version = "3.2.0"
@ -495,17 +526,16 @@ checksum = "17cc5e6b5ab06331c33589842070416baa137e8b0eb912b008cfd4a78ada7919"
[[package]]
name = "chrono"
version = "0.4.24"
version = "0.4.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b"
checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
dependencies = [
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-integer",
"num-traits",
"time 0.1.45",
"wasm-bindgen",
"winapi",
"windows-targets 0.52.6",
]
[[package]]
@ -536,7 +566,7 @@ version = "4.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fdc5d93c358224b4d6867ef1356d740de2303e9892edc06c5340daeccd96bab"
dependencies = [
"anstream",
"anstream 0.3.1",
"anstyle",
"bitflags 1.3.2",
"clap_lex",
@ -642,7 +672,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24"
dependencies = [
"percent-encoding",
"time 0.3.36",
"time",
"version_check",
]
@ -1190,16 +1220,26 @@ dependencies = [
]
[[package]]
name = "env_logger"
version = "0.10.0"
name = "env_filter"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab"
dependencies = [
"humantime",
"is-terminal",
"log",
"regex",
"termcolor",
]
[[package]]
name = "env_logger"
version = "0.11.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d"
dependencies = [
"anstream 0.6.15",
"anstyle",
"env_filter",
"humantime",
"log",
]
[[package]]
@ -1477,7 +1517,7 @@ checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4"
dependencies = [
"cfg-if",
"libc 0.2.158",
"wasi 0.11.0+wasi-snapshot-preview1",
"wasi",
]
[[package]]
@ -1920,6 +1960,12 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "itoa"
version = "1.0.6"
@ -2137,7 +2183,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
dependencies = [
"cfg-if",
"windows-targets 0.48.0",
"windows-targets 0.52.6",
]
[[package]]
@ -2192,7 +2238,7 @@ version = "0.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
dependencies = [
"libc 0.1.12",
"libc 0.2.158",
]
[[package]]
@ -2320,7 +2366,7 @@ checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9"
dependencies = [
"libc 0.2.158",
"log",
"wasi 0.11.0+wasi-snapshot-preview1",
"wasi",
"windows-sys 0.45.0",
]
@ -3254,7 +3300,7 @@ dependencies = [
"serde_json",
"state",
"tempfile",
"time 0.3.36",
"time",
"tokio",
"tokio-stream",
"tokio-util",
@ -3301,7 +3347,7 @@ dependencies = [
"smallvec",
"stable-pattern",
"state",
"time 0.3.36",
"time",
"tokio",
"uncased",
]
@ -3819,17 +3865,6 @@ dependencies = [
"weezl",
]
[[package]]
name = "time"
version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
dependencies = [
"libc 0.2.158",
"wasi 0.10.0+wasi-snapshot-preview1",
"winapi",
]
[[package]]
name = "time"
version = "0.3.36"
@ -4233,12 +4268,6 @@ dependencies = [
"try-lock",
]
[[package]]
name = "wasi"
version = "0.10.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
@ -4690,6 +4719,15 @@ dependencies = [
"windows-targets 0.48.0",
]
[[package]]
name = "windows-sys"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-targets"
version = "0.42.2"

View file

@ -27,7 +27,7 @@ wgpu = ["eframe/wgpu", "bytemuck"]
[dependencies]
bincode = "1.3.3"
chrono = { version = "0.4", features = ["js-sys", "wasmbind"] }
chrono = { version = "0.4.38", features = ["js-sys", "wasmbind"] }
eframe = { version = "0.21.0", path = "./crates/eframe", default-features = false }
egui = { version = "0.21.0", path = "./crates/egui", features = [
"extra_debug_asserts",

2797
neveko-market/Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -9,4 +9,4 @@ chrono = "0.4.38"
env_logger = "0.11.0"
neveko_core = { path = "../neveko-core" }
log = "0.4"
rocket = { version = "0.5.0-rc.3", features = ["json"] }
rocket = { version = "0.5.1", features = ["json"] }

2873
neveko-message/Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -9,4 +9,4 @@ edition = "2021"
env_logger = "0.11.0"
neveko_core = { path = "../neveko-core" }
log = "0.4"
rocket = { version = "0.5.0-rc.3", features = ["json"] }
rocket = { version = "0.5.1", features = ["json"] }

View file

@ -9,23 +9,27 @@ RELEASE_NAME="neveko-$LINUX_X86_64-$1"
LINUX_OUTPUT_DIR=".build/release/$RELEASE_NAME"
mkdir -p $LINUX_OUTPUT_DIR
# monero version
MONERO_VERSION="monero-linux-x64-v0.18.3.4"
MONERO_VERSION="monero-$LINUX_X86_64-v0.18.3.4"
# build jars for j4-i2p-rs
git clone --depth 1 https://github.com/kn0sys/i2p.i2p
cd i2p.i2p && ant buildRouter buildI2PTunnelJars buildSAM jbigi buildAddressbook
mkdir -p ../opt/j4-i2p-rs/jassets && cp build/* ../opt/j4-i2p-rs/jassets/
cd ../
cp -r opt/ $LINUX_OUTPUT_DIR
# certificates for reseed
cp -r j4-i2p-rs/certificates $LINUX_OUTPUT_DIR
# download monero and extract monero wallet rpc
wget https://downloads.getmonero.org/cli/$MONERO_VERSION.tar.bz2
wget https://downloads.getmonero.org/cli/linux64
mv linux64 $MONERO_VERSION.tar.bz2
tar xvf $MONERO_VERSION.tar.bz2
mkdir $LINUX_OUTPUT_DIR/$MONERO_VERSION
cp $MONERO_VERSION/monero-wallet-rpc $LINUX_OUTPUT_DIR/$MONERO_VERSION
cp $MONERO_VERSION/monerod $LINUX_OUTPUT_DIR/$MONERO_VERSION
# build neveko-core
cargo build --release
# j4-i2p-rs dependencies
cp -r j4-i2p-rs/opt/j4-i2p-rs/deps opt/j4-i2p-rs
cp j4-i2p-rs/opt/j4-i2p-rs/jassets/j4rs-0.20.0-jar-with-dependencies.jar opt/j4-i2p-rs/jassets
cp -r opt/ $LINUX_OUTPUT_DIR
cp target/release/neveko $LINUX_OUTPUT_DIR
# build gui
cd neveko-gui && cargo build --release && cp target/release/neveko_gui ../$LINUX_OUTPUT_DIR