Skip to content

Commit

Permalink
feat(node): Implement persistent header storage in browser using Inde…
Browse files Browse the repository at this point in the history
…xedDB (#102)
  • Loading branch information
fl0rek authored Oct 19, 2023
1 parent 6de167f commit 7f644c0
Show file tree
Hide file tree
Showing 32 changed files with 893 additions and 110 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: cargo fmt -- --check


build-wasm:
test-wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand All @@ -46,9 +46,26 @@ jobs:
toolchain: stable
target: wasm32-unknown-unknown

- name: Install wasm-pack
uses: taiki-e/cache-cargo-install-action@v1
with:
tool: [email protected]

- name: Install chromedriver # we don't specify chrome version to match whatever's installed
uses: nanasess/setup-chromedriver@v2

- name: Build (wasm32-unknown-unknown)
run: cargo build --all --target=wasm32-unknown-unknown

- name: Test proto crate
run: wasm-pack test --node proto

- name: Test types crate
run: wasm-pack test --node types

- name: Test node crate
run: wasm-pack test --headless --chrome node


test:
runs-on: ubuntu-latest
Expand Down
138 changes: 97 additions & 41 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ celestia-proto = { version = "0.1.0", path = "proto" }
celestia-rpc = { version = "0.1.0", path = "rpc", default-features = false }
celestia-types = { version = "0.1.0", path = "types", default-features = false }
nmt-rs = { git = "https://github.com/Sovereign-Labs/nmt-rs.git", rev = "d821332" }
tendermint = { git = "https://github.com/eigerco/celestia-tendermint-rs.git", rev = "1f8b574", default-features = false }
tendermint-proto = { git = "https://github.com/eigerco/celestia-tendermint-rs.git", rev = "1f8b574" }
tendermint = { git = "https://github.com/eigerco/celestia-tendermint-rs.git", rev = "ef58b85", default-features = false }
tendermint-proto = { git = "https://github.com/eigerco/celestia-tendermint-rs.git", rev = "ef58b85" }

[patch.'https://github.com/eigerco/celestia-tendermint-rs.git']
# Uncomment to apply local changes
Expand Down
12 changes: 11 additions & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,20 @@ libp2p = { version = "0.52.3", features = [

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2.10", features = ["js"] }
wasm-bindgen-futures = "0.4.37"
gloo-timers = { version = "0.3.0", features = ["futures"] }
rexie = "0.5.0"
send_wrapper = { version = "0.6.0", features = ["futures"] }
serde = { version = "1.0.164", features = ["derive"] }
serde-wasm-bindgen = "0.6.0"
wasm-bindgen = "0.2.87"
wasm-bindgen-futures = "0.4.37"
libp2p = { version = "0.52.3", features = ["webtransport-websys"] }
pin-project = "1.1.3"

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3"
instant = { version = "0.1.12", features = ["wasm-bindgen"] }
function_name = "0.3.0"

[dev-dependencies]
bytes = "1.4.0"
Expand Down
Loading

0 comments on commit 7f644c0

Please sign in to comment.