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: src/content/docs/en/sdk/guides/digital-ocean-alt-gas-token.mdx
+180Lines changed: 180 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -529,6 +529,186 @@ controller:
529
529
530
530
Some services do not support this without additional configurations (for example, `l2-sequencer` and `l2-bootnode`). We are working on additional info on how to properly run multiple services for loadbalancing between or for having redunant backups available.
531
531
532
+
### Enable Proof Generation using External Providers
533
+
534
+
The Scroll team has been collaborating closely with teams specializing in proof generation to enable plug-and-play proof generation for SDK networks.
535
+
536
+
In this example, we'll use a sample chart from the `scroll-proving-sdk` repo to generate proofs with [Sindri](https://sindri.app/docs/introduction/). In the future, teams will publish their own charts for chains to easily enable one or external providers.
537
+
538
+
Because this feature is not directly built into the Scroll SDK, there will be quite a bit of copy-pasting.
539
+
540
+
#### Creating Values Files for each type of Provider
541
+
542
+
In Scroll, we have 3 types of provers: chunk (type-1), batch (type-2), and bundle (type-3). We'll deploy 3 sets of the chart, each with a different type of prover.
543
+
544
+
Create the following files in your `values` directory:
545
+
546
+
`prover-chunk-production.yaml`:
547
+
```yaml
548
+
global:
549
+
nameOverride: &app_name prover-chunk
550
+
fullnameOverride: *app_name
551
+
552
+
persistence:
553
+
config:
554
+
enabled: true
555
+
type: configMap
556
+
mountPath: /sdk_prover/
557
+
name: prover-chunk-config
558
+
559
+
scrollConfig: |
560
+
{
561
+
"prover_name_prefix": "sindri_chunk_",
562
+
"keys_dir": "keys",
563
+
"coordinator": {
564
+
"base_url": "http://coordinator-api:80",
565
+
"retry_count": 3,
566
+
"retry_wait_time_sec": 5,
567
+
"connection_timeout_sec": 60
568
+
},
569
+
"l2geth": {
570
+
"endpoint": "http://l2-rpc:8545"
571
+
},
572
+
"prover": {
573
+
"circuit_type": 1,
574
+
"circuit_version": "v0.13.1",
575
+
"n_workers": 1,
576
+
"cloud": {
577
+
"base_url": "https://sindri.app/api/v1/",
578
+
"api_key": "<your-api-key>",
579
+
"retry_count": 3,
580
+
"retry_wait_time_sec": 5,
581
+
"connection_timeout_sec": 60
582
+
}
583
+
}
584
+
}
585
+
```
586
+
587
+
`prover-batch-production.yaml`:
588
+
```yaml
589
+
global:
590
+
nameOverride: &app_name prover-batch
591
+
fullnameOverride: *app_name
592
+
593
+
persistence:
594
+
config:
595
+
enabled: true
596
+
type: configMap
597
+
mountPath: /sdk_prover/
598
+
name: prover-batch-config
599
+
600
+
scrollConfig: |
601
+
{
602
+
"prover_name_prefix": "sindri_batch_",
603
+
"keys_dir": "keys",
604
+
"coordinator": {
605
+
"base_url": "http://coordinator-api:80",
606
+
"retry_count": 3,
607
+
"retry_wait_time_sec": 5,
608
+
"connection_timeout_sec": 60
609
+
},
610
+
"l2geth": {
611
+
"endpoint": "http://l2-rpc:8545"
612
+
},
613
+
"prover": {
614
+
"circuit_type": 2,
615
+
"circuit_version": "v0.13.1",
616
+
"n_workers": 1,
617
+
"cloud": {
618
+
"base_url": "https://sindri.app/api/v1/",
619
+
"api_key": "<your-api-key>",
620
+
"retry_count": 3,
621
+
"retry_wait_time_sec": 5,
622
+
"connection_timeout_sec": 60
623
+
}
624
+
}
625
+
}
626
+
627
+
```
628
+
629
+
`prover-bundle-production.yaml`:
630
+
```yaml
631
+
global:
632
+
nameOverride: &app_name prover-bundle
633
+
fullnameOverride: *app_name
634
+
635
+
persistence:
636
+
config:
637
+
enabled: true
638
+
type: configMap
639
+
mountPath: /sdk_prover/
640
+
name: prover-bundle-config
641
+
642
+
scrollConfig: |
643
+
{
644
+
"prover_name_prefix": "sindri_bundle_",
645
+
"keys_dir": "keys",
646
+
"coordinator": {
647
+
"base_url": "http://coordinator-api:80",
648
+
"retry_count": 3,
649
+
"retry_wait_time_sec": 5,
650
+
"connection_timeout_sec": 60
651
+
},
652
+
"l2geth": {
653
+
"endpoint": "http://l2-rpc:8545"
654
+
},
655
+
"prover": {
656
+
"circuit_type": 3,
657
+
"circuit_version": "v0.13.1",
658
+
"n_workers": 1,
659
+
"cloud": {
660
+
"base_url": "https://sindri.app/api/v1/",
661
+
"api_key": "<your-api-key>",
662
+
"retry_count": 3,
663
+
"retry_wait_time_sec": 5,
664
+
"connection_timeout_sec": 60
665
+
}
666
+
}
667
+
}
668
+
669
+
```
670
+
671
+
Be sure to set `prover.api_key` to the value created in Sindri's user dashboard.
672
+
673
+
Notice that each file is similar, with only the `prover.circuit_type` and few name values changing.
674
+
675
+
Lastly, set `prover.n_workers` to the number of provers you'd like to dedicate to proof generation. We recommend starting at 1 for each during testing, but scaling up as needed.
676
+
677
+
#### Adding Provers to your Makefile
678
+
679
+
Now, let's add the prover services to the bottom of your `Makefile`.
Now, simply run `make install-provers` to deploy the provers.
702
+
703
+
<Aside type="tip">
704
+
The default timeout for chunk proofs may be too short, causing the rollup-node to finalize using an empty proof before it receives a completed proof.
705
+
706
+
You can modify the `config.toml` values of `TEST_ENV_MOCK_FINALIZE_ENABLED` and `TEST_ENV_MOCK_FINALIZE_TIMEOUT_SEC` to disable or lengthen the timeout for mock proof submission.
707
+
</Aside>
708
+
709
+
{/* TODO: Update to point at actual charts once available. */}
710
+
711
+
532
712
{/* ### TODO: Add Graphana charts for Monitoring
533
713
534
714
To quickly get started with Grafana, run the following command:
0 commit comments