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

[ARC-81] Partkey integrity hash #327

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

Conversation

tasosbit
Copy link

No description provided.

@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.

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.

2 participants