Skip to content

Commit

Permalink
Merge pull request #19 from x100111010/k_upstream
Browse files Browse the repository at this point in the history
[RK] Batch upstream merge
  • Loading branch information
0xA001113 authored Oct 21, 2024
2 parents 82c4d2c + 52d541a commit d756c45
Show file tree
Hide file tree
Showing 370 changed files with 18,840 additions and 5,097 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jobs:
run: cargo clippy --workspace --tests --benches -- -D warnings

check-wasm32:
name: Check Wasm32
name: Check WASM32
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand Down Expand Up @@ -231,12 +231,16 @@ jobs:
run: cargo clippy -p spectre-wasm --target wasm32-unknown-unknown

build-wasm32:
name: Build Wasm32
name: Build WASM32 SDK
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup Environment
shell: bash
run: echo "SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV

- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
Expand Down Expand Up @@ -293,17 +297,22 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build wasm release
- name: Build WASM release
env:
TARGET_CC: clang
TARGET_CFLAGS: -I/usr/include
run: cd wasm && bash build-release
run: |
pushd .
cd wasm
bash build-release
popd
mv wasm/release/spectre-wasm32-sdk.zip wasm/release/spectre-wasm32-sdk-${{ env.SHORT_SHA }}.zip
- name: Upload wasm binary to GitHub
- name: Upload WASM build to GitHub
uses: actions/upload-artifact@v4
with:
name: spectre-wasm32-sdk
path: wasm/release/spectre-wasm32-sdk.zip
name: spectre-wasm32-sdk-${{ env.SHORT_SHA }}.zip
path: wasm/release/spectre-wasm32-sdk-${{ env.SHORT_SHA }}.zip

build-release:
name: Build Ubuntu Release
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,7 @@ jobs:
sudo update-alternatives --install /usr/bin/c++ c++ /usr/lib/llvm-15/bin/clang++ 0
- name: Install gcc-multilib

# gcc-multilib allows clang to find gnu libraries properly.
# gcc-multilib allows clang to find gnu libraries properly
run: sudo apt install -y gcc-multilib

- name: Install stable toolchain
Expand Down Expand Up @@ -366,13 +365,21 @@ jobs:
TARGET_CC: clang
TARGET_CFLAGS: -I/usr/include
run: |
mkdir sdk || true
cd wasm
bash build-release
mv release/spectre-wasm32-sdk.zip ../sdk/spectre-wasm32-sdk-${{ github.event.release.tag_name }}.zip
mv release/spectre-wasm32-sdk.zip ../spectre-wasm32-sdk-${{ github.event.release.tag_name }}.zip
archive="spectre-wasm32-sdk-${{ github.event.release.tag_name }}.zip"
asset_name="spectre-wasm32-sdk-${{ github.event.release.tag_name }}.zip"
echo "archive=${archive}" >> $GITHUB_ENV
echo "asset_name=${asset_name}" >> $GITHUB_ENV
- name: Upload WASM32 SDK
uses: softprops/action-gh-release@v2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
sdk/*.zip
upload_url: ${{ github.event.release.upload_url }}
asset_path: "./${{ env.archive }}"
asset_name: "${{ env.asset_name }}"
asset_content_type: application/zip
81 changes: 44 additions & 37 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ members = [
"rpc/grpc/core",
"rpc/grpc/client",
"rpc/grpc/server",
"rpc/wrpc/resolver",
"rpc/wrpc/server",
"rpc/wrpc/client",
"rpc/wrpc/proxy",
Expand All @@ -62,7 +61,7 @@ members = [
]

[workspace.package]
rust-version = "1.78.0"
rust-version = "1.80.0"
version = "0.3.15"
authors = ["Spectre developers"]
license = "ISC"
Expand All @@ -84,7 +83,6 @@ include = [
spectre-addresses = { version = "0.3.15", path = "crypto/addresses" }
spectre-addressmanager = { version = "0.3.15", path = "components/addressmanager" }
spectre-bip32 = { version = "0.3.15", path = "wallet/bip32" }
spectre-resolver = { version = "0.3.15", path = "rpr/wrpc/resolver" }
spectre-cli = { version = "0.3.15", path = "cli" }
spectre-connectionmanager = { version = "0.3.15", path = "components/connectionmanager" }
spectre-consensus = { version = "0.3.15", path = "consensus" }
Expand Down Expand Up @@ -124,13 +122,12 @@ spectre-utxoindex = { version = "0.3.15", path = "indexes/utxoindex" }
spectre-wallet = { version = "0.3.15", path = "wallet/native" }
spectre-wallet-cli-wasm = { version = "0.3.15", path = "wallet/wasm" }
spectre-wallet-keys = { version = "0.3.15", path = "wallet/keys" }
spectre-wallet-core = { version = "0.3.15", path = "wallet/core" }
spectre-wallet-psst = { version = "0.3.15", path = "wallet/psst" }
spectre-wallet-core = { version = "0.3.15", path = "wallet/core" }
spectre-wallet-macros = { version = "0.3.15", path = "wallet/macros" }
spectre-wasm = { version = "0.3.15", path = "wasm" }
spectre-wasm-core = { version = "0.3.15", path = "wasm/core" }
spectre-wrpc-client = { version = "0.3.15", path = "rpc/wrpc/client" }
spectre-wrpc-core = { version = "0.3.15", path = "rpc/wrpc/core" }
spectre-wrpc-proxy = { version = "0.3.15", path = "rpc/wrpc/proxy" }
spectre-wrpc-server = { version = "0.3.15", path = "rpc/wrpc/server" }
spectre-wrpc-wasm = { version = "0.3.15", path = "rpc/wrpc/wasm" }
Expand All @@ -147,10 +144,10 @@ async-channel = "2.0.0"
async-std = { version = "1.12.0", features = ['attributes'] }
async-stream = "0.3.5"
async-trait = "0.1.74"
base64 = "0.21.5"
base64 = "0.22.1"
bincode = { version = "1.3.3", default-features = false }
blake2b_simd = "1.0.2"
borsh = { version = "0.9.1", features = ["rc"] } # please keep this fixed
borsh = { version = "1.5.1", features = ["derive", "rc"] }
bs58 = { version = "0.5.0", features = ["check"], default-features = false }
cc = "1.0.83"
cfb-mode = "0.8.2"
Expand All @@ -162,42 +159,45 @@ criterion = { version = "0.5.1", default-features = false }
crossbeam-channel = "0.5.8"
ctrlc = "3.4.1"
crypto_box = { version = "0.9.1", features = ["chacha20"] }
dashmap = "5.5.3"
dashmap = "6.0.1"
derivative = "2.2.0"
derive_builder = "0.20.0"
derive_more = "0.99.17"
# derive_more = { version = "1.0.0", features = ["full"] }
dhat = "0.3.2"
dirs = "5.0.1"
downcast = "0.11.0"
downcast-rs = "1.2.0"
duration-string = "0.3.0"
enum-primitive-derive = "0.2.2"
duration-string = "0.4.0"
enum-primitive-derive = "0.3.0"
event-listener = "2.5.3" # TODO "3.0.1"
evpkdf = "0.2.0"
faster-hex = "0.6.1" # TODO "0.8.1" - fails unit tests
faster-hex = "0.9.0"
fixedstr = { version = "0.5.4", features = ["serde"] }
flate2 = "1.0.28"
futures = { version = "0.3.29" }
futures-util = { version = "0.3.29", default-features = false, features = [
"alloc",
] }
futures-util = { version = "0.3.29", default-features = false, features = ["alloc"] }
getrandom = { version = "0.2.10", features = ["js"] }
h2 = "0.3.21"
heapless = "0.7.16"
h2 = "0.4.6"
# h2 = "0.3.21"
heapless = "0.8.0"
# heapless = "0.7.16"
hex = { version = "0.4.3", features = ["serde"] }
hex-literal = "0.4.1"
hexplay = "0.3.0"
hmac = { version = "0.12.1", default-features = false }
home = "0.5.5"
igd-next = { version = "0.14.2", features = ["aio_tokio"] }
indexmap = "2.1.0"
intertrait = "0.2.2"
ipnet = "2.9.0"
itertools = "0.11.0"
js-sys = "0.3.67"
itertools = "0.13.0"
js-sys = "0.3.70"
keccak = "0.1.4"
local-ip-address = "0.5.6"
local-ip-address = "0.6.1"
log = "0.4.20"
log4rs = "1.2.0"
mac_address = "1.1.7"
malachite-base = "0.4.4"
malachite-nz = "0.4.4"
md-5 = "0.10.6"
Expand All @@ -211,6 +211,7 @@ paste = "1.0.14"
pbkdf2 = "0.12.2"
portable-atomic = { version = "1.5.1", features = ["float"] }
prost = "0.12.1"
# prost = "0.13.1"
rand = "0.8.5"
rand_chacha = "0.3.1"
rand_core = { version = "0.6.4", features = ["std"] }
Expand All @@ -219,8 +220,8 @@ rayon = "1.8.0"
regex = "1.10.2"
ripemd = { version = "0.1.3", default-features = false }
rlimit = "0.10.1"
rocksdb = "0.21.0"
secp256k1 = { version = "0.28.2", features = [
rocksdb = "0.22.0"
secp256k1 = { version = "0.29.0", features = [
"global-context",
"rand-std",
"serde",
Expand All @@ -243,6 +244,7 @@ spectrex = ">=0.3.17"
statest = "0.2.2"
statrs = "0.13.0" # TODO "0.16.0"
subtle = { version = "2.5.0", default-features = false }
sysinfo = "0.31.2"
tempfile = "3.8.1"
textwrap = "0.16.0"
thiserror = "1.0.50"
Expand All @@ -253,10 +255,10 @@ tonic = { version = "0.10.2", features = ["tls", "gzip", "transport"] }
tonic-build = { version = "0.10.2", features = ["prost"] }
triggered = "0.1.2"
uuid = { version = "1.5.0", features = ["v4", "fast-rng", "serde"] }
wasm-bindgen = { version = "0.2.92", features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4.40"
wasm-bindgen-test = "0.3.37"
web-sys = "0.3.67"
wasm-bindgen = { version = "0.2.93", features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4.43"
wasm-bindgen-test = "0.3.43"
web-sys = "0.3.70"
xxhash-rust = { version = "0.8.7", features = ["xxh3"] }
zeroize = { version = "1.6.0", default-features = false, features = ["alloc"] }
pin-project-lite = "0.2.13"
Expand All @@ -267,25 +269,26 @@ tower-http = { version = "0.4.4", features = [
tower = "0.4.7"
hyper = "0.14.27"
chrono = "0.4.31"
indexed_db_futures = "0.4.1"
indexed_db_futures = "0.5.0"
# workflow dependencies that are not a part of core libraries

# workflow-perf-monitor = { path = "../../../workflow-perf-monitor-rs" }
workflow-perf-monitor = "0.0.2"
nw-sys = "0.1.6"

# workflow dependencies
workflow-core = { version = "0.12.1" }
workflow-d3 = { version = "0.12.1" }
workflow-dom = { version = "0.12.1" }
workflow-http = { version = "0.12.1" }
workflow-log = { version = "0.12.1" }
workflow-node = { version = "0.12.1" }
workflow-nw = { version = "0.12.1" }
workflow-rpc = { version = "0.12.1" }
workflow-store = { version = "0.12.1" }
workflow-terminal = { version = "0.12.1" }
workflow-wasm = { version = "0.12.1" }
workflow-core = { version = "0.17.0" }
workflow-d3 = { version = "0.17.0" }
workflow-dom = { version = "0.17.0" }
workflow-http = { version = "0.17.0" }
workflow-log = { version = "0.17.0" }
workflow-node = { version = "0.17.0" }
workflow-nw = { version = "0.17.0" }
workflow-rpc = { version = "0.17.0" }
workflow-serializer = { version = "0.17.0" }
workflow-store = { version = "0.17.0" }
workflow-terminal = { version = "0.17.0" }
workflow-wasm = { version = "0.17.0" }

# if below is enabled, this means that there is an ongoing work
# on the workflow-rs crate. This requires that you clone workflow-rs
Expand All @@ -298,6 +301,7 @@ workflow-wasm = { version = "0.12.1" }
# workflow-node = { path = "../workflow-rs/node" }
# workflow-nw = { path = "../workflow-rs/nw" }
# workflow-rpc = { path = "../workflow-rs/rpc" }
# workflow-serializer = { path = "../workflow-rs/serializer" }
# workflow-store = { path = "../workflow-rs/store" }
# workflow-terminal = { path = "../workflow-rs/terminal" }
# workflow-wasm = { path = "../workflow-rs/wasm" }
Expand All @@ -311,6 +315,7 @@ workflow-wasm = { version = "0.12.1" }
# workflow-node = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" }
# workflow-nw = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" }
# workflow-rpc = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" }
# workflow-serializer = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" }
# workflow-store = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" }
# workflow-terminal = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" }
# workflow-wasm = { git = "https://github.com/workflow-rs/workflow-rs.git", branch = "master" }
Expand All @@ -326,3 +331,5 @@ inherits = "release"
debug = true
strip = false

[workspace.lints.clippy]
empty_docs = "allow"
Loading

0 comments on commit d756c45

Please sign in to comment.