Bitcoin full node and query server

Nov 15, 2018

View in context in the libbitcoin Slack #general mirror.

M
Mlmikael11:06
A general question, you know Bitcoin's Base58 encoding has a logic whereby somehow zero padding bytes are wiped (in the base58 encoding those are translated to the character "1"). I'm reading both LibBitcoin's and Bitcoin Core's Base58 code and trying to grasp the role and utility. So, P2PKH's prefix data byte is zero, right. Is the point that if I would make a P2PKH address where the hash of the public key starts with zero bytes, then somehow they would be wiped? Buuut then, I see both in LibBitcoin and in Bitcoin Core logics for handling multiple leading 1 characters. Is what's going on that each leading 0x00 BYTE is translated to ONE "1" base58 CHARACTER, hence offering a kind of compression for these as normally one byte will be ~1.3 base58 characters?? https://github.com/libbitcoin/libbitcoin/blob/master/src/formats/base_58.cpp#L109 https://github.com/bitcoin/bitcoin/blob/master/src/base58.cpp#L43