Skip to content

Add FA weights to CIP-0104 spec#238

Open
bame-da wants to merge 3 commits into
canton-foundation:mainfrom
bame-da:cip-0104-weighted-fas
Open

Add FA weights to CIP-0104 spec#238
bame-da wants to merge 3 commits into
canton-foundation:mainfrom
bame-da:cip-0104-weighted-fas

Conversation

@bame-da

@bame-da bame-da commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

The app marker mechanism at the moment allows governance bodies to respond to observed behaviours and imbalances by amending marker guidance, observing through public explorers, and enforcement.
We propose to add a "featured app weights" to CIP-0104 that would allow similarly fine-grained adjustments to app rewards on a per-app basis.

@bame-da bame-da requested a review from a team as a code owner June 30, 2026 13:09
@bame-da bame-da changed the title Add FA weights to spec Add FA weights to CIP-0104 spec Jun 30, 2026

@meiersi-da meiersi-da left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks a lot. LGTM.

Comment thread cip-0104/cip-0104.md Outdated
Comment thread cip-0104/cip-0104.md Outdated
Comment thread cip-0104/cip-0104.md

Note that the computation in Item 5 takes care of distributing the traffic cost not attributed to app envelopes in a weighted fashion among the app envelopes.
When all envelopes have an app confirmer, it becomes `per_app_traffic_weight = envelope_traffic_cost / num_app_confirmers`, as expected.
See the [Example: Views and Envelopes for DvP settlement](#example-views-and-envelopes-for-dvp-settlement) section for concrete calculation examples.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What about adjusting the example with one non-default weight to create certainty?

Comment thread cip-0104/cip-0104.md Outdated
Comment thread cip-0104/cip-0104.md Outdated
Comment thread cip-0104/cip-0104.md Outdated
Comment thread cip-0104/cip-0104.md

### Free Protocol-Conformant Confirmation Responses

The Canton Protocol is changed so that the confirmation responses expected to be sent by a confirming participant node become de-facto free.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing later below: adjust the changelog. Also have a look at the header. I believe there's some changelog as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I adjusted the changelog at the bottom, I saw nothing at the top.

bame-da and others added 2 commits June 30, 2026 15:56
Co-authored-by: Simon Meier <simon@digitalasset.com>
Signed-off-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
Signed-off-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>

@meiersi-da meiersi-da left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread cip-0104/cip-0104.md
When all envelopes have an app confirmer, it becomes `per_app_traffic_weight = envelope_traffic_cost / num_app_confirmers`, as expected.
See the [Example: Views and Envelopes for DvP settlement](#example-views-and-envelopes-for-dvp-settlement) section for concrete calculation examples.

The computations are performed using integer arithmetic for efficiency and determinism reasons.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
The computations in steps 1-5 are performed using integer arithmetic for efficiency and determinism reasons.

Comment thread cip-0104/cip-0104.md
See the [Example: Views and Envelopes for DvP settlement](#example-views-and-envelopes-for-dvp-settlement) section for concrete calculation examples.

The computations are performed using integer arithmetic for efficiency and determinism reasons.
For confirmation requests whose traffic size is below 100 MB, they can be performed with 64-bit signed integers without risk of overflow.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
For confirmation requests whose traffic size is below 100 MB, they can be performed with 64-bit signed integers without risk of overflow.
The computation in Step 6 is performed using Daml's `Decimal` arithmetic as `floor (intToDecimal per_app_traffic_weight * activityWeight)`.

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.

2 participants