You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: service_contracts/tools/README.md
+51-31Lines changed: 51 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,54 @@
1
1
# FilecoinWarmStorageService Deployment Scripts
2
2
3
-
This directory contains scripts for deploying and upgrading the FilecoinWarmStorageService contract on Calibration testnet.
3
+
This directory contains scripts for deploying and upgrading the FilecoinWarmStorageService contract on Calibration testnet and Mainnet.
4
4
5
5
## Scripts Overview
6
6
7
+
### Available Scripts
8
+
7
9
-`deploy-warm-storage-calibnet.sh` - Deploy FilecoinWarmStorageService only (requires existing PDPVerifier and Payments contracts)
8
-
-`deploy-all-warm-storage-calibnet.sh` - Deploy all contracts (PDPVerifier, Payments, and FilecoinWarmStorageService)
10
+
-`deploy-all-warm-storage.sh` - Deploy all contracts to either Calibnet or Mainnet
9
11
-`upgrade-warm-storage-calibnet.sh` - Upgrade existing FilecoinWarmStorageService contract with new proving period parameters
10
12
13
+
### Usage
14
+
15
+
```bash
16
+
# Deploy to Calibnet
17
+
./tools/deploy-warm-storage-calibnet.sh
18
+
19
+
# Deploy all contracts
20
+
./tools/deploy-all-warm-storage.sh
21
+
22
+
# Upgrade existing deployment
23
+
./tools/upgrade-warm-storage-calibnet.sh
24
+
```
25
+
26
+
## Deployment Parameters
27
+
28
+
The following parameters are critical for proof generation and validation. They differ between **Mainnet** (production) and **Calibnet** (testing/iteration).
|`DEFAULT_CHALLENGE_FINALITY`|`150`|`10`|**Security parameter.** Always set to `150` in production. Enforces that the challenge epoch is far enough in the future to prevent reorg-based attacks. See [PDP Implementation Design Doc](https://filoznotebook.notion.site/PDP-Implementation-Design-Doc-64a66516416441c69b9d8e5d63120f1c?pvs=21). |
33
+
|`DEFAULT_MAX_PROVING_PERIOD`|`2880`|`240`|**Product parameter.** Defines how often proofs must be submitted. Mainnet default is 2880 epochs ≈ 24h (one proof/day). On Calibnet we use shorter proving periods for faster iteration. See [Simple PDP Service Fault Model](https://filoznotebook.notion.site/Simple-PDP-Service-Fault-Model-1a9dc41950c180c4bdc7ef2d91db73b6?pvs=21). |
34
+
|`DEFAULT_CHALLENGE_WINDOW_SIZE`|`60`|`30`|**Security parameter.** Defines the grace window within the proving period. Typically ~2% of the proving period. On Mainnet: 60 epochs (≈2% of 2880). On Calibnet: 30 epochs. See [Simple PDP Service Fault Model](https://filoznotebook.notion.site/Simple-PDP-Service-Fault-Model-1a9dc41950c180c4bdc7ef2d91db73b6?pvs=21). |
35
+
36
+
### Quick Reference
37
+
38
+
-**Mainnet**
39
+
```bash
40
+
DEFAULT_CHALLENGE_FINALITY="150"# Production security value
41
+
DEFAULT_MAX_PROVING_PERIOD="2880"# 2880 epochs (≈1 proof per day)
42
+
DEFAULT_CHALLENGE_WINDOW_SIZE="60"# 60 epochs grace period
43
+
```
44
+
45
+
-**Calibnet**
46
+
```bash
47
+
DEFAULT_CHALLENGE_FINALITY="10"# Low value for fast testing (should be 150 in production)
48
+
DEFAULT_MAX_PROVING_PERIOD="240"# 240 epochs
49
+
DEFAULT_CHALLENGE_WINDOW_SIZE="30"# 30 epochs
50
+
```
51
+
11
52
## Environment Variables
12
53
13
54
### Required for all scripts:
@@ -20,16 +61,12 @@ This directory contains scripts for deploying and upgrading the FilecoinWarmStor
20
61
-`PDP_VERIFIER_ADDRESS` - Address of deployed PDPVerifier contract
21
62
-`PAYMENTS_CONTRACT_ADDRESS` - Address of deployed Payments contract
22
63
23
-
-`deploy-all-warm-storage-calibnet.sh` requires:
64
+
-`deploy-all-warm-storage.sh` requires:
24
65
-`CHALLENGE_FINALITY` - Challenge finality parameter for PDPVerifier
25
66
26
67
-`upgrade-warm-storage-calibnet.sh` requires:
27
68
-`WARM_STORAGE_SERVICE_PROXY_ADDRESS` - Address of existing FilecoinWarmStorageService proxy to upgrade
28
69
29
-
### Optional proving period configuration:
30
-
-`MAX_PROVING_PERIOD` - Maximum epochs between proofs (default: 30 epochs = 15 minutes on calibnet)
31
-
-`CHALLENGE_WINDOW_SIZE` - Challenge window size in epochs (default: 15 epochs)
32
-
33
70
## Usage Examples
34
71
35
72
### Fresh Deployment (All Contracts)
@@ -38,13 +75,13 @@ This directory contains scripts for deploying and upgrading the FilecoinWarmStor
0 commit comments