ChainSafe / ChainSafe/canton-extending-mainnet

[P2-E4.4] Enforce FR-13: no discount on a required synchronizer

Open
#119 0 comments 0 reactions 1 assignee Claimed by @salindne View on GitHub
phase-2
Dominant language
Shell
Stars
0
Forks
0
Avg merge
22h 58m
Merged PRs (30d)
1

Description

**Context.** FR-13 says the discount "never applies to the Global Synchronizer". Nothing enforces
that. `validateSynchronizerAuthorization` (`AmuletRules.daml`) accepts a disclosed registration
whenever `registered.synchronizerId == synchronizerId`, without checking that the id is not also in
`requiredSynchronizers`. So a registration voted for a required synchronizer id authorizes the buy
and, after #92, discounts it.

The hole is narrow. It needs a governance mistake to register a required synchronizer id, and the
registered branch also requires `migrationId == 0`, so on a network past migration 0 the buy fails
anyway. But #92 is what makes it material: before it, nothing read the factor.

Splitting this out of #92 because the guard is 44 lines against that change's 48, and it is a
different concern: #92 applies the discount, this stops a governance mistake creating a discountable
Global Synchronizer.

**Deliverable.** Reject a buy that supplies a registration for a synchronizer id in
`requiredSynchronizers`, with a `FailureStatus` matching its siblings. The config is already in scope
in `validateBuyMemberTrafficInputs`, so no new plumbing. `DsoRules_RegisterSynchronizer` is the other
candidate site but has no access to `requiredSynchronizers`, which would mean a new vote argument.

**Acceptance.** Daml Script: a buy that discloses a registration for a required synchronizer id is
rejected, and the test reddens if the guard is removed.

**Depends on.** P2-E4.2.

**Refs.** FR-13.


Epic: #67 · Plan: [P2-E4-governance-discount.md](https://github.com/ChainSafe/canton-extending-mainnet/blob/main/docs/planning/phase-2-epics/P2-E4-governance-discount.md)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.