Skip to content

Commit a0439c4

Browse files
committed
add: add behaviour
1 parent 6caf1bc commit a0439c4

File tree

1 file changed

+46
-19
lines changed

1 file changed

+46
-19
lines changed

caps/eth.md

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -125,25 +125,52 @@ relayed by the peer.
125125

126126
### Blob Transaction and Cell Exchange
127127

128-
Blob transaction carries one or more large objects called blobs, in addition to the normal
129-
transaction payload. Blobs are not sent directly with the transaction. Instead, they are
130-
split into cells using the erasure code defined in [EIP-7594], and these cells are exchanged
131-
separately between peers. Since a transaction can carry multiple blobs, cell exchange is
132-
handled at the transaction level, which means that cells in the same transaction should be
133-
delivered together.
134-
135-
When a blob transaction is added to a peer's pool, availability of its cells should be
136-
announced to the network using the `cells` field in the [NewPooledTransactionHashes] message.
137-
If a bit is set, it indicates that the peer holds the corresponding cell for all blobs
138-
included in the announced transactions.
139-
All peers that receive the message can then request the cells whose indices are
140-
specified in the cells field using the [GetCells] message. Clients can selectively store
141-
cells according to their local parameters.
142-
128+
Blob transaction contains one or more 128KiB fixed sized objects call blobs. Blobs can be
129+
split into cells using the erasure code defined in [EIP-7594]. Currently, the size of cell
130+
is defined as 2KiB, which makes the blobs to be consisted in 128 cells combined with 1/2 code
131+
rate. A cell can be identified in the erasure-coded blob by its order (index).
132+
133+
Blobs also carry metadata such as cell proofs and a commitment required to verify whether a
134+
cell is part of blob data.
135+
136+
- Commitment: Commitment is a cryptographic value bound to a blob. It is used in inclusion
137+
verification to ensure that any given cell is part of the original blob.
138+
139+
- Proof: Proof is a cell-specific proof used during the inclusion verification of associated cell.
140+
141+
Blob transaction exchange must be initiated only through the [NewPooledTransactionHashes]
142+
message. The peer should also announce availability of its cells using the `cells` field
143+
in the message. If a bit in the field is set, it indicates that the peer holds the
144+
corresponding cell for all blobs included in the announced transactions.
145+
146+
Response to [GetPooledTransactions] for blob transactions include traditional transaction
147+
payload and blob metadata. However, the corresponding blob data can only be obtained as cells,
148+
via [GetCells]. Since a transaction can carry multiple blobs, cell exchange is handled at the
149+
transaction level, which means that cells in the same transaction should be delivered together.
150+
151+
Upon receiving the [NewPooledTransactionHashes] message with new blob transaction hashes,
152+
the node starts to fetch cells in parallel with transaction fetch described above.
153+
The node first makes a probabilistic decision.
154+
If it decided to fetch the full blobs with probability $p$, the node request
155+
them using the [GetCells] message, setting more than 50% of total cell indices as 1 in
156+
the `cells` field. Recommended probability $p$ is 0.15.
157+
158+
If it decided not to fetch the full blobs, it must request its custody cells from peers
159+
that announced overlapping availability using [GetCells] message, but only after it
160+
observes N(TBD) distinct full-availability announcements.
161+
Custody cells refer to the cells whose index is in a custody index set of their
162+
associated consensus node id.
163+
The node must also request an excess of N random columns in addition to its custody set.
164+
This is to mitigate targeted and selective data attacks. The node must only announce onwards
165+
once it has obtained all its custody cells.
166+
167+
A node must only request a maximum of 4(TBD) columns per peer per transaction.
143168
A node should never announce availability to a peer that it can infer to already
144-
have the associated cell. This can be achieved by remembering set of versioned hashes
169+
have the associated cell. This can be achieved by remembering set of transaction hashes
145170
and cell indices announced by each peer.
146171

172+
Some nodes might need to store
173+
147174
### Transaction Encoding and Validity
148175

149176
Transaction objects exchanged by peers have one of two encodings. In definitions across
@@ -548,9 +575,9 @@ The `cells` element, a bitmap, specifies indices of the requested cells.
548575
This is the response to [GetCells].
549576
Each element must match the txhash and cells specified in the request.
550577
The sender can skip any indices that are not available, so the requester can fetch them
551-
from other peers. Skipping is allowed only at the index level. The sender must return the
552-
corresponding cells for all blobs included in the transaction and cannot skip cells belonging
553-
to specific blobs.
578+
from other peers. However, skipping is allowed only at the index level.
579+
The sender must return the corresponding cells for all blobs included in the transaction
580+
and cannot skip cells belonging to specific blobs.
554581

555582
## Change Log
556583

0 commit comments

Comments
 (0)