dominant-strategies / go-quai

Official Go Implementation of the Quai Network
GNU General Public License v3.0
2.37k stars 460 forks source link

Fix encoding of Address and Pubkey in goldenage RPC #1908

Closed mibuono closed 3 months ago

mibuono commented 3 months ago

In getblockbynumber JSON RPC call, the Qi outputs for pubkey and address are base58 (or64) encoded, and the blockscout team is expecting hex. Below is an example of the call.

"jsonrpc": "2.0", "id": 1, "result": { "extTransactions": [], "interlinkHashes": [], "order": 2, "size": "0xf8f", "subManifest": [], "totalEntropy": "0xfab0f2fd8b1624e923", "transactions": [ { "blockHash": null, "blockNumber": null, "gas": "0x0", "hash": "0x00c100bdeff9bcd706ba5ec23dad847748f3a4fb8663b96f3419f91b3a60ffac", "input": "0x", "nonce": "0x0", "transactionIndex": null, "type": "0x2", "chainId": "0x0", "inputs": [ { "PreviousOutPoint": { "TxHash": "0x0000055b77276e788e2cca8a9ca847c714397c413228eab8444a8fa9825b9026", "Index": 65535 }, "PubKey": "BLlhazGafjLnKvQ4u8na1agzqjLHWhIEz118hlVnDIXCPpXc/AaID7r5F2hGEKdYMwS39Fq2NfB2viQNl6EddQs=" } ], "outputs": [ { "Denomination": 7, "Address": "AKPkWqFhY/JmMBW2aViU2RiGbRk=", "Lock": 0 } ], "utxoSignature": "0x32b74e5515e400f623e9e1aba9ab185357c03c25470c9a52e5f1957e1a28b7573d6877e96c57b6bc06bd124193e97f7a10adc07426bf66b5477e583b0ecd1dc6" } ],