BlockstreamResearch / secp256k1-zkp

A fork of libsecp256k1 with support for advanced and experimental features such as Confidential Assets and MuSig2
MIT License
365 stars 207 forks source link

doc: fix sage code for deriving alternative generator H #292

Closed theStack closed 5 months ago

theStack commented 5 months ago

The line calculating H (in particular, the expression G.decode('hex')) fails with the following error message on Sage 9.5:

AttributeError: 'str' object has no attribute 'decode'

Fix that by converting the hex-string to bytes using bytes.fromhex.

(Noticed while reviewing https://github.com/bitcoin/bitcoin/pull/30048 which picks this code snippet comment up.)