Commit cf5cd27
authored
feat(staking-cli): add mainnet support and metadata validation (#3922)
* feat(staking-cli): add mainnet support and metadata validation
Mainnet support:
- Add config.mainnet.toml with mainnet contract addresses
- Add Network enum (Mainnet, Decaf, Local) for init command
- Update init command to require --network parameter
- Update README with mainnet contract addresses and Docker usage
Metadata validation:
- Add NodeMetadataContent schema types for metadata validation
- Add validate_metadata_uri function with 5s timeout
- Add --skip-metadata-validation flag to bypass validation
- Add --consensus-public-key parameter for update-metadata-uri
- Add parse_bls_pub_key helper function
- Include --skip-metadata-validation hint in error messages
Contract deployer:
- Add configurable deploy cooldown via --post-deployment-cooldown
- Refactor Contracts struct to use explicit fields instead of Deref
Tests:
- Add metadata validation tests for register-validator and update-metadata-uri
- Remove unnecessary spawn_blocking from metadata validation tests
- Add bls_public_key_str helper to TestSystemExt
Documentation:
- Major README update with improved formatting and examples
- Document metadata validation and schema requirements
- Add calldata export documentation
* fix: contracts API for dev node
* refactor(staking-cli): deduplicate generate_bls_pub_key test helper
Move generate_bls_pub_key to module level with #[cfg(test)] so both
test and validation_tests modules can share it.
* test(staking-cli): add test for missing signer error
Verify that running a command without providing any signer
(--mnemonic, --private-key, or --ledger) fails with an appropriate
error message.
* fix(staking-cli): config command shows helpful message when no file exists
Previously the config command would print "Config file at X" and show
default values even when no config file existed. Now it correctly
detects missing files and suggests running init.
* docs(staking-cli): document multi-network config file usage
Add section explaining how to use the -c flag to maintain separate
config files for different networks (mainnet, decaf). Also clarify
that config files are optional and what happens when none exists.1 parent 1b62667 commit cf5cd27
File tree
15 files changed
+1235
-163
lines changed- contracts/rust/deployer/src
- sequencer/src/bin
- staking-cli
- src
- tests
- common
15 files changed
+1235
-163
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | 150 | | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
278 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
279 | 293 | | |
280 | 294 | | |
281 | 295 | | |
| |||
337 | 351 | | |
338 | 352 | | |
339 | 353 | | |
340 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
341 | 358 | | |
342 | 359 | | |
343 | 360 | | |
344 | 361 | | |
345 | 362 | | |
346 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
347 | 375 | | |
348 | 376 | | |
349 | 377 | | |
350 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
351 | 391 | | |
352 | 392 | | |
353 | 393 | | |
| |||
358 | 398 | | |
359 | 399 | | |
360 | 400 | | |
361 | | - | |
| 401 | + | |
362 | 402 | | |
363 | 403 | | |
364 | 404 | | |
| |||
377 | 417 | | |
378 | 418 | | |
379 | 419 | | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
384 | 424 | | |
385 | | - | |
| 425 | + | |
386 | 426 | | |
387 | 427 | | |
388 | 428 | | |
389 | 429 | | |
390 | 430 | | |
391 | | - | |
| 431 | + | |
392 | 432 | | |
393 | 433 | | |
394 | 434 | | |
| |||
2316 | 2356 | | |
2317 | 2357 | | |
2318 | 2358 | | |
2319 | | - | |
| 2359 | + | |
2320 | 2360 | | |
2321 | 2361 | | |
2322 | 2362 | | |
| |||
4486 | 4526 | | |
4487 | 4527 | | |
4488 | 4528 | | |
4489 | | - | |
| 4529 | + | |
4490 | 4530 | | |
4491 | 4531 | | |
4492 | 4532 | | |
| |||
4566 | 4606 | | |
4567 | 4607 | | |
4568 | 4608 | | |
4569 | | - | |
| 4609 | + | |
4570 | 4610 | | |
4571 | 4611 | | |
4572 | 4612 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
408 | 418 | | |
409 | 419 | | |
410 | 420 | | |
| |||
432 | 442 | | |
433 | 443 | | |
434 | 444 | | |
| 445 | + | |
| 446 | + | |
435 | 447 | | |
436 | 448 | | |
437 | 449 | | |
| |||
0 commit comments