Clarification of address prefixes
See original GitHub issueIn the data-visualization repo, src/components/App/App.test.js
, we have half a dozen hard-coded addresses prefixed by 0xDAG
and I don’t know what’s the source of those.
Example in the json:
signers: [
"0xDAG6jScEJp1FnZtxM6JEDbctwcUADU6BYzhV8d3U",
"0xDAG3FFi4xgHFHAWLGZyL4bPFCQhUkhjoTD4PsWhq",
The hash contains small and capital letters. There’s the keyHashToAddress
function in
src/main/scala/org/constellation/crypto/KeyUtils.scala
in the constellation repo but I can’t find if that utility function is actively used right now.
- What’s the hash from the key? It appears after
DAG
follows a digit - is that always the case? - ! If the hash is not actually displayed in hex, I’m very much against a prefix with a wrong type annotation. For parsers, they’ll not survive the G and it’s long and misleading. You could go with
0DAG
orDAG
(works especially if the char after DAG is a digit but I’d rethink even DAG if that’s not necessarily followed by a digit). I’m not sure how far the cryptography decision in the file are (seems under construction), but I’d refrain from a technically wrong annotation. - Does the name
keyHashToAddress
derive from somewhere? Can’t find it on github in another project or on the BitcoinJ repo that’s linked to. - Were those utils used to generate the hashes for the visualization? Can you point out which util functions aren’t actually interwoven in the code/necessary for compilation? Might help with audits.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
6PN addressing clarification - Fly.io
I was reading the blog posts going into the details, and I was intrigued by how Fly uses IPv6 addresses for metadata to...
Read more >Different address prefixes for different address types / network ...
Different networks use different address prefixes. In Bitcoin mainnet: P2PKH addresses: 1... P2SH addresses 3... P2WSH and P2WPKH addresses: ...
Read more >Clarification on prefix that matches the root directory but not ...
In the section on download blobs with specified prefix, the example given doesn't show whether a file whose entire path matches the pattern ......
Read more >Direct Connect Public VIF "Prefixes you want to advertise ...
Direct Connect Public VIF "Prefixes you want to advertise" clarification ... Only the route(s) for "Prefixes you want to advertise" prefixes will ...
Read more >Clarification on IPv6 Sub-Assignments v3 - AFRINIC
Finally, the IETF has recently approved the use of a unique /64 prefix per interface/host (RFC8273) instead of a unique address.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tynes What I wanted to get at is that you can’t write
0x5g88jb1e
as5g88jb1e
is not hex. That’s a wrong type annotation. The first row in your bitcoin link e.g. speak about the prefixxprv
for0x0488ade4
, but they don’t mix things up. The sequence0488ade4
is a valid hex number. That number0x0488ade4
has properties, like being divisible by 22 (i.e. by the number twenty-two). Meanwhile,0x5g88jb1e
is just a sequence of characters. In the testnet-visualizar and thekeyHashToAddress
function, Constellation currently prefixes the address (which isn’t hex) with0xDAG
. You can’t, in any case, follow0x
by something that has aG
in it or the other digits that the hash is using. Ethereum can use0x
because the addresses don’t contain character beyondf
(i.e. sixteen). That’s why I proposing at the very least dropping thatx
to mitigate confusion. It’s a small operation now and you’ll be less wrong in the long run.Fixed here: https://github.com/Constellation-Labs/constellation/pull/151 thanks @Nikolaj-K