Skip to content

Conversation

@schimih
Copy link
Contributor

@schimih schimih commented May 28, 2025

Description of the pull request (what is new / what has changed)

Did you test the changes locally ?

  • yes
  • no

Which category (categories) does this pull request belong to?

  • document new feature
  • update documentation that is not relevant anymore
  • add examples or more information about a component
  • fix grammar issues
  • other

@schimih schimih self-assigned this May 28, 2025
Copy link
Contributor

@andreibancioiu andreibancioiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only did a quick, ~shallow review ✔️

Each validator hashes together its public key and `rand_r`:

```
score_i = Hash(PK_i ‖ rand_r)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concatenation, correct?


### 1.4 Two‑phase BLS consensus

Once chosen, the proposer assembles a block and broadcasts it to the other 399 validators. Consensus then runs in **two BLS rounds**`prepare` and `commit`—similar to PBFT but with aggregated signatures:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-standard hyphen.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And below, in other places.

Once chosen, the proposer assembles a block and broadcasts it to the other 399 validators. Consensus then runs in **two BLS rounds**`prepare` and `commit`—similar to PBFT but with aggregated signatures:

1. **Prepare.** Validators check the block (state root, signatures, gas limits). If valid they sign its hash and return a 96‑byte BLS share.
2. **Commit.** The proposer (or any validator) aggregates ≥ ⅔ of the shares into a single 96‑byte signature and broadcasts a **commit message**.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aggregates ≥ ⅔ - maybe use words i.e. two thirds (just an opinion, feel free to skip it)?

Randomness must be unpredictable yet verifiable. For round `r` the seed is:

```
rand_r = BLS_sign(prev_block_hash, proposer_{r-1})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be double-checked. Leader signs?


## 4.  Confirmation blocks removed

*Pre‑Andromeda*: each execution shard produced a **block** and, one round later, a **confirmation block** to seal it. The Metachain applied the same pattern to eliminate double‑spend risk.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Metachain applied the same pattern to eliminate double‑spend risk.

Could be redundant information (there is no double spending, and for other reasons?). Also, "applies" (present simple).

2. **Notarisation by the Metachain.**
The Metachain includes the header & miniblock hashes of the new `shard 0` block in metablock `n + 1`, together with an **Equivalent Consensus Proof (ECP)** – a compressed BLS aggregate signature from ≥ 2⁄3 of the validator set.
3. **Execution in the receiver’s shard.**
Nodes in `shard 1` read the metablock, fetch miniblock 1 from `shard 0`, verify the ECP, check for replay, and apply the state changes (credit the destination address). The resulting `shard 1` block (nonce `n + 2`) is finalised with its own consensus proof and notarised in the next metablock.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n, n+1, n+2 are somehow imprecise expressions, since the shards have unrelated sequences of nonces (in sync with respect to round).


### Why did cross‑shard execution need six rounds before Andromeda?

Before v1.9.6 a cross‑shard transfer had to survive **at least six separate blocks** to guarantee it could never be reverted elsewhere:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use Andromeda instead (or, maybe v1.9.x).

@schimih schimih merged commit 6d9a473 into development May 29, 2025
3 checks passed
@schimih schimih deleted the update_andromeda_v branch May 29, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants