Commit Graph

34 Commits

Author SHA1 Message Date
onledger.net
0f235d30d8 Add guard for empty disparate_dir in sync_instance
## Change

Add a guard to the `disparate_dir` cleanup in `sync_instance` to 
prevent accidental deletion of the contract state directory when 
`DISPARATE_DIR` is not set.

## Background

The `disparate` directory feature was introduced in the beta devkit 
image to support multisig deployments. The cluster script assumes 
`DISPARATE_DIR` is always set, however older NPM packages (below 
v0.6.8) do not pass this environment variable, leaving `$disparate_dir` 
as an empty string.

With an empty `$disparate_dir` this line:
```bash
[ -d $contract_dir/contract_fs/seed/state/$disparate_dir ] && rm -r $contract_dir/contract_fs/seed/state/$disparate_dir
```

Evaluates to:
```bash
[ -d $contract_dir/contract_fs/seed/state/ ] && rm -r $contract_dir/contract_fs/seed/state/
```

Deleting the entire state directory immediately after the contract 
bundle is copied in.

## Change

Add a guard so the deletion only runs when `$disparate_dir` is 
actually set:
```bash
# Before
[ -d $contract_dir/contract_fs/seed/state/$disparate_dir ] && rm -r $contract_dir/contract_fs/seed/state/$disparate_dir

# After
[ -n "$disparate_dir" ] && [ -d $contract_dir/contract_fs/seed/state/$disparate_dir ] && rm -r $contract_dir/contract_fs/seed/state/$disparate_dir
```

## Notes

- NPM v0.6.8 correctly passes `DISPARATE_DIR=disparate` and is 
required for full beta devkit compatibility
- This guard is defensive programming to protect against the state 
directory being accidentally deleted if an older NPM package is used 
with the beta image
- For non-multisig deployments the disparate directory cleanup is 
skipped entirely which is the correct behaviour
2026-03-31 23:04:32 +13:00
onledger.net
8805324c0c Fix sync_instance bundle copy — use /. to copy contents not directory 2026-03-30 13:38:46 +13:00
RichardAH
af5a65b871 Merge pull request #37 from EvernodeXRPL/rippleitinnz-roundtime-setting-cfg-bug
Bug fix in cfg settings
2026-02-16 11:44:16 +10:00
Dulana Peiris
2a2f818d8e Update Docker CLI to 27.5.1 for compatibility with Docker Engine 29.x 2026-01-14 15:26:16 +05:30
onledger.net
14d18d3258 Update cluster.sh
The bind_mesh function is hardcoding contract.roundtime=2000 (2 seconds) into the configuration incorrectly causing a duplicate roundtime setting in the default of 1000 irrespective of what contract.roundtime=2000 or what the hp.cfg.override is set to.

It should be setting this to contract.consensus.roundtime

```
cat /var/lib/docker/volumes/hpdevkit_default_vol/_data/node1/cfg/hp.cfg | grep -A10 -B5 roundtime
    "bin_args": "index.js",
    "environment": {},
    "max_input_ledger_offset": 10,
    "consensus": {
      "mode": "public",
      "roundtime": 1000,   <--------
      "stage_slice": 25,
      "threshold": 80
    },
    "npl": {
      "mode": "private"
    },
    "round_limits": {
      "user_input_bytes": 0,
      "user_output_bytes": 0,
      "npl_output_bytes": 0,
      "proc_cpu_seconds": 0,
      "proc_mem_bytes": 0,
      "proc_ofd_count": 0,
      "exec_timeout": 300000
    },
    "roundtime": 2000   <-------
  },
  "mesh": {
    "port": 22861,
    "listen": true,
    "idle_timeout": 120000,
    "known_peers": [
      "node2:22862",
      "node3:22863"
    ],
    "msg_forwarding": true,
```
2025-06-28 11:35:51 +12:00
Dulana Peiris
670b280745 Code template build script update (#35) 2024-04-02 13:40:45 +05:30
Chalith Desaman
e5446d2f99 Added force terminate to the multisig template (#33) 2024-03-15 17:59:11 +05:30
Chalith Desaman
1face50d32 Added new contract templates (#31) 2024-03-15 17:16:24 +05:30
Chalith Desaman
d74e7c70b8 Updated docker image repositories (#29) 2023-12-15 18:14:57 +05:30
Dulana Peiris
a7cb57ff13 Added License file to Docker and NPM build (#28) 2023-12-15 17:28:05 +05:30
Chalith Desaman
c6640bbdb9 Updated default docker image and package versions (#27) 2023-10-24 13:40:06 +05:30
ravinsp
a119d6ee47 Fixed port assignment issue with spawn command. 2023-05-27 06:23:24 +05:30
Ravin Perera
857d15d2be Spawn and Status commands with refactoring. (#21) 2023-05-03 15:25:18 +05:30
Chalith Desaman
2f43dd0970 Restart the deployment cluster when machine restarts (#20) 2022-11-22 10:35:56 +05:30
Udith Indrakantha
d60bc7989e Resolved bug in hpdevkit clean command. (#18) 2022-11-16 12:24:15 +05:30
ravinsp
8f65f715f9 Updated nodejs contract lib. 2022-10-22 21:07:05 +05:30
Kithmini Gunawardhana
da902c2ead Added the starter client template (#14) 2022-10-11 12:18:56 +05:30
Chalith Desaman
744b806e49 Included starter client template for bootsrap contact (#11) 2022-09-29 15:03:09 +05:30
Chalith Desaman
3362c60fe7 Port validation and avoid parallel image pulling (#8) 2022-09-07 08:47:26 +05:30
Chalith Desaman
bd84875d04 Introduce starting port number env variable (#6) 2022-09-06 09:16:28 +05:30
Udith Indrakantha
5b6bf10fdc Added bash script to launch the hp-devkit in linux (#2) 2022-08-26 13:43:14 +05:30
ravinsp
b2996fbcea Client app sample. 2022-08-21 19:36:29 +05:30
ravinsp
7e2ec90542 Blank contract. 2022-08-21 15:47:49 +05:30
ravinsp
e282484c60 Wording changes. 2022-08-12 11:40:08 +05:30
ravinsp
7d9dda7971 Updated nodejs contract lib version. 2022-07-14 21:06:12 +05:30
ravinsp
5e6d8e519a Minor updates. 2022-06-20 07:51:53 +05:30
ravinsp
e08d012efb Release with version. 2022-06-19 00:52:34 +05:30
Ravin Perera
f5c366fbd6 Added nodejs code generator. (#1) 2022-06-18 23:23:31 +05:30
ravinsp
f91fd623c5 Cluster mesh config. 2022-06-12 23:35:20 +05:30
ravinsp
d4d8cfafd7 Optmization. 2022-06-11 22:49:04 +05:30
ravinsp
ebd762628e Added config overrides. 2022-06-11 19:55:49 +05:30
ravinsp
fe33f80d2a Convenience deployment script. 2022-06-11 17:35:22 +05:30
ravinsp
68dad4954b Refactored env variables. 2022-06-11 13:19:40 +05:30
ravinsp
4205b51374 Added contract bundle sync. 2022-06-11 11:53:33 +05:30