Skip to content

[fix] bridge grpc and align acropolis inherents - #12

Open
mhounslow wants to merge 8 commits into
node-0.22.0-rc.11-acropolisfrom
lowhung/bridge-acropolis-grpc-0.22
Open

[fix] bridge grpc and align acropolis inherents#12
mhounslow wants to merge 8 commits into
node-0.22.0-rc.11-acropolisfrom
lowhung/bridge-acropolis-grpc-0.22

Conversation

@mhounslow

Copy link
Copy Markdown
Collaborator

Overview

This updates the 0.22 Acropolis gRPC branch to do two things cleanly on top of node-0.22.0-rc.11-acropolis.

First, it keeps the bridge work from the original branch: the node now reads bridge UTXOs from Acropolis gRPC instead of the mock datasource.

Second, it fixes the Acropolis-backed inherent paths that were still diverging from db-sync behavior during guardnet verification. The main issues were that the authority-selection gRPC adapter was decoding Ariadne datums as raw Bytes(...) instead of full CBOR PlutusData, and it was only applying the Cardano epoch offset to Ariadne gating, not to the actual permissioned-candidate / registered-candidate / epoch-nonce queries. That caused the verifier to reconstruct different AuthoritySelectionInputs than block authors and led to inherent failures like missing validator data, datum decode failures, and InvalidValidatorsHashMismatch.

This PR aligns the Acropolis authority-selection adapter with the db-sync semantics by decoding the full datum payloads correctly and querying the offset data epoch consistently. It also improves cNIGHT inherent mismatch diagnostics so verifier failures surface the first differing UTXO or Cardano position instead of collapsing into a generic Other error.

🗹 TODO before merging

  • Ready

📌 Submission Checklist

  • Changes are backward-compatible (or flagged if breaking)
  • Pull request description explains why the change is needed
  • Self-reviewed the diff
  • I have included a change file, or skipped for this reason:
  • If the changes introduce a new feature, I have bumped the node minor version
  • Update documentation (if relevant)
  • Updated AGENTS.md if build commands, architecture, or workflows changed
  • No new todos introduced

🧪 Testing Evidence

Please describe any additional testing aside from CI:

  • cargo fmt

  • cargo check -p midnight-node-data-sources

  • cargo check -p midnight-node-data-sources -p pallet-cnight-observation -p midnight-primitives-cnight-observation -p midnight-primitives-mainchain-follower

  • cargo clippy -p midnight-node-data-sources -p pallet-cnight-observation -p midnight-primitives-cnight-observation -p midnight-primitives-mainchain-follower --all-targets -- -D warnings

    • rerun once with PROTOC=/usr/local/opt/protobuf/bin/protoc
    • still blocked locally because this shell does not actually have a usable protoc, and litep2p's build script panics before linting completes
  • Additional tests are provided (if possible)

🔱 Fork Strategy

  • Node Runtime Update
  • Node Client Update
  • Other:
  • N/A

Links

  • JIRA: N/A

@mhounslow
mhounslow marked this pull request as ready for review March 18, 2026 15:58
@mhounslow
mhounslow requested a review from whankinsiv March 18, 2026 15:58
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.

1 participant