Skip to content

[ARC-81] Partkey integrity hash #327

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

tasosbit
Copy link

@tasosbit tasosbit commented Dec 12, 2024

This ARC proposes a new identifier for checking the integrity of consensus participation keys, including in the context of key registration transactions.

The integrity hash aims to be a short, human readable identifier that hashes all relevant participation key material, which node runners can reference at a glance in order to verify the integrity of the participation keys between their node, wallet or later on an explorer.

@tasosbit tasosbit force-pushed the arc81-partkey-integrity-hash branch from 3605662 to be7738d Compare December 16, 2024 12:54
@tasosbit
Copy link
Author

tasosbit commented Dec 16, 2024

Given that participation keys are not portable between networks for the majority of users, should we include the network in the integrity hash? (e.g. genesis hash)

This would prevent network mismatch accidents, where e.g. a keyreg meant for testnet ended up on mainnet.

@tasosbit tasosbit changed the title [Draft] ARC-81 Partkey integrity hash [ARC-81] Partkey integrity hash Dec 16, 2024
@urtho
Copy link
Member

urtho commented Dec 16, 2024

The ARC-78 URL strives to be as minimal as possible and does not include GH or network-id .
Adding network id to ARC-81 might make it incompatible with ARC-78.

@tasosbit
Copy link
Author

tasosbit commented Dec 17, 2024

Adding network id to ARC-81 might make it incompatible with ARC-78.

Not sure how it makes them incompatible. If ARC78 QR doesn't encode network/GH, that is all the more reason to include it in the integrity hash. The information (GH) would be independently known everywhere where you would want to generate an integrity hash - node, wallets, explorers.

The ARC-78 URL strives to be as minimal as possible and does not include GH or network-id .

Arguably ARC78 should have included network as well - in the TUI we currently have to warn users to make sure they are on the correct network when going through the QR. If we include the network in the encoded URL, the wallet can detect a mismatch and warn or refuse appropriately. *

But even if we don't, not sure what would be stopping the wallet from including its current network GH in the integrity hash calculation

* ARC-78 is status final

@tasosbit
Copy link
Author

Second thread: Should this cover keyreg offline txns as well as @urtho suggested offline?

If so, what do you think about same payload structure, including the keys & rounds as all-zero?

@urtho
Copy link
Member

urtho commented Dec 17, 2024

Good questions, the standard way is to hash empty values - that is zero filled arrays instead of skipping them.
As in providing the same length binary input no matter the contents and tx type online/offline.

Tasos Bitsios added 2 commits December 18, 2024 13:28
- update reference implementation
- added reference implementation tests
@tasosbit
Copy link
Author

Updated the proposal:

  • includes genesis hash, so that integrity hashes are specific to networks
  • specify keyreg offline integrity hashes
  • updated implementation reference & added tests

@github-actions github-actions bot added s-review and removed s-draft labels Feb 19, 2025
@github-actions github-actions bot removed the s-review label Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants