Skip to content

Commit

Permalink
Merge branch 'master' into derrek/docs-update-gateway-roadmap
Browse files Browse the repository at this point in the history
  • Loading branch information
derrekcoleman committed Dec 13, 2024
2 parents 0e90a9f + 1af9640 commit 7ed3354
Show file tree
Hide file tree
Showing 17 changed files with 226 additions and 16 deletions.
12 changes: 6 additions & 6 deletions docs/docs/drafts/vision.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@ When using Ethereum rollups, Ethereum becomes a co-processor to Bitcoin where th
We see a staged approach to make use of the rollup PoW:

- **Stage 1**: Dapps deployed on an EVM rollup can check the submitted PoW to the rollup and customize their interpretation. For example, a ordinals P2P exchange might want to pause their platform if insufficient PoW is attached to the rollup, Other dapps might ignore the PoW alltogether, making the model quite flexible.
- **Stage 2**: Merged minig becomes a condition for a valid state transition of the rollup. Assuming that a rollup is launched on an L1 with smart contracts like Ethereum, the sequencer needs to ensure that at certain intervals a sufficient PoW is added. The rollup would be paused and its state could be invalidated through including the PoW as part of the fraud proofs (in optimistic rollups) and validity proofs (in zk rollups). Requiring PoW as part of a valid state transition for the rollup ensures that the state transition of the rollup on say Ethereum cannot settle without the explicit consent from Bitcoin miners.
- **Stage 3**: Staking sequencers on Bitcoin and proving incorrect behavior through BitVM, one-time signatures, and other techniques ensures that sequencers are ecnomically incentivized on Bitcoin to correctly produce L2 blocks.
- **Stage 2**: Merged mining becomes a condition for a valid state transition of the rollup. Assuming that a rollup is launched on an L1 with smart contracts like Ethereum, the sequencer needs to ensure that at certain intervals a sufficient PoW is added. The rollup would be paused and its state could be invalidated through including the PoW as part of the fraud proofs (in optimistic rollups) and validity proofs (in zk rollups). Requiring PoW as part of a valid state transition for the rollup ensures that the state transition of the rollup on say Ethereum cannot settle without the explicit consent from Bitcoin miners.
- **Stage 3**: Staking sequencers on Bitcoin and proving incorrect behavior through BitVM, one-time signatures, and other techniques ensures that sequencers are economically incentivized on Bitcoin to correctly produce L2 blocks.
- **Stage 4**: In the final stage, the rollup transitions to a fully zk-verified rollup that can then be verified by Bitcoin consensus without merged mining. We expect this to take about five years from now as it will require zk technology to mature and Bitcoin made capable of verifying zk proofs.

:::info
We will share a technical paper on optimistic sequenced merged mining detailing the technical protocol soon.
:::

:::note BOB Launch PLan
:::note BOB Launch Plan
BOB launches as an optimistic rollup using the OP Stack which may seem counterintuitive to the above goal of eventually being a ZK rollup. However, we see having full EVM compatibility and tooling a worthwhile trade-off to adopting zkEVM rollups. Moreover, we see promising progress around abstracting the entire EVM execution into higher level zkVM like Risc Zero. Executing entire rollup blocks in a zkVM requires no changes to the EVM while still allowing validity proof production that then can eventually be used for a Bitcoin-verified ZK rollup.

We further will launch the merged mining option shortly after BOB will go live in the stage 1 option described above.
:::

## Usable Decentralization

Centralization is plaguing development on Bitcoin today. Due to Bitcoin's limited programmability, many applications building on Bitcoin, like the majority of Lightning wallets, are centralized as it allows for a better UX than their dencentralized counterparts.
Centralization is plaguing development on Bitcoin today. Due to Bitcoin's limited programmability, many applications building on Bitcoin, like the majority of Lightning wallets, are centralized as it allows for a better UX than their decentralized counterparts.

Lack of decentalized appliocations with great UX is a major issue that can be resolved by (1) allowing more epxressive smart contracts and piggy-backing off of the developments made on Ethereum and other L1 chains, and (2) ensuring that the EVM rollups are still secured by Bitcoin.
Lack of decentralized applications with great UX is a major issue that can be resolved by (1) allowing more expressive smart contracts and piggy-backing off of the developments made on Ethereum and other L1 chains, and (2) ensuring that the EVM rollups are still secured by Bitcoin.

### Adoption Through UX

Expand All @@ -65,7 +65,7 @@ Lack of decentalized appliocations with great UX is a major issue that can be re
- Complex programs like a BRC20 or Ordinals co-processor should be operated off-chain and its correct execution proven on-chain
- Simple programs can be kept on-chain

## Briding BTC, Ordinals, and BRC20s
## Bridging BTC, Ordinals, and BRC20s

We believe that in some cases, bridging BTC, Ordinals, and BRC20s to more chains with higher programmability than Bitcoin is required.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ There are interesting use cases that account abstraction enables being pushed by

- [Privy](https://docs.privy.io/): Privy allows users to choose from traditional crypto wallets and social logins to create accounts.
- [Safe](https://docs.safe.global/getting-started/readme): Safe allows complex multi-sig setups, simple authentication, and onramping.
- [Pimlico](https://pimlico.notion.site/Product-Directory-5d92fe60243b4c5aac6650de390e7cb3): Pimlico tracks several products around account abstraction and it is worthwhile checking out the rapid and new developments in this space.
- [Pimlico](https://docs.pimlico.io/): Pimlico tracks several products around account abstraction and it is worthwhile checking out the rapid and new developments in this space.

## Local development

Expand Down
150 changes: 148 additions & 2 deletions docs/docs/learn/builder-guides/full-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ sidebar_label: Run a Full Node

# Run a Full Node

:::warning Holocene Upgrade on January 9th, 2025
The Optimism Fork (Holocene) will be activated on ​Mainnet​ on ​`Thu 09 Jan 2025 18:00:01 UTC`

Prior to the update, update your nodes to:

- run op-geth >= [v1.101411.2](https://pylonlinks.com/link?url=https%3A%2F%2Fgithub.com%2Fethereum-optimism%2Fop-geth%2Freleases%2Ftag%2Fv1.101411.2&utm_campaign_id=b0864ff3-1c35-4e96-87fc-2c2706284a23&utm_slack_channel=C081M8AV61K)
- run op-node >= [v1.10.0](https://pylonlinks.com/link?url=https%3A%2F%2Fgithub.com%2Fethereum-optimism%2Foptimism%2Freleases%2Ftag%2Fop-node%252Fv1.10.0&utm_campaign_id=b0864ff3-1c35-4e96-87fc-2c2706284a23&utm_slack_channel=C081M8AV61K)
- set on both the flag `--override.holocene=1736445601`

**If you are not using the previous fork, Granite, on your nodes, please reach out** (check the following flag is set `​--override.granite​`). In that case, you might need to enable the Granite hard fork flags two days before on `​Tue 07 Jan 2025 18:00:01 UTC​`. You can use the same software version and configure it with `​--override.granite=1736272801`
:::

:::info
There is no protocol level incentive to run a BOB full node. If you’re interested in accessing the BOB chain, but you don’t want to set up your own node, see our [Node Providers](/learn/reference/tools/node-providers) to get RPC access to fully-managed nodes hosted by a third-party provider.
:::
Expand All @@ -18,13 +30,147 @@ As of August 2024 we recommend you have at least the following hardware configur

Software stack:

- [Python 3](https://www.python.org/downloads/)
- [Docker](https://docs.docker.com/engine/install/)
- [Docker Compose](https://docs.docker.com/compose/install/)

## Configuration

We provide a simple docker-compose configuration to get you started. This guide assumes all data will be stored under `/opt/`.

1. Retrieve BOB mainnet chain configuration.

*genesis.json*
`wget -O /opt/genesis.json "https://api.conduit.xyz/file/getOptimismGenesisJSON?network=036d1667-e469-424e-9db9-5b09cf4d460d&organization=610ec5c5-8b4c-444a-b2b4-a94c1835defe"
`

*rollup.json*
```json
{
"genesis": {
"l1": {
"hash": "0x218132178d65c4bc490aadd93c31535326043fe1fe8fea2d87f26c1da83d45c2",
"number": 19634321
},
"l2": {
"hash": "0x8ed4903b7f9c3f7bb7a09374d63ae9c9852cd9aab1784b433c41dbeb47b4dba2",
"number": 0
},
"l2_time": 1712861987,
"system_config": {
"batcherAddr": "0x08f9f14ff43e112b18c96f0986f28cb1878f1d11",
"overhead": "0x00000000000000000000000000000000000000000000000000000000000000bc",
"scalar": "0x00000000000000000000000000000000000000000000000000000000000a6fe0",
"gasLimit": 30000000
}
},
"block_time": 2,
"max_sequencer_drift": 600,
"seq_window_size": 3600,
"channel_timeout": 300,
"l1_chain_id": 1,
"l2_chain_id": 60808,
"regolith_time": 0,
"canyon_time": 0,
"delta_time": 0,
"ecotone_time": 0,
"batch_inbox_address": "0x3a75346f81302aac0333fb5dcdd407e12a6cfa83",
"deposit_contract_address": "0x8adee124447435fe03e3cd24df3f4cae32e65a3e",
"l1_system_config_address": "0xacb886b75d76d1c8d9248cfddfa09b70c71c5393",
"protocol_versions_address": "0x0000000000000000000000000000000000000000"
}
```

2. Create all the necessary configuration files in the same directory as the docker-compose.yml file.

*op-geth.env*
```
GETH_SNAPSHOT=false
GETH_DISCOVERY_V4=true
GETH_DATADIR=/opt/op-geth/
GETH_ROLLUP_SEQUENCERHTTP=https://rpc.gobob.xyz
GETH_ROLLUP_HISTORICALRPC=https://rpc.gobob.xyz
GETH_SYNCMODE=full
GETH_STATE_SCHEME=path
GETH_OVERRIDE_FJORD=1720627201
GETH_DB_ENGINE=pebble
GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
GETH_HTTP=true
GETH_HTTP_API=web3,debug,eth,txpool,net,engine
GETH_WS=true
GETH_WS_API=web3,debug,eth,txpool,net,engine
GETH_METRICS=true
GETH_AUTHRPC_JWTSECRET=/opt/op-geth/geth/jwtsecret.hex
```

*op-node.env*
Ensure you have an Ethereum L1 full node RPC available and set `OP_NODE_L1_ETH_RPC` & `OP_NODE_L1_BEACON` to the respective RPC endpoints.
```
OP_NODE_L1_ETH_RPC=.....
OP_NODE_L1_BEACON=......
OP_NODE_L1_RPC_KIND=standard
OP_NODE_L1_TRUST_RPC=true
OP_NODE_LOG_LEVEL=INFO
OP_NODE_P2P_BOOTNODES=enode://09acd29625beb40604b12b1c2194d6d5eb290aee03e0149675201ed717ce226c506671f46fcd440ce6f5e62dc4e059ffe88bcd931f2febcd22520ae7b9d00b5e@34.83.120.192:9222?discport=30301,enode://d25ce99435982b04d60c4b41ba256b84b888626db7bee45a9419382300fbe907359ae5ef250346785bff8d3b9d07cd3e017a27e2ee3cfda3bcbb0ba762ac9674@bootnode.conduit.xyz:0?discport=30301,enode://2d4e7e9d48f4dd4efe9342706dd1b0024681bd4c3300d021f86fc75eab7865d4e0cbec6fbc883f011cfd6a57423e7e2f6e104baad2b744c3cafaec6bc7dc92c1@34.65.43.171:0?discport=30305,enode://9d7a3efefe442351217e73b3a593bcb8efffb55b4807699972145324eab5e6b382152f8d24f6301baebbfb5ecd4127bd3faab2842c04cd432bdf50ba092f6645@34.65.109.126:0?discport=30305
OP_NODE_P2P_STATIC=/ip4/34.83.120.192/tcp/9222/p2p/16Uiu2HAkv5SVdeF4hFqJyCATwT87S3PZmutm8akrgwfcdFeqNxWw
OP_NODE_P2P_SYNC_ONLYREQTOSTATIC=true
OP_NODE_L2_ENGINE_RPC=http://localhost:8551
OP_NODE_L2_ENGINE_KIND=geth
OP_NODE_L2_ENGINE_AUTH=/opt/op-geth/geth/jwtsecret.hex
OP_NODE_ROLLUP_CONFIG=/opt/rollup.json
OP_NODE_OVERRIDE_FJORD=1720627201
OP_NODE_SYNCMODE=execution-layer
OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true
OP_NODE_RPC_ENABLE_ADMIN=true
OP_NODE_SAFEDB_PATH=/opt/op-node/
OP_NODE_METRICS_ENABLED=true
```


3. Run opgeth-init to initialise the op-geth data directory
```
docker run -t \
--env-file ./op-geth.env \
-v ./genesis.json:/opt/genesis.json:ro \
-v ./op-geth-data:/opt/op-geth/ \
us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101411.1 \
init --datadir=/opt/op-geth/ --state.scheme=path /opt/genesis.json
```

*docker-compose.yml*
```
services:
opgeth:
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101411.1
env_file: op-geth.env
volumes:
- ./op-geth-data:/opt/op-geth/
network_mode: host
opnode:
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.10.0
env_file: op-node.env
command:
- op-node
volumes:
- ./op-node-data:/opt/op-node/
- ./rollup.json:/opt/rollup.json:ro
- ./op-geth-data/geth:/opt/op-geth/geth:ro
network_mode: host
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7300"]
interval: 30s
timeout: 10s
retries: 5
depends_on:
opgeth:
condition: service_started
```

You can finally start the node with `docker-compose up`.

## Resources

Please follow [Conduit's node documentation](https://docs.conduit.xyz/guides/run-a-node/op-stack-node) for information on how to self-host a node for an OP Stack rollup deployed on Conduit such as BOB. Conduit extends [Optimism's guide for running a node with Docker](https://docs.optimism.io/builders/node-operators/tutorials/node-from-docker), the source of the specific hardware and software dependencies above.
Additional information on how to self-host a node for an OP Stack rollup is available on [Conduit's node documentation](https://docs.conduit.xyz/guides/run-a-node/op-stack-node). Conduit extends [Optimism's guide for running a node with Docker](https://docs.optimism.io/builders/node-operators/tutorials/node-from-docker), the source of the specific hardware and software dependencies above.

## External Links

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/learn/builder-guides/local-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ bitcoin-cli -regtest -rpcwallet=alice generatetoaddress 101 $ADDRESS

#### Wallet

You can use `bitcoin-cli` to manage the wallet. However, if you prefer you a UI, you can use Bitcoin QT.
You can use `bitcoin-cli` to manage the wallet. However, if you prefer a UI, you can use Bitcoin QT.

Start Bitcoin QT (for wallet functionality):

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/learn/introduction/stack-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ BOB provides trustless access to Bitcoin block and transactional data via a [BTC

### BOB SDK

_A smart contract deveopers' universal toolkit for all things building on Bitcoin_
_A smart contract developers' universal toolkit for all things building on Bitcoin_

Similar to [OpenZeppelin](https://www.openzeppelin.com/) and other great Solidity libraries, BOB provides a powerful SDK for all things building on Bitcoin. This includes a wide range of Solidity contracts that can be used to interact with Bitcoin including core, [Ordinals](https://docs.ordinals.com/), [BRC20s](https://brc20.gitbook.io/brc20/overview/introduction), [Runes](https://rodarmor.com/blog/runes/), and [Lightning](https://lightning.network/), as well as improved inscription APIs and tools for a unified BTC and EVM wallet experience (e.g., manage Ordinals in your MetaMask wallet via [Snaps](https://metamask.io/snaps/)). Plus the ability to leverage [Account Abstraction](https://ethereum.org/en/roadmap/account-abstraction/) with bridged BTC.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
32 changes: 32 additions & 0 deletions docs/docs/learn/reference/audits/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ In Phase 1 of our [roadmap](/learn/introduction/roadmap), "Optimistic BOB" is an

BOB's most novel product is our intent-based Bitcoin bridge, called "[BOB Gateway](/learn/user-guides/onboard-to-bob/bob-gateway/)." The reports below show the results of audits for every major release so far.

### Cure53

- April 2024: BOB Onramp Smart Contract Audit. [Report](BOB-02-WP2-report.pdf)

### Common Prefix

- April 2024: BOB Onramp Smart Contract Audit. [Report](Common-Prefix-Audit-Report-2024.pdf)
Expand All @@ -22,3 +26,31 @@ BOB's most novel product is our intent-based Bitcoin bridge, called "[BOB Gatewa
- April 2024: BOB Onramp Smart Contract Security Review. [Report](Pashov-Audit-Report-2024-v1.pdf)
- August 2024: BOB Gateway V2 Smart Contract Security Review. [Report](Pashov-Audit-Report-2024-v2.pdf)
- September 2024: BOB Gateway V3 Smart Contract Security Review. [Report](Pashov-Audit-Report-2024-v3.pdf)

## USDC Bridge

We contracted several auditing firms to evaluate BOB's implementation of the USDC bridge from Ethereum mainnet to BOB.

### Cure53

- April 2024: BOB Modified USDC Bridge Library. [Report](BOB-02-WP1-report.pdf)

### Pashov

- April 2024: BOB USDC Bridge Security Review. [Report](BOB-USDCBridge-security-review.pdf)

## FusionLock Contract

BOB's "Fusion Season One" campaign preceded our mainnet launch. Users had the option of depositing their tokens into a `FusionLock.sol` smart contract with the intention of bridging those assets to BOB mainnet once it went live. In preparation for that campaign, we contracted reviews of the FusionLock contract from several auditing firms.

### Ottersec

- March 2024: FusionLock Smart Contract Audit. [Report](FusionLock-Ottersec.pdf)

### Common Prefix

- March 2024: FusionLock Smart Contract Audit. [Report](FusionLock-Common_Prefix.pdf)

### Trail of Bits

- April 2024: FusionLock Smart Contract Security Review. [Report](FusionLock-Trail_of_Bits.pdf)
1 change: 1 addition & 0 deletions docs/docs/learn/reference/bridged-token-addresses/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The presence of a token on this page does not imply any endorsement of the token
| Dai Stablecoin | DAI | [0x6b175474e89094c44da98b954eedeac495271d0f](https://etherscan.io/address/0x6b175474e89094c44da98b954eedeac495271d0f) | [0x6c851f501a3f24e29a8e39a29591cddf09369080](https://explorer.gobob.xyz/address/0x6c851f501a3f24e29a8e39a29591cddf09369080) |
| DLLR | DLLR | [0xbdbb63f938c8961af31ead3deba5c96e6a323dd1](https://etherscan.io/address/0xbdbb63f938c8961af31ead3deba5c96e6a323dd1) | [0xf3107eEC1e6F067552C035FD87199e1A5169CB20](https://explorer.gobob.xyz/address/0xf3107eEC1e6F067552C035FD87199e1A5169CB20) |
| Ether | ETH | Native Asset | Native Asset |
| Wrapped Ether | WETH | [0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2](https://etherscan.io/address/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) | [0x4200000000000000000000000000000000000006](https://explorer.gobob.xyz/token/0x4200000000000000000000000000000000000006) |
| Frax | FRAX | [0x853d955aCEf822Db058eb8505911ED77F175b99e](https://etherscan.io/address/0x853d955aCEf822Db058eb8505911ED77F175b99e) | [0xc4a20a608616f18aa631316eeda9fb62d089361e](https://explorer.gobob.xyz/address/0xc4a20a608616f18aa631316eeda9fb62d089361e) |
| Frax Ether | frxETH | [0x5e8422345238f34275888049021821e8e08caa1f](https://etherscan.io/address/0x5e8422345238f34275888049021821e8e08caa1f) | [0x4124CBBDE250a1a4bF94740491E79AB6a2eC0321](https://explorer.gobob.xyz/address/0x4124CBBDE250a1a4bF94740491E79AB6a2eC0321) |
| Frax Share | FXS | [0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0](https://etherscan.io/address/0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0) | [0x15e35b19ad29c512103eaabb55154ef0ee6ca661](https://explorer.gobob.xyz/address/0x15e35b19ad29c512103eaabb55154ef0ee6ca661) |
Expand Down
18 changes: 18 additions & 0 deletions docs/docs/learn/reference/tools/cross-chain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Cross-chain

## LayerZero

LayerZero is a technology that enables applications to move data across blockchains, uniquely supporting censorship-resistant messages and permissionless development through immutable smart contracts. Projects on BOB can connect to 35+ supported blockchains using LayerZero's contracts.

Visit [LayerZero's documentation](https://docs.layerzero.network/v2) to learn more about their supported chains, data schema, omnichain fungible tokens (OFTs), and other useful guides. Their [GitHub repository](https://github.com/LayerZero-Labs) and [Discord](https://discord-layerzero.netlify.app/discord) are also wonderful resources for getting started.

### Supported Networks

**Supported Networks**

- [BOB Mainnet](https://docs.layerzero.network/v2/developers/evm/technical-reference/deployed-contracts#bob)
- [BOB Testnet](https://docs.layerzero.network/v2/developers/evm/technical-reference/deployed-contracts#bob-testnet)

:::warning BOB Testnet is not BOB Sepolia
For historical reasons, the smart contracts in the link above point to our previous testnet, "BOB Testnet". While it has been replaced by our newer testnet, "BOB Sepolia", the LayerZero contracts remain live on BOB Testnet.
:::
Loading

0 comments on commit 7ed3354

Please sign in to comment.