Skip to content

Commit 512297b

Browse files
authored
Merge pull request #3 from bobanetwork/op-succinct-upstream
Fix docker context
2 parents c6a5929 + 766638d commit 512297b

File tree

6 files changed

+25
-18
lines changed

6 files changed

+25
-18
lines changed

book/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- [L2 Node Setup](./advanced/node-setup.md)
1414
- [Block Data CLI Tool](./advanced/block-data.md)
1515
- [Proposer](./advanced/proposer.md)
16+
- [Kurtosis](./advanced/kurtosis.md)
1617
- [Upgrade to a new `op-succinct` version](./advanced/upgrade.md)
1718
- [`OPSuccinctL2OutputOracle`](./contracts/intro.md)
1819
- [Configuration](./contracts/configuration.md)

book/contracts/configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ You can configure additional parameters when deploying or upgrading the `OPSucci
2525
| `STARTING_BLOCK_NUMBER` | Default: The finalized block number on L2. The block number to initialize the contract from. OP Succinct will start proving state roots from this block number. |
2626
| `SUBMISSION_INTERVAL` | Default: `1000`. The minimum interval in L2 blocks at which checkpoints must be submitted. An aggregation proof can be posted for any range larger than this interval. |
2727
| `FINALIZATION_PERIOD_SECS` | Default: `3600` (1 hour). The time period (in seconds) after which a proposed output becomes finalized and withdrawals can be processed. |
28-
| `PROPOSER` | Default: The address of the account associated with `PRIVATE_KEY`. An Ethereum address authorized to submit proofs. Set to `address(0)` to allow permissionless submissions. **Note: Use `addProposer` and `removeProposer` functions to update the list of approved proposers.** |
29-
| `CHALLENGER` | Default: `address(0)`, no one can dispute proofs. Ethereum address authorized to dispute proofs. |
30-
| `OWNER` | Default: The address of the account associated with `PRIVATE_KEY`. Ethereum address authorized to update the `aggregationVkey`, `rangeVkeyCommitment`, `verifier`, and `rollupConfigHash` parameters. Can also transfer ownership of the contract and update the approved proposers. In a production setting, set to the governance smart contract or multi-sig of the chain. |
28+
| `PROPOSER` | Default: The address of the account associated with `PRIVATE_KEY`. If `PRIVATE_KEY` is not set, `address(0)`. An Ethereum address authorized to submit proofs. Set to `address(0)` to allow permissionless submissions. **Note: Use `addProposer` and `removeProposer` functions to update the list of approved proposers.** |
29+
| `CHALLENGER` | Default: The address of the account associated with `PRIVATE_KEY`. If `PRIVATE_KEY` is not set, `address(0)`. Ethereum address authorized to dispute proofs. Set to `address(0)` for no challenging. |
30+
| `OWNER` | Default: The address of the account associated with `PRIVATE_KEY`. If `PRIVATE_KEY` is not set, `address(0)`. Ethereum address authorized to update the `aggregationVkey`, `rangeVkeyCommitment`, `verifier`, and `rollupConfigHash` parameters. Can also transfer ownership of the contract and update the approved proposers. In a production setting, set to the governance smart contract or multi-sig of the chain. |

book/contracts/upgrade.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Similar to the `L2OutputOracle` contract, the `OPSuccinctL2OutputOracle` is mana
44

55
## 1. Decide on the target `OPSuccinctL2OutputOracle` contract code
66

7-
### (Recommanded) Using `OPSuccinctL2OutputOracle` from a release
7+
### (Recommended) Using `OPSuccinctL2OutputOracle` from a release
88

99
Check out the latest release of `op-succinct` from [here](https://github.com/succinctlabs/op-succinct/releases). You can always find the latest version of the `OPSuccinctL2OutputOracle` on the latest release.
1010

proposer/op/proposer/range.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ func (l *L2OutputSubmitter) GetRangeProofBoundaries(ctx context.Context) error {
189189
// splitting algorithm. Otherwise, we use the simple range splitting algorithm.
190190
safeDBActivated, err := l.isSafeDBActivated(ctx, rollupClient)
191191
if err != nil {
192-
return fmt.Errorf("failed to check if safeDB is activated: %w", err)
192+
l.Log.Warn("safeDB is not activated. Using simple range splitting algorithm.", "err", err)
193193
}
194194

195195
var spans []Span

proposer/succinct/bin/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ async fn request_mock_span_proof(
316316
// Start the server and native client with a timeout.
317317
// Note: Ideally, the server should call out to a separate process that executes the native
318318
// host, and return an ID that the client can poll on to check if the proof was submitted.
319-
let mut witnessgen_executor = WitnessGenExecutor::default();
319+
let mut witnessgen_executor = WitnessGenExecutor::new(WITNESSGEN_TIMEOUT, RunContext::Docker);
320320
witnessgen_executor.spawn_witnessgen(&host_cli).await?;
321321
// Log any errors from running the witness generation process.
322322
let res = witnessgen_executor.flush().await;

scripts/utils/bin/fetch_rollup_config.rs

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ struct L2OOConfig {
3434
range_vkey_commitment: String,
3535
}
3636

37+
/// If the environment variable is set for the address, return it. Otherwise, return the address associated with the private key. If the private key is not set, return the zero address.
38+
fn get_address(env_var: &str) -> String {
39+
let private_key = env::var("PRIVATE_KEY").unwrap_or_else(|_| B256::ZERO.to_string());
40+
41+
env::var(env_var).unwrap_or_else(|_| {
42+
if private_key == B256::ZERO.to_string() {
43+
Address::ZERO.to_string()
44+
} else {
45+
let signer: PrivateKeySigner = private_key.parse().unwrap();
46+
signer.address().to_string()
47+
}
48+
})
49+
}
50+
3751
/// Update the L2OO config with the rollup config hash and other relevant data before the contract is deployed.
3852
///
3953
/// Specifically, updates the following fields in `opsuccinctl2ooconfig.json`:
@@ -102,18 +116,10 @@ async fn update_l2oo_config() -> Result<()> {
102116
.map(|p| p.parse().unwrap())
103117
.unwrap_or(DEFAULT_FINALIZATION_PERIOD_SECS);
104118

105-
let private_key = env::var("PRIVATE_KEY").unwrap_or_else(|_| B256::ZERO.to_string());
106-
let (proposer, owner) = if private_key == B256::ZERO.to_string() {
107-
(Address::ZERO.to_string(), Address::ZERO.to_string())
108-
} else {
109-
let signer: PrivateKeySigner = private_key.parse().expect("Failed to parse private key");
110-
let signer_address = signer.address().to_string();
111-
(
112-
env::var("PROPOSER").unwrap_or(signer_address.clone()),
113-
env::var("OWNER").unwrap_or(signer_address),
114-
)
115-
};
116-
let challenger = env::var("CHALLENGER").unwrap_or(Address::ZERO.to_string());
119+
// Default to the address associated with the private key if the environment variable is not set. If private key is not set, default to zero address.
120+
let proposer = get_address("PROPOSER");
121+
let owner = get_address("OWNER");
122+
let challenger = get_address("CHALLENGER");
117123

118124
let prover = ProverClient::new();
119125
let (_, agg_vkey) = prover.setup(AGG_ELF);

0 commit comments

Comments
 (0)