Skip to content

refactor: latest wavs 0.4.0-alpha.2 #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
Apr 18, 2025
Merged

refactor: latest wavs 0.4.0-alpha.2 #119

merged 37 commits into from
Apr 18, 2025

Conversation

Reecepbcups
Copy link
Member

@Reecepbcups Reecepbcups commented Apr 8, 2025

Closes #46

Reproduce Build Env:

git clone --depth 1 [email protected]:Lay3rLabs/WAVS.git --branch reece/use-priv_key-for-signing  --depth=1
cd WAVS

docker build . -t ghcr.io/lay3rlabs/wavs:0.4.0-alpha.2
just install-native ~/.wavs

Run main README.md


TOOD:

  • Get rid of temp local replaces (npm, any github imports, and :local image, ghcr.io/reecepbcups)
  • Working wasi-exec for Rust
    • Update TS and Go examples (incl. upstream helpers in wavs-wasi)
  • Working flow with Rust
    • Go
    • TS
  • README parity with Rust in the Go and TS repos (all the infra, commands, etc). Wait until rust is done)
  • Working with Aggregator
  • Get wavs-middleware tag w/ ghcr image
  • Docci (All CI passing) for all examples
    • locally
    • Rust + Aggregator (re-add tutorial to config.json)
    • TS
    • Golang
  • Test with MacOS
  • Update docs/ (another PR)

@ethanfrey
Copy link
Contributor

The aggregator is documented in https://github.com/Lay3rLabs/wavs-foundry-template/blob/100-wavs-template---deploy-contract-setup/wavs-staking-template/dev_notes.md#start-aggregator

There is a need to add how to add the service json there. Waiting for @dakom or @ismellike to run that part and update the docs

@ethanfrey
Copy link
Contributor

Can you run the code from #105 properly?
Let's add more comments there and get the doc flow finalized, so you can then get this fully working.
But great progress here

@Reecepbcups Reecepbcups changed the title refactor: latest wavs 127f55aa06 refactor: latest wavs 0.4.0-alpha.2 Apr 9, 2025
@Reecepbcups
Copy link
Member Author

Currently working full flow in rust, depends on https://github.com/Lay3rLabs/WAVS/pull/517

image

@Reecepbcups
Copy link
Member Author

Reecepbcups commented Apr 12, 2025

Docci test all pass locally now (fails upstream because wavs-middleware:local image). moving to my own ghcr temp

@Reecepbcups Reecepbcups force-pushed the reece/latest-311a4dd branch from 8037699 to fbbf00d Compare April 14, 2025 20:27
Comment on lines +106 to +107
# - name: Run docci (typescript)
# run: docci components/js-eth-price-oracle/config.json
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: re-add

Cargo.toml Outdated
@@ -18,7 +18,7 @@ wit-bindgen-rt = {version = "0.39.0", features = ["bitflags"]}
wit-bindgen = "0.39.0"
wstd = "0.5.1"
wasi = "0.14.1"
wavs-wasi-chain = "0.3.0"
wavs-wasi-utils = { git = "https://github.com/Lay3rLabs/wavs-wasi" }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: use crates.io v0.4.0 when it comes out for alpha.2 +

@@ -14,7 +14,7 @@ SERVICE_CONFIG_FILE?=.docker/service.json
CARGO=cargo
# the directory to build, or "" for all
WASI_BUILD_DIR ?= ""
DOCKER_IMAGE?=ghcr.io/lay3rlabs/wavs:0.4.0-alpha1-amd64
DOCKER_IMAGE?=ghcr.io/lay3rlabs/wavs:reece_priv_key_signing_apr_10
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TOOD: alpha.3 +

Comment on lines +101 to +102
# TODO: move to $(WAVS_CMD) upload-component ./compiled/${COMPONENT_FILENAME}
@wget --post-file=./compiled/${COMPONENT_FILENAME} --header="Content-Type: application/wasm" -O - http://127.0.0.1:8000/upload | jq -r .digest
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine for now, but upload-component (or using a proper registry with the new workflows coming in -alpha.3 are ideal)

@@ -1,15 +1,13 @@
{
"__tool": "github.com/reecepbcups/docci",
"paths": [
"README.md",
"docs/tutorial"
"README.md"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: docs/ update and re-add tutorial back

@@ -6,10 +6,10 @@ GO_MOD_NAME?=$(shell head -n 1 go.mod | cut -d' ' -f2 | rev | cut -d'/' -f1 | re
OUTPUT_DIR?=../../compiled

check-package:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

@@ -9,7 +9,7 @@ replace github.com/dev-wasm/dev-wasm-go/lib => github.com/Reecepbcups/dev-wasm-g
replace github.com/defiweb/go-eth => github.com/Reecepbcups/go-eth v0.7.1-0.20250320155602-e7f53502e2df

require (
github.com/Lay3rLabs/wavs-wasi/go v0.0.0-20250320001549-b328e80abaab
github.com/Lay3rLabs/wavs-wasi/go v0.0.0-20250408192403-d6de9a9ab4a8
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proper tag

@@ -6,7 +6,7 @@ check-package:
# TODO: fix import to use the $(WAVS_PACKAGE) instead (same for golang)
@if [ ! -f $(WAVS_PACKAGE).wasm ]; then \
echo "Downloading WAVS package: $(WAVS_PACKAGE)"; \
wkg get reecepbcups:[email protected].2 --overwrite --format wasm --output $(WAVS_PACKAGE).wasm; \
wkg get reecepbcups:[email protected].3 --overwrite --format wasm --output $(WAVS_PACKAGE).wasm; \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

wavs:
image: "ghcr.io/lay3rlabs/wavs:0.4.0-alpha1-amd64"
image: "ghcr.io/lay3rlabs/wavs:reece_priv_key_signing_apr_10"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

"forge-std": "github:foundry-rs/forge-std#v1.9.6",
"wavs-middleware": "github:Lay3rLabs/wavs-middleware#dbc35565fba78f5f5ded3859437b3753ea47fec8",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proper tag

@Reecepbcups Reecepbcups marked this pull request as ready for review April 15, 2025 18:54
@Reecepbcups
Copy link
Member Author

Merging this now so the template has latest working and up to date. issue with be referenced with TODO comments

@Reecepbcups Reecepbcups merged commit c54915b into main Apr 18, 2025
@Reecepbcups Reecepbcups deleted the reece/latest-311a4dd branch April 18, 2025 16:26
This was referenced Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants