Skip to content

Fix TransactionHintsBag segregation #817

@sethdusek

Description

@sethdusek

TransactionHintsBag splits hints into secret (OwnCommitment) and public hints, but this isn't done correctly. Instead TransactionHintsBag.public_hints contains all CommitmentHints (including OwnCommitment) and .secret_hints contains SecretProven.

In ergo-lib-python there is also a without_secrets function in HintsBag that removes OwnCommitment which is suitable for sharing with other signers. Consider adding this to the other bindings and native library to prevent API misuse (signers accidentally sharing private randomness leading to private key leakage if they're not careful)

Correct implementation:

https://github.com/ergoplatform/ergo/blob/a74d8f46f9c691bb54429aa1ea79fc20b4d7a57b/ergo-wallet/src/main/scala/org/ergoplatform/wallet/interpreter/TransactionHintsBag.scala#L13-L16

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions