Files
simplex-chat/scripts/store-service
sh-agentsandsh-agents 4aab0ef3a6 store: refuse unsafe service starts, exit on a lost instance lock (#8096)
* store: restrict Stripe test keys to test chains, refuse mixed modes

* store: limit gas_limit_cap times max_fee_per_gas to 1 ETH

* store: prevent start while another key's transactions are pending

* store: exit when the instance lock's connection fails, restart always

* store: explain the fee cap refusal, match the chain checks' form

* store: check pending transactions' key and chain before the chat starts

* store: print a lost instance lock before the service stops

* store: document start refusals, stuck pending rows and the fee bound

* store: build the pending signer refusal without an inferred constraint

* store: zero the old key's allowance before dropping its pending rows

* store: flush the lost lock line before the service stops

* store: name the pending check after the signatures it checks

* store: test that another key's pending row stops the start

* store: read the chain settings in the start test by field

* store: limit each transaction's fee to 1 ETH at signing

* store: log a fee capped at 1 ETH for replacements too

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-11 08:56:50 +00:00
..

Store service deployment

  • compose.yml: the service, built from Dockerfile, with ./config mounted read-only.
  • compose.dev.yml: adds a local chain and database to compose.yml, for development.
  • Dockerfile, Dockerfile.dockerignore: the image, built from the repository root.
  • store_service.ini.example: the template of config/store_service.ini.
  • dev/chain.sh: the dev chain, which also writes the dev config/store_service.ini.
  • dev/contract-run.sh: runs the names webapp's end-to-end cases against the service.
  • config/, badges/, names/, data/, .env: local state, gitignored.

Production, with PostgreSQL at BADGE_DB_CONN (by default postgresql://simplex@127.0.0.1:5432/badge_service), and the ini filled in before the last command:

git submodule update --init ../../apps/simplex-domains
install -d -m 700 config
install -m 600 store_service.ini.example config/store_service.ini
docker compose up -d --build

Development, from a fresh clone:

git clone https://github.com/simplex-chat/simplex-chat && cd simplex-chat
git checkout names && git submodule update --init apps/simplex-domains
cd scripts/store-service
echo "COMPOSE_FILE=compose.yml:compose.dev.yml" > .env
docker compose up -d --build

The names site is then on http://127.0.0.1:8081, the badges site on http://127.0.0.1:8080.

Everything else is in apps/simplex-store-service/README.md.