Skip to content

Conversation

maaku
Copy link
Contributor

@maaku maaku commented Feb 21, 2014

Implement error correction codes for base32 strings, using the CRC-5-USB polynomial. The encoder transforms 26-digit rfc-3548 strings into 31-digit z-base-32 strings, which are capable of recovering from any single-digit mutation, are visually distinctive, and protected against a wide variety of human-factor errors in the coding alphabet. Format is described in the following draft BIP:

https://gist.github.com/maaku/8996338#file-bip-ecc32-mediawiki

@maaku
Copy link
Contributor Author

maaku commented Feb 21, 2014

I'm trying to diagnose why this isn't working on the pull tester - it compiles & runs just fine on Ubuntu 12.04 and Mac OS X 10.9. The function in question is a POSIX standard API.

@cozz
Copy link
Contributor

cozz commented Feb 21, 2014

uint256.h:19:39: error: boost/heap/detail/ilog2.hpp: No such file or directory

Seems like pulltester uses an older version of boost and so doesnt know the heap directory.

…USB polynomial. The encoder transforms 26-digit rfc-3548 strings into 31-digit z-base-32 strings, which are capable of recovering from any single-digit mutation, are visually distinctive, and protected against a wide variety of human-factor errors in the coding alphabet.
@BitcoinPullTester
Copy link

Automatic sanity-testing: FAILED BUILD/TEST, see http://jenkins.bluematt.me/pull-tester/865264f3d785fb954261e5453707cf706f3de5e8 for binaries and test log.

This could happen for one of several reasons:

  1. It chanages paths in makefile.linux-mingw or otherwise changes build scripts in a way that made them incompatible with the automated testing scripts (please tweak those patches in qa/pull-tester)
  2. It adds/modifies tests which test network rules (thanks for doing that), which conflicts with a patch applied at test time
  3. It does not build on either Linux i386 or Win32 (via MinGW cross compile)
  4. The test suite fails on either Linux i386 or Win32
  5. The block test-cases failed (lookup the first bNN identifier which failed in https://github.com/TheBlueMatt/test-scripts/blob/master/FullBlockTestGenerator.java)

If you believe this to be in error, please ping BlueMatt on freenode or TheBlueMatt here.

This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/
Contact BlueMatt on freenode if something looks broken.

@maaku
Copy link
Contributor Author

maaku commented Feb 22, 2014

@TheBlueMatt I'm not sure why this failed. It looks like the unit tests compiled and ran just fine...

@laanwj
Copy link
Member

laanwj commented Feb 22, 2014

Looks like it failed on a timeout. Probably a fluke in the pull tester environment.

@gavinandresen
Copy link
Contributor

NACK from me-- 1,600 new lines of code for a "don't care" feature. Users should not be typing in or copying and pasting base32 strings anytime, anywhere-- if they are, then we have failed to design a usable system.

@rebroad
Copy link
Contributor

rebroad commented Feb 28, 2014

@maaku When/where is it you envisage that users will be manually typing in base32 strings?

@maaku
Copy link
Contributor Author

maaku commented Feb 28, 2014

When do people deal with long data strings in bitcoin already? Addresses, private keys/wallet backups, transaction identifiers.

EDIT: In some cases we can legitimately get rid of the need to manually input information. E.g. the payment protocol should reduce the need to input addresses most of the time. But it can't be turtles all the way down - at some point you have to save/restore a few hundred bits of binary data.

@sipa
Copy link
Member

sipa commented Mar 1, 2014

I agree with gavin here. Much as I prefer base32 over base58, and appreciate actual error correction code over hacky truncated double-SHA256, I believe we shouldn't encourage or develop features to make these cryptographic strings more human-usable, and we should focus on protocols that don't require humans even seeing these.

If I'd design Bitcoin today, and there was a need for some encoding for cryptographic material, I'd certainly vote for something like this, though.

@int03h
Copy link

int03h commented Mar 1, 2014

have you tried to import a priv key into the various services ? ( I am not fighting with anyone here ) especially not SIPA.

It is random .. honestly some of them are base 58 with spaces some are hex and others are WHO KNOWS ..

I am not going to point out the variations and who do does what but it annoying.

I use blockchain, coinbase and armory .. and none of them seem to have a standard for privkey import export. ( paper wallets aside - I believe that is HEX encodes and compressed - but I havent looked at the code to see why they work always and others dont.

@laanwj
Copy link
Member

laanwj commented Mar 1, 2014

@int03h There is a standard wallet import/output format, implemented in master as importwallet and dumpwallet. Not sure where it's documented, but it's too late to switch the private key representations now. In my experience all software supports at least the base58-based bitcoind importprivkey/dumpprivkey format for individual keys.

Agreed that if bitcoin was designed today I'd vote for anything but Base58. However that ship has sailed.

@int03h
Copy link

int03h commented Mar 1, 2014

venting more than anything ;) .. It's gotten my heart racing more than once. OMG OMG I lost my coins .. OMG ! :) There are always paper wallets so its not tragic.

@laanwj
Copy link
Member

laanwj commented Apr 4, 2014

Closing this, I think the implementation is solid but this functionality should only be added if there is an immediate application.

@laanwj laanwj closed this Apr 4, 2014
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants