oasisprotocol / sapphire-paratime

The Sapphire ParaTime monorepo.
https://oasisprotocol.org/sapphire
Apache License 2.0
34 stars 24 forks source link

Added Makefile to `runtime` directory to make debug build for testing #291

Closed CedarMist closed 4 months ago

CedarMist commented 5 months ago

This can be used in conjunction with sapphire-localnet to run a custom debug build of Sapphire runtime without rebuilding the oasis-web3-gateway image.

Example of bind-mounting sapphire-paratime executable:

SAPPHIRE_DEV_DOCKER=ghcr.io/oasisprotocol/sapphire-localnet:latest
docker run --rm -ti -p8545:8545 -p8546:8546 -v $SOURCE/sapphire-paratime/runtime/target/debug/sapphire-paratime:/runtime.elf $(SAPPHIRE_DEV_DOCKER) -to 'test test test test test test test test test test test junk' -n 4

out of curiosity, here is a Dockerfile that does a full oasis-web3-gateway build with a specific branch: https://gist.github.com/CedarMist/87255bf16f48db3a5b6f7f03d72ccb40 - although it still requires a branch on sapphire-paratime to update Cargo.toml with the correct dependency from oasis-sdk

netlify[bot] commented 5 months ago

Deploy Preview for oasisprotocol-sapphire-paratime canceled.

Name Link
Latest commit 40b5d086bf88eb8f7b7fbc4041fa6aad6f410ec1
Latest deploy log https://app.netlify.com/sites/oasisprotocol-sapphire-paratime/deploys/660406258bc8bd00084cc46a
CedarMist commented 5 months ago

@aefhm @matevz

This means you can make changes to runtime and startup an oasis-web3-gateway with that.

In runtime type:

make debug