# Delphinus Cross Chain Deployment after Deprecating Network
Assume that Delphinus system with 3 networks is running well. You want to deprecate the 2nd network named `bsctestnet`.
**1. Stop ui**
We want to change verifier behavior, so user cannot operate on ui now.
**2. Stop Indexer monitor**
Ui is shutdown, so we do not need indexer monitor and history server now.
**3. Stop History Server**
**4. Stop l1 monitors**
If we stop substrateNode before l1 monitors, l2 can not handle event(deposit, ack, etc.)
**5. Stop substrateNode**
**6. Stop l2 monitor**
l2 monitor will save pending reqs event into mongoDB, so stop it before mongoDB
**7. Stop Caddy**
There are no service need to access reverse proxy now.
**8. Stop mongoDB**
**9. Change enabled**
In `deployment/config/eth-config.ts`, change
```
{
chainName: "bsctestnet",
mongodbUrl: "mongodb://localhost:27017",
syncEventsStep: 2000,
bufferBlocks: 0,
gasWarningAmount: "1",
nativeCurrency: {
name: "Test Binance Coin",
symbol: "tBNB", // 2-6 characters long
decimals: 18,
},
blockExplorer: "https://testnet.bscscan.com",
//rpcSource:
//"https://data-seed-prebsc-1-s1.binance.org:8545",
rpcSource: "https://data-seed-prebsc-1-s3.binance.org:8545", //Ankr is not stable, change to public source temporary.
wsSource: "wss://rpc.ankr.com/bsc_testnet_chapel/ws/" + secrets.ankr_id,
privateKey: secrets.accounts.deployer.priv,
monitorAccount: "",
deviceId: "97",
l2Account: "//Smith",
enabled: testnet,
isSnap: false,
}
```
to
```
{
chainName: "bsctestnet",
mongodbUrl: "mongodb://localhost:27017",
syncEventsStep: 2000,
bufferBlocks: 0,
gasWarningAmount: "1",
nativeCurrency: {
name: "Test Binance Coin",
symbol: "tBNB", // 2-6 characters long
decimals: 18,
},
blockExplorer: "https://testnet.bscscan.com",
//rpcSource:
//"https://data-seed-prebsc-1-s1.binance.org:8545",
rpcSource: "https://data-seed-prebsc-1-s3.binance.org:8545", //Ankr is not stable, change to public source temporary.
wsSource: "wss://rpc.ankr.com/bsc_testnet_chapel/ws/" + secrets.ankr_id,
privateKey: secrets.accounts.deployer.priv,
monitorAccount: "",
deviceId: "97",
l2Account: "//Smith",
enabled: dev,
isSnap: false,
}
```
run `npx tsc` in `deployment`
**10. Run `bash generate-config.sh` in `substrate-node`**
**11. Check if Accounts and Admins configs have been added successfully**
Run following command in `substrate-node`
```
bash config-check.sh
```
**12. Compile and generate docker image**
In `zkcross-backend-lerna` folder, run:
```
DOCKER_BUILDKIT=1 docker build --no-cache . -t delphinus-node -f packages/substrate-node/Dockerfile
```
**13. Run mongodb**
In `zkcross-backend-lerna/`, run:
```
mongod --dbpath [DB_PATH_NAME]
```
**14. Update mongoDB**
Execute following commands for **every** networks except `bsctestnet` so that l1 monitor can catch SwapAck again to emmit ack function in l2:
```
run “mongo”
show dbs
use [dbname] (should start with deviceId)
show collections (should see the MetaInfoCollection collection)
db.MetaInfoCollection.updateOne({ "_id" : ObjectId("6402b4ea6d4a4638d55b7f56")}, {$set:{"lastblock" : 8410907}})
```
**Note:**
1. get deviceId from `deployment/config/eth-config.ts`
2. Take goerli for example:

`6402b4ea6d4a4638d55b7f56` is get from `db.MetaInfoCollection.find`.
`8410907` is (block number you get from step 3 + 1)
3. Search `monitors/l2MonitorLogs` for the last successful case of verify. You can find transaction hash of all networks before it. Get block number by searching the transaction hash in the blockExplorer of which you can get the address from `deployment/config/eth-config.ts`.

**15. Stop mongoDB**
**16. Start substrateNode**
In `zkcross-learna/`, run:
```
docker-compose -f docker-compose.yml up
```
**17. Start Caddy**
In `zkcross-lerna/`, run:
```
sudo caddy run --config ./Caddyfile
```
**18. Run mongoDB**
In `zkcross-learna/`, run:
```
mongod --dbpath [DB_PATH_NAME]
```
**19. Start l2 monitors**
In `monitors/`, run:
```
sh run_l2monitor.sh -n // normal mode
sh run_l2monitor.sh -v // verbose mode
```
`sh run_l2monitor.sh` is normal mode, too.
**20. Start l1 monitors**
In `monitors/`, run:
```
sh run_l1monitor.sh goerli
sh run_l1monitor.sh bsctestnet
sh run_l1monitor.sh cronostestnet
sh run_l1monitor.sh rolluxtestnet
```
**21. Start Indexer monitor**
In `monitors/`, run
```
bash run_indexer.sh
```
**22. Start History Server**
In `deployment`, run:
```
npm run server
```
**23. Start ui**
In "ui", run:
```
npm run start
```
Now you deprecate a network and the system can work.