Skip to content

Commit 274a6b7

Browse files
authored
refactor: remove unneeded propose and da oracle (#8474)
Fixes #8471 and #8452. Removes the need for `AVAILABILITY_ORACLE_CONTRACT_ADDRESS`.
1 parent 875cfe6 commit 274a6b7

File tree

43 files changed

+211
-875
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+211
-875
lines changed

.github/workflows/devnet-deploys.yml

-1
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,6 @@ jobs:
546546
echo "TF_VAR_REGISTRY_CONTRACT_ADDRESS=$(extract registryAddress)" >>$GITHUB_ENV
547547
echo "TF_VAR_INBOX_CONTRACT_ADDRESS=$(extract inboxAddress)" >>$GITHUB_ENV
548548
echo "TF_VAR_OUTBOX_CONTRACT_ADDRESS=$(extract outboxAddress)" >>$GITHUB_ENV
549-
echo "TF_VAR_AVAILABILITY_ORACLE_CONTRACT_ADDRESS=$(extract availabilityOracleAddress)" >>$GITHUB_ENV
550549
echo "TF_VAR_FEE_JUICE_CONTRACT_ADDRESS=$(extract feeJuiceAddress)" >>$GITHUB_ENV
551550
echo "TF_VAR_FEE_JUICE_PORTAL_CONTRACT_ADDRESS=$(extract feeJuicePortalAddress)" >>$GITHUB_ENV
552551

docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ services:
5050
REGISTRY_CONTRACT_ADDRESS: "0x589a9634c1d00c62e47b3b7a790c8dc986b3d40d"
5151
INBOX_CONTRACT_ADDRESS: "0x12d9b5effc69bf5c0c29c8258c6b6fa95a08de74"
5252
OUTBOX_CONTRACT_ADDRESS: "0x3ec4b6c68a8c2ce4c78cdd465b3019b11a568d1d"
53-
AVAILABILITY_ORACLE_CONTRACT_ADDRESS: "0x98a4089127f3f5d555656f1c9b1801342c9d6bce"
5453
FEE_JUICE_CONTRACT_ADDRESS: "0x73c43b919973711e096bfc04c9d4b3be511ffc0b"
5554
FEE_JUICE_PORTAL_CONTRACT_ADDRESS: "0xdf25b0a34dbee9f25518f7a4d63bab8b3bb3e496"
5655
ETHEREUM_HOST:

docs/docs/protocol-specs/data-publication-and-availability/overview.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ As for that, we highly recommend reading [this very nice post](https://dba.xyz/d
1313
Essentially Data Publication $\subset$ Data Availability, since if it is available, it must also have been published.
1414
This difference might be small but becomes important in a few moments.
1515

16-
Progressing the state of the validating light node requires that we can convince it (and therefore the [availability oracle](./index.md#availability-oracle)) that the data was published - as it needs to compute the public inputs for the proof.
16+
Progressing the state of the validating light node requires that we can convince it that the data was published - as it needs to compute the public inputs for the proof.
1717
The exact method of computing these public inputs can vary depending on the data layer, but generally, it could be by providing the data directly or by using data availability sampling or a data availability committee.
1818

1919
The exact mechanism greatly impacts the security and cost of the system, and will be discussed in the following sections.
@@ -246,7 +246,7 @@ Assuming that this is a decent guess, and we can estimate the data requirements
246246
Using the values from just above for transaction data requirements, we can get a ball park estimate of what we can expect to require at different throughput levels.
247247

248248
<!-- prettier-ignore -->
249-
|Throughput | Everyone | Someone | Total |
249+
|Throughput | Everyone | Someone | Total |
250250
|:-----:|:-----:|:-----:|:-----:|
251251
| 1 TPS | $512 \dfrac{byte}{s}$ | $1036 \dfrac{byte}{s}$ | $1548 \dfrac{byte}{s}$ |
252252
| 10 TPS | $5120 \dfrac{byte}{s}$ | $10360 \dfrac{byte}{s}$ | $15480 \dfrac{byte}{s}$ |

docs/docs/protocol-specs/l1-smart-contracts/index.md

+8-32
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ When presented with a new [`ProvenBlock`](../rollup-circuits/root-rollup.md) and
2121
The `archive` used as public input is the archive after the new header is inserted (see [root rollup](./../rollup-circuits/root-rollup.md)).
2222

2323
```python
24-
def process(block: ProvenBlock, proof: Proof):
24+
def propose(block: ProvenBlock, proof: Proof):
2525
header = block.header
2626
block_number = header.global_variables.block_number
2727

@@ -57,19 +57,15 @@ Namely, we need the cross-chain messages to be published to L1, but the rest of
5757
:::info Validium or Rollup
5858
If a different data availability layer than Ethereum is used for the block body, we are effectively building a Validium.
5959
If we use Ethereum for the block body, we are building a Rollup.
60+
61+
For more information around the requirements we have for the availability, see [Data Availability](../data-publication-and-availability/index.md).
6062
:::
6163

6264
Using the data structures defined throughout the [rollup circuits](./../rollup-circuits/index.md) section, we can outline the validating light node structure as follows:
6365

6466
```mermaid
6567
classDiagram
6668
67-
class AvailabilityOracle {
68-
available: Map[Fr => bool]
69-
mut publish(effects: TxEffect[]): Fr
70-
is_available(txs_hash: Fr): bool
71-
}
72-
7369
class Inbox {
7470
consume(): bytes32
7571
}
@@ -84,9 +80,8 @@ class Verifier {
8480
8581
class StateTransitioner {
8682
archive: Snapshot
87-
process(header: Header, archive: Fr, proof: Proof)
83+
propose(header: Header, archive: Fr, proof: Proof, body: Body)
8884
}
89-
StateTransitioner --> AvailabilityOracle: is_available()
9085
StateTransitioner --> Inbox: consume()
9186
StateTransitioner --> Outbox: insert()
9287
StateTransitioner --> Verifier: verify()
@@ -110,7 +105,6 @@ class StateTransitioner:
110105
slot_number: uint128
111106

112107
VERIFIER: immutable(IVerifier)
113-
AVAILABILITY_ORACLE: immutable(IAvailabilityOracle)
114108
INBOX: immutable(IInbox)
115109
OUTBOX: immutable(IOutbox)
116110
VERSION: immutable(uint256)
@@ -126,13 +120,14 @@ class StateTransitioner:
126120
self.blocks.append(BlockLog({archive: bytes32(0), slot_number: 0}))
127121
self.GENESIS_TIME = block.timestamp
128122

129-
def process(
123+
def propose(
130124
self,
131125
header: Header,
132126
archive: Fr,
133-
proof: Proof
127+
proof: Proof,
128+
body: Body
134129
):
135-
assert self.AVAILABILITY_ORACLE.is_available(header.content_commitment.txs_hash)
130+
assert body.compute_commitment() == header.content_commitment
136131
assert self.validate_header(header)
137132
assert VERIFIER.verify(header, archive, proof)
138133
assert self.INBOX.consume() == header.content_commitment.in_hash
@@ -162,25 +157,6 @@ class StateTransitioner:
162157
return True
163158
```
164159

165-
### Availability Oracle
166-
167-
The state transitioner should be connected to an oracle which addresses the availability condition.
168-
169-
For the case of a rollup, this "oracle" will be deriving the `TxsHash` from calldata and blobs.
170-
For a validium it should be connected to a bridge that it can use to verify that the data is available on the other chain.
171-
172-
For a generic DA that publishes data commitments to Ethereum, the oracle could be a snark proof that opens the data commitment from the bridge and computes the `TxsHash` from it.
173-
174-
By having the availability oracle be independent from state progression we can even do multi-transaction blocks, e.g., use multiple transactions or commitments from other DA layers to construct the `TxsHash` for a large block.
175-
176-
For more information around the requirements we have for the availability oracle, see [Data Availability](../data-publication-and-availability/index.md).
177-
178-
An interesting observation around the availability oracle is that the `OutHash` and `InHash` don't need to be explicitly proven available through it.
179-
The `InHash` is already proven as part of the L1 inbox, as we will see in a second.
180-
And the `OutHash` consists entirely of a subset of the contents of the `TxsHash`, which is already proven available.
181-
182-
<!-- TODO: consider giving this registry an adjective to describe what it's for. We're seeing several registries in the aztec protocol, so need to distinguish them. -->
183-
184160
### Registry
185161

186162
To keep one location where all the core rollup contracts can be found, we have a registry contract.

helm-charts/aztec-network/files/config/config-prover-env.sh

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ rollup_address=$(echo "$output" | grep -oP 'Rollup Address: \K0x[a-fA-F0-9]{40}'
1414
registry_address=$(echo "$output" | grep -oP 'Registry Address: \K0x[a-fA-F0-9]{40}')
1515
inbox_address=$(echo "$output" | grep -oP 'L1 -> L2 Inbox Address: \K0x[a-fA-F0-9]{40}')
1616
outbox_address=$(echo "$output" | grep -oP 'L2 -> L1 Outbox Address: \K0x[a-fA-F0-9]{40}')
17-
availability_oracle_address=$(echo "$output" | grep -oP 'Availability Oracle Address: \K0x[a-fA-F0-9]{40}')
1817
fee_juice_address=$(echo "$output" | grep -oP 'Fee Juice Address: \K0x[a-fA-F0-9]{40}')
1918
fee_juice_portal_address=$(echo "$output" | grep -oP 'Fee Juice Portal Address: \K0x[a-fA-F0-9]{40}')
2019

@@ -26,7 +25,6 @@ export ROLLUP_CONTRACT_ADDRESS=$rollup_address
2625
export REGISTRY_CONTRACT_ADDRESS=$registry_address
2726
export INBOX_CONTRACT_ADDRESS=$inbox_address
2827
export OUTBOX_CONTRACT_ADDRESS=$outbox_address
29-
export AVAILABILITY_ORACLE_CONTRACT_ADDRESS=$availability_oracle_address
3028
export FEE_JUICE_CONTRACT_ADDRESS=$fee_juice_address
3129
export FEE_JUICE_PORTAL_CONTRACT_ADDRESS=$fee_juice_portal_address
3230
EOF

helm-charts/aztec-network/files/config/config-validator-env.sh

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ rollup_address=$(echo "$output" | grep -oP 'Rollup Address: \K0x[a-fA-F0-9]{40}'
1414
registry_address=$(echo "$output" | grep -oP 'Registry Address: \K0x[a-fA-F0-9]{40}')
1515
inbox_address=$(echo "$output" | grep -oP 'L1 -> L2 Inbox Address: \K0x[a-fA-F0-9]{40}')
1616
outbox_address=$(echo "$output" | grep -oP 'L2 -> L1 Outbox Address: \K0x[a-fA-F0-9]{40}')
17-
availability_oracle_address=$(echo "$output" | grep -oP 'Availability Oracle Address: \K0x[a-fA-F0-9]{40}')
1817
fee_juice_address=$(echo "$output" | grep -oP 'Fee Juice Address: \K0x[a-fA-F0-9]{40}')
1918
fee_juice_portal_address=$(echo "$output" | grep -oP 'Fee Juice Portal Address: \K0x[a-fA-F0-9]{40}')
2019

@@ -37,7 +36,6 @@ export ROLLUP_CONTRACT_ADDRESS=$rollup_address
3736
export REGISTRY_CONTRACT_ADDRESS=$registry_address
3837
export INBOX_CONTRACT_ADDRESS=$inbox_address
3938
export OUTBOX_CONTRACT_ADDRESS=$outbox_address
40-
export AVAILABILITY_ORACLE_CONTRACT_ADDRESS=$availability_oracle_address
4139
export FEE_JUICE_CONTRACT_ADDRESS=$fee_juice_address
4240
export FEE_JUICE_PORTAL_CONTRACT_ADDRESS=$fee_juice_portal_address
4341
export VALIDATOR_PRIVATE_KEY=$private_key

helm-charts/aztec-network/templates/deploy-contracts.config-map.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ data:
1919
registry_address=$(echo "$output" | grep -oP 'Registry Address: \K0x[a-fA-F0-9]{40}')
2020
inbox_address=$(echo "$output" | grep -oP 'L1 -> L2 Inbox Address: \K0x[a-fA-F0-9]{40}')
2121
outbox_address=$(echo "$output" | grep -oP 'L2 -> L1 Outbox Address: \K0x[a-fA-F0-9]{40}')
22-
availability_oracle_address=$(echo "$output" | grep -oP 'Availability Oracle Address: \K0x[a-fA-F0-9]{40}')
2322
fee_juice_address=$(echo "$output" | grep -oP 'Fee Juice Address: \K0x[a-fA-F0-9]{40}')
2423
fee_juice_portal_address=$(echo "$output" | grep -oP 'Fee Juice Portal Address: \K0x[a-fA-F0-9]{40}')
2524
@@ -29,7 +28,6 @@ data:
2928
export REGISTRY_CONTRACT_ADDRESS=$registry_address
3029
export INBOX_CONTRACT_ADDRESS=$inbox_address
3130
export OUTBOX_CONTRACT_ADDRESS=$outbox_address
32-
export AVAILABILITY_ORACLE_CONTRACT_ADDRESS=$availability_oracle_address
3331
export FEE_JUICE_CONTRACT_ADDRESS=$fee_juice_address
3432
export FEE_JUICE_PORTAL_CONTRACT_ADDRESS=$fee_juice_portal_address
3533
EOF

0 commit comments

Comments
 (0)