From 2838dae2c7a3866bb56a27a24049ae75f5fa0912 Mon Sep 17 00:00:00 2001 From: stefan-mysten <135084671+stefan-mysten@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:43:01 -0700 Subject: [PATCH] Fix running binary with --features indexer --- crates/sui-test-validator/src/main.rs | 2 +- sdk/graphql-transport/package.json | 2 +- sdk/typescript/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/sui-test-validator/src/main.rs b/crates/sui-test-validator/src/main.rs index 72d4113ca9576..0cf700fdd06bc 100644 --- a/crates/sui-test-validator/src/main.rs +++ b/crates/sui-test-validator/src/main.rs @@ -11,7 +11,7 @@ How to install/build the sui binary IF: OR - build from source. This requires passing the indexer feature when building the sui binary, as well as having libpq/postgresql dependencies installed (just as when using sui-test-validator): - cargo build --bin sui --features indexer - - cargo run --bin sui -- start --with-faucet --force-regenesis --with-indexer --with-graphql + - cargo run --features indexer --bin sui -- start --with-faucet --force-regenesis --with-indexer --with-graphql Running the local network: - (Preferred) In the simplest form, you can replace sui-test-validator with sui start --with-faucet --force-regenesis. This will create a network from a new genesis and start a faucet (127.0.0.1:9123). This will not persist state. diff --git a/sdk/graphql-transport/package.json b/sdk/graphql-transport/package.json index 906e2fe356d3f..a273520ae85f9 100644 --- a/sdk/graphql-transport/package.json +++ b/sdk/graphql-transport/package.json @@ -31,7 +31,7 @@ "prettier:check": "prettier -c --ignore-unknown .", "prettier:fix": "prettier -w --ignore-unknown .", "test:e2e:nowait": "vitest run e2e", - "test:e2e:prepare": "docker-compose down && docker-compose up -d && cargo build --bin sui --features indexer --profile dev && cross-env RUST_LOG=info,sui=error,anemo_tower=warn,consensus=off cargo run --bin sui -- start --with-faucet --force-regenesis --with-indexer --pg-port 5435 --pg-db-name sui_indexer_v2 --with-graphql", + "test:e2e:prepare": "docker-compose down && docker-compose up -d && cargo build --bin sui --features indexer --profile dev && cross-env RUST_LOG=info,sui=error,anemo_tower=warn,consensus=off cargo run --features indexer --bin sui -- start --with-faucet --force-regenesis --with-indexer --pg-port 5435 --pg-db-name sui_indexer_v2 --with-graphql", "test:e2e": "wait-on http://127.0.0.1:9123 -l --timeout 180000 && vitest" }, "repository": { diff --git a/sdk/typescript/package.json b/sdk/typescript/package.json index 32195ace52bc8..b55a13597b11d 100644 --- a/sdk/typescript/package.json +++ b/sdk/typescript/package.json @@ -102,7 +102,7 @@ "test:unit": "vitest run unit __tests__", "test:e2e": "wait-on http://127.0.0.1:9123 -l --timeout 180000 && vitest run e2e", "test:e2e:nowait": "vitest run e2e", - "prepare:e2e": "docker-compose down && docker-compose up -d && cargo build --bin sui --features indexer --profile dev && cross-env RUST_LOG=warn,sui=error,anemo_tower=warn,consensus=off cargo run --bin sui -- start --with-faucet --force-regenesis --with-indexer --pg-port 5435 --pg-db-name sui_indexer_v2 --with-graphql", + "prepare:e2e": "docker-compose down && docker-compose up -d && cargo build --bin sui --features indexer --profile dev && cross-env RUST_LOG=warn,sui=error,anemo_tower=warn,consensus=off cargo run --features indexer --bin sui -- start --with-faucet --force-regenesis --with-indexer --pg-port 5435 --pg-db-name sui_indexer_v2 --with-graphql", "prepublishOnly": "pnpm build", "size": "size-limit", "analyze": "size-limit --why",