This PR embeds TOOLCHAIN_VERSION in the indexer's WASM module and adds a check when the indexer is deploys which only permits the indexers whose TOOLCHAIN_VERSION matches the fuel-indexer version.
Testing steps
CI tests should pass.
Manual testing:
Start fuel-indexer:
cargo run -p fuel-indexer -- run --fuel-node-host beta-4.fuel.network --fuel-node-port 80 --replace-indexer
Create and deploy an indexer using an older version of forc-index:
forc-index --version
forc index 0.20.11
forc-index new /tmp/test-indexer
forc-index deploy --path /tmp/some-indexer
▹▸▹▹▹ ⏰ Building indexer...
Finished release [optimized] target(s) in 0.10s
▪▪▪▪▪ ✅ Build succeeded.
Deploying indexer...
▸▹▹▹▹ 🚀 Deploying...
{
"details": "WASM module toolchain version `unknown` does not match fuel-indexer version `0.21.1`",
"success": "false"
}
Additionally, run fuel-indexer with --disable-toolchain-version-check to be able to deploy the above indexer anyway.
Deploy one of the indexers in the repository (hence, using the same toolchain version):
cargo run --bin forc-index -- deploy --path examples/fuel-explorer/fuel-explorer/
Description
Closes #1377.
This PR embeds
TOOLCHAIN_VERSION
in the indexer's WASM module and adds a check when the indexer is deploys which only permits the indexers whoseTOOLCHAIN_VERSION
matches thefuel-indexer
version.Testing steps
CI tests should pass.
Manual testing:
fuel-indexer
:forc-index
:Additionally, run
fuel-indexer
with--disable-toolchain-version-check
to be able to deploy the above indexer anyway.Changelog
TOOLCHAIN_VERSION
in WASM modulefuel-indexer
's version