@@ -40,3 +40,191 @@ Before running the script, ensure you have the following installed:
40
40
41
41
- [ Docker] ( https://www.docker.com/get-started ) (required for running SchemaSpy)
42
42
- [ Sqlx CLI] ( https://github.com/launchbadge/sqlx/tree/main/sqlx-cli ) (required for running migrations)
43
+
44
+ ## Configuration
45
+
46
+ The Fuel Block Committer is configured primarily through environment variables.
47
+
48
+ ### Environment Variables
49
+
50
+ #### Ethereum (ETH) Configuration
51
+
52
+ - ** ` COMMITTER__ETH__L1_KEYS__MAIN ` **
53
+
54
+ - ** Description:** The Ethereum key authorized by the L1 fuel chain state contract to post block commitments.
55
+ - ** Format:** ` Kms(<KEY_ARN>) ` or ` Private(<PRIVATE_KEY>) `
56
+ - ** Example:** ` Kms(arn:aws:kms:us-east-1:123456789012:key/abcd-1234) `
57
+
58
+ - ** ` COMMITTER__ETH__L1_KEYS__BLOB ` **
59
+
60
+ - ** Description:** (Optional) The Ethereum key for posting L2 state to L1.
61
+ - ** Format:** ` Kms(<KEY_ARN>) ` or ` Private(<PRIVATE_KEY>) `
62
+ - ** Example:** ` Kms(arn:aws:kms:us-east-1:123456789012:key/efgh-5678) `
63
+
64
+ - ** ` COMMITTER__ETH__RPC ` **
65
+
66
+ - ** Description:** URL to the Ethereum RPC endpoint.
67
+ - ** Example:** ` https://mainnet.infura.io/v3/YOUR_INFURA_PROJECT_ID `
68
+
69
+ - ** ` COMMITTER__ETH__STATE_CONTRACT_ADDRESS ` **
70
+ - ** Description:** Ethereum address of the Fuel chain state contract.
71
+ - ** Example:** ` 0xYourStateContractAddress `
72
+
73
+ #### Fuel Configuration
74
+
75
+ - ** ` COMMITTER__FUEL__GRAPHQL_ENDPOINT ` **
76
+
77
+ - ** Description:** URL to a Fuel Core GraphQL endpoint.
78
+ - ** Example:** ` http://localhost:4000/graphql `
79
+
80
+ - ** ` COMMITTER__FUEL__NUM_BUFFERED_REQUESTS ` **
81
+ - ** Description:** Number of concurrent http requests towards the fuel node.
82
+ - ** Type:** Positive integer
83
+ - ** Example:** ` 5 `
84
+
85
+ #### Database (DB) Configuration
86
+
87
+ - ** ` COMMITTER__APP__DB__HOST ` **
88
+
89
+ - ** Description:** Hostname or IP address of the PostgreSQL server.
90
+ - ** Example:** ` localhost `
91
+
92
+ - ** ` COMMITTER__APP__DB__PORT ` **
93
+
94
+ - ** Description:** Port number on which the PostgreSQL server is listening.
95
+ - ** Type:** ` u16 `
96
+ - ** Example:** ` 5432 `
97
+
98
+ - ** ` COMMITTER__APP__DB__USERNAME ` **
99
+
100
+ - ** Description:** Username for authenticating with the PostgreSQL server.
101
+ - ** Example:** ` username `
102
+
103
+ - ** ` COMMITTER__APP__DB__PASSWORD ` **
104
+
105
+ - ** Description:** Password for authenticating with the PostgreSQL server.
106
+ - ** Example:** ` password `
107
+
108
+ - ** ` COMMITTER__APP__DB__DATABASE ` **
109
+
110
+ - ** Description:** Name of the database to connect to on the PostgreSQL server.
111
+ - ** Example:** ` fuel_db `
112
+
113
+ - ** ` COMMITTER__APP__DB__MAX_CONNECTIONS ` **
114
+
115
+ - ** Description:** Maximum number of connections allowed in the connection pool.
116
+ - ** Type:** ` u32 `
117
+ - ** Example:** ` 10 `
118
+
119
+ - ** ` COMMITTER__APP__DB__USE_SSL ` **
120
+ - ** Description:** Whether to use SSL when connecting to the PostgreSQL server.
121
+ - ** Type:** ` bool `
122
+ - ** Values:** ` true ` or ` false `
123
+ - ** Example:** ` false `
124
+
125
+ #### Application (App) Configuration
126
+
127
+ - ** ` COMMITTER__APP__PORT ` **
128
+
129
+ - ** Description:** Port used by the started server.
130
+ - ** Type:** ` u16 `
131
+ - ** Example:** ` 8080 `
132
+
133
+ - ** ` COMMITTER__APP__HOST ` **
134
+
135
+ - ** Description:** IPv4 address on which the server will listen for connections.
136
+ - ** Example:** ` 127.0.0.1 `
137
+
138
+ - ** ` COMMITTER__APP__BLOCK_CHECK_INTERVAL ` **
139
+
140
+ - ** Description:** How often to check for new fuel blocks.
141
+ - ** Format:** Human-readable duration (e.g., ` 5s ` , ` 1m ` )
142
+ - ** Example:** ` 5s `
143
+
144
+ - ** ` COMMITTER__APP__TX_FINALIZATION_CHECK_INTERVAL ` **
145
+
146
+ - ** Description:** How often to check for finalized L1 transactions.
147
+ - ** Format:** Human-readable duration
148
+ - ** Example:** ` 5s `
149
+
150
+ - ** ` COMMITTER__APP__NUM_BLOCKS_TO_FINALIZE_TX ` **
151
+
152
+ - ** Description:** Number of L1 blocks that need to pass to accept the transaction as finalized.
153
+ - ** Type:** ` u64 `
154
+ - ** Example:** ` 3 `
155
+
156
+ - ** ` COMMITTER__APP__GAS_BUMP_TIMEOUT ` **
157
+
158
+ - ** Description:** Interval after which to bump a pending transaction.
159
+ - ** Format:** Human-readable duration
160
+ - ** Example:** ` 300s `
161
+
162
+ - ** ` COMMITTER__APP__TX_MAX_FEE ` **
163
+
164
+ - ** Description:** Maximum gas fee permitted for a transaction in wei.
165
+ - ** Type:** ` u64 `
166
+ - ** Example:** ` 4000000000000000 `
167
+
168
+ - ** ` COMMITTER__APP__SEND_TX_REQUEST_TIMEOUT ` **
169
+ - ** Description:** Duration for timeout when sending transaction requests.
170
+ - ** Format:** Human-readable duration
171
+ - ** Example:** ` 10s `
172
+
173
+ #### Bundle Configuration
174
+
175
+ - ** ` COMMITTER__APP__BUNDLE__ACCUMULATION_TIMEOUT ` **
176
+
177
+ - ** Description:** Duration to wait for additional fuel blocks before initiating the bundling process.
178
+ - ** Format:** Human-readable duration
179
+ - ** Example:** ` 30s `
180
+
181
+ - ** ` COMMITTER__APP__BUNDLE__BLOCKS_TO_ACCUMULATE ` **
182
+
183
+ - ** Description:** Number of fuel blocks to accumulate before initiating the bundling process.
184
+ - ** Type:** Positive integer
185
+ - ** Example:** ` 5 `
186
+
187
+ - ** ` COMMITTER__APP__BUNDLE__OPTIMIZATION_TIMEOUT ` **
188
+
189
+ - ** Description:** Maximum duration allocated for determining the optimal bundle size.
190
+ - ** Format:** Human-readable duration
191
+ - ** Example:** ` 60s `
192
+
193
+ - ** ` COMMITTER__APP__BUNDLE__COMPRESSION_LEVEL ` **
194
+
195
+ - ** Description:** Compression level used for compressing block data before submission.
196
+ - ** Values:** ` "disabled" ` , ` "min" ` , ` "level1" ` ..` "level9" ` , ` "max" `
197
+ - ** Example:** ` "min" `
198
+
199
+ - ** ` COMMITTER__APP__BUNDLE__OPTIMIZATION_STEP ` **
200
+
201
+ - ** Description:** Size of the optimization step at the start of the optimization process.
202
+ - ** Type:** Positive integer (` NonZeroUsize ` )
203
+ - ** Example:** ` 100 `
204
+
205
+ - ** ` COMMITTER__APP__BUNDLE__FRAGMENTS_TO_ACCUMULATE ` **
206
+
207
+ - ** Description:** Number of fragments to accumulate before submitting them in a transaction to L1.
208
+ - ** Type:** Positive integer (` NonZeroUsize ` )
209
+ - ** Example:** ` 6 `
210
+
211
+ - ** ` COMMITTER__APP__BUNDLE__FRAGMENT_ACCUMULATION_TIMEOUT ` **
212
+
213
+ - ** Description:** Duration to wait for additional fragments before submitting them.
214
+ - ** Format:** Human-readable duration
215
+ - ** Example:** ` 30s `
216
+
217
+ - ** ` COMMITTER__APP__BUNDLE__NEW_BUNDLE_CHECK_INTERVAL ` **
218
+ - ** Description:** Duration to wait before checking if a new bundle can be made.
219
+ - ** Format:** Human-readable duration
220
+ - ** Example:** ` 15s `
221
+
222
+ ### Configuration Validation
223
+
224
+ The committer performs validation on the provided configuration to ensure consistency and correctness. For example:
225
+
226
+ - ** Wallet Keys:** The main wallet key and blob pool wallet key must be different.
227
+ - ** Fragments to Accumulate:** Must be less than or equal to 6.
228
+ - ** Block Height Lookback:** Must be greater than or equal to the number of blocks to accumulate.
229
+
230
+ If any validation fails, the committer will return an error, preventing it from running with invalid settings.
0 commit comments