Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve SSW-204 #57

Merged
merged 2 commits into from
Mar 5, 2024
Merged

Resolve SSW-204 #57

merged 2 commits into from
Mar 5, 2024

Conversation

Quantumplation
Copy link
Member

Neither the settings admin or the treasury admin could update the
authorized staking keys, so the list would be locked from the start.

This updates it to allow the treasury admin to update the authorized
staking keys.

This also addresses a readability concern that lead to this bug: we were
just checking that a bunch of fields were unmodified, which makes it
difficult to tell at a glance which fields are allowed to change.

So, instead, we now construct an "allowed" datum, using either the
inputs or outputs as a base, and then overriding the fields that can
change (or should remain the same).

Neither the settings admin or the treasury admin could update the
authorized staking keys, so the list would be locked from the start.

This updates it to allow the treasury admin to update the authorized
staking keys.

This also addresses a readability concern that lead to this bug: we were
just checking that a bunch of fields were unmodified, which makes it
difficult to tell at a glance which fields are allowed to change.

So, instead, we now construct an "allowed" datum, using either the
inputs or outputs as a base, and then overriding the fields that can
change (or should remain the same).
Copy link
Collaborator

@francolq francolq left a comment

Choose a reason for hiding this comment

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

This is solving SSW-204 by allowing the treasury admin to change authorized_staking_keys. Besides this, I like the approach of building the expected datum and then comparing to the actual output datum using equality.

@Quantumplation Quantumplation merged commit 6104be8 into main Mar 5, 2024
1 check passed
@Quantumplation Quantumplation deleted the pi/SSW-204-staking-keys branch March 5, 2024 21:48
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.

3 participants