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
docs: Add DAL/BLS attestation documentation and clarify encoding differences (#675)
* docs: Add DAL/BLS attestation documentation and clarify encoding differences
- Add comprehensive DAL & BLS attestations guide (docs/dal_bls_attestations.md)
- Add glossary explaining magic bytes, operation tags, and request kinds (docs/glossary.md)
- Update bakers.md with correct tz4 configuration (attestation only, not attestation_with_dal)
- Update start.md to clarify tz4 vs tz1/tz2/tz3 encoding differences
- Clarify that attestation_with_dal is ONLY for non-BLS keys (tz1/tz2/tz3)
Key technical findings:
- BLS keys (tz4) use tag 41 encoding which always decodes to 'attestation'
- Non-BLS keys (tz1/tz2/tz3) use tag 23 encoding for DAL (attestation_with_dal)
- Both consensus and companion tz4 keys receive identical bytes (tag 41)
- DAL content is stripped from tz4 signed bytes, used in weighted aggregation
Addresses operator confusion about dual-signature pattern and permission requirements.
Resolves ambiguity in issue #671 with verified code analysis.
Protocol: Tezos 023 (PsSeouLo)
Tested: Octez 23.2, Seoultestnet
* docs: Fix companion key permissions - attestation only, no preattestation
Companion keys only sign attestations (when DAL content is available), never
preattestations or blocks. Updated all configuration examples to show only
attestation permission for companion keys.
Closes#671
Copy file name to clipboardExpand all lines: docs/bakers.md
+49-51Lines changed: 49 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -225,85 +225,83 @@ See the official [Signatory documentation](https://signatory.io/docs/) for AWS/G
225
225
226
226
## Baking with DAL (Data Availability Layer)
227
227
228
-
The Data Availability Layer (DAL) enables data publication outside of Layer 1 blocks while maintaining decentralization. DAL participation **earns additional incentives** from the network protocol and **supports the Tezos X roadmap** by providing high-bandwidth data distribution for smart rollups.
228
+
The Data Availability Layer (DAL) enables data publication outside of Layer 1 blocks while maintaining decentralization. DAL participation **earns additional incentives** (10% of participation rewards) and **supports the Tezos X roadmap**.
229
229
230
-
### Why Run a DAL Node?
230
+
:::danger Critical: BLS Keys Use Different Encoding
231
+
**BLS keys (tz4) use tag 41 encoding for ALL attestations.** Both consensus and companion keys receive identical bytes and decode to `request=attestation` in Signatory logs. **Do NOT configure `attestation_with_dal` for tz4 keys** - it has no effect and will cause confusion.
231
232
232
-
- **Additional Rewards**: Earn extra incentives for DAL attestations (10% of participation rewards)
233
-
- **Network Support**: Help scale Tezos by supporting smart rollup data distribution
234
-
- **Tezos X Roadmap**: Contribute to the future of Tezos scaling infrastructure
235
-
- **Competitive Advantage**: Stay ahead as DAL becomes increasingly important
233
+
**Non-BLS keys (tz1/tz2/tz3) with DAL node:** Use `attestation_with_dal` permission (tag 23). These keys can participate in DAL but typically attest with bitset 0.
236
234
237
-
### Critical Signatory Configuration
235
+
**See [DAL & BLS Attestations guide](dal_bls_attestations.md) for detailed explanation.**
236
+
:::
237
+
238
+
### Quick Setup
238
239
239
-
If your baker participates in DAL attestations, you **must** add `attestation_with_dal` to your Signatory policy:
240
+
**1. Configure Signatory Policy**
240
241
241
242
```yaml
242
243
tezos:
243
-
tz1YourBakerAddress:
244
+
# Consensus key (tz4)
245
+
tz4YourConsensusKey:
244
246
log_payloads: true
245
247
allow:
246
-
block: # Standard block baking
247
-
attestation: # Standard attestations
248
-
preattestation: # Pre-attestations
249
-
attestation_with_dal: # Required for DAL attestations
250
-
generic:
251
-
- transaction
252
-
- reveal
253
-
- delegation
254
-
- stake
255
-
```
256
-
257
-
:::warning Important
258
-
Without `attestation_with_dal` in your Signatory policy, DAL attestation requests will be rejected, and you'll miss those rewards.
259
-
:::
248
+
block:
249
+
attestation: # Tag 41 - all attestations
250
+
preattestation: # Tag 40
260
251
261
-
### Key Requirements
252
+
# Companion key (tz4)
253
+
tz4YourCompanionKey:
254
+
log_payloads: true
255
+
allow:
256
+
attestation: # Tag 41 - only permission needed
257
+
```
262
258
263
-
**BLS Consensus Keys (tz4)**: A **companion key is mandatory**for DAL attestations. Without it, tz4 bakers cannot produce DAL attestations.
259
+
**2. Set Keys**
264
260
265
261
```bash
266
-
# Register companion key for existing delegate
262
+
# Set consensus and companion keys for your delegate
263
+
octez-client set consensus key for <manager_key> to <consensus_key>
267
264
octez-client set companion key for <manager_key> to <companion_key>
268
265
```
269
266
270
-
**Baker Command Requirements:**
271
-
272
-
For DAL participation, your baker command must include:
273
-
- **Consensus key**: Required for all attestation operations
274
-
- **Companion key**: Required for DAL attestations (especially for tz4 consensus keys)
275
-
- **DAL node endpoint**: `--dal-node` parameter pointing to your DAL node
267
+
**3. Start Baker with DAL**
276
268
277
269
```bash
278
-
# Example baker command for DAL participation
279
270
octez-baker run with local node ~/.tezos-node \
280
271
--liquidity-baking-toggle-vote pass \
281
272
--dal-node http://localhost:10732 \
282
273
consensus_key companion_key
283
274
```
284
275
285
-
**DAL Operations**:
286
-
- **`attestation_with_dal`**: Required for DAL participation
287
-
- Standard keys (tz1, tz2, tz3): Single consensus key signature
288
-
- BLS keys (tz4): Requires both consensus key AND companion key signatures
289
-
- **`dal_entrapment_evidence`**: **DO NOT ALLOW** - Anonymous operation, no signature needed
290
-
- **`dal_publish_commitment`**: **DO NOT ALLOW** - Only needed if publishing data to DAL
- **Baker command** - Must include `--dal-node` flag and both key aliases
293
282
294
-
1. **Run a DAL node** alongside your Tezos node (see [DAL Node Setup Guide](https://octez.tezos.com/docs/shell/dal_run.html))
295
-
2. **Configure your baker** to use the DAL node (`--dal-node` flag)
296
-
3. **Update Signatory policy** to allow `attestation_with_dal` operations
283
+
### What to Expect
297
284
298
-
```bash
299
-
# Start baker with DAL integration
300
-
octez-baker run with local node ~/.tezos-node \
301
-
--liquidity-baking-toggle-vote pass \
302
-
--dal-node http://127.0.0.1:10732 \
303
-
consensus_key companion_key
304
-
```
285
+
**Consensus key** signs whenever baker has attestation rights (regardless of DAL).
286
+
**Companion key** signs only when baker has attestation rights **AND** DAL content is available.
287
+
288
+
Both keys receive **identical tag 41 bytes** and decode to `request=attestation` in Signatory logs. DAL participation happens through weighted BLS aggregation after signing, not through different operation types.
289
+
290
+
### Troubleshooting
291
+
292
+
**"Companion tz4 key never signs"**
293
+
- Check DAL node is synced: `curl http://localhost:10732/level`
294
+
- Verify baker has `--dal-node` flag
295
+
- Confirm `attestation` permission in companion key policy (NOT `attestation_with_dal`)
296
+
297
+
**"Two tz4 signatures with same magic byte"**
298
+
- **This is correct for BLS DAL.** Baker sends identical tag 41 bytes to both keys. Both decode to `attestation`. See [DAL & BLS Attestations](dal_bls_attestations.md)
299
+
300
+
**"Not earning DAL rewards"**
301
+
- Check participation: `octez-client rpc get "/chains/main/blocks/head/context/delegates/YOUR_PKH/participation"`
302
+
- Look for `dal_attested_slots` > 0
305
303
306
-
**Further Reading**: [Tezos DAL Architecture](https://docs.tezos.com/architecture/data-availability-layer) | [DAL Node Setup Guide](https://octez.tezos.com/docs/shell/dal_run.html)
0 commit comments