Bitcoin Forum
May 08, 2024, 06:16:18 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Other / Meta / Username and account number change on: January 09, 2024, 09:43:31 PM
Is it possible to request username and account number to be changed?

I have an account from 2011 that unfortunately has a reused username and links to my address that can be traced to my holdings today.

I want to keep the account as it is so old but am hoping I can get the username and account number changed.

It cannot just be a username change as there are lists of username linked to account number out there:

https://github.com/dirtyfilthy/bitten/blob/master/utils/addresses.txt
2  Bitcoin / Development & Technical Discussion / Re: Bitcoin private key/wallet.dat data recovery patch on: March 09, 2021, 09:13:10 PM
Quote
static int refill_buf(void) {
   int ret;
   //printf("refill_buf: fill = %i pos = %i\n", buffill, bufpos);
   if(bufpos > BUF_WATERMARK) {
      memcpy(buf, buf + BUF_SEGMENT, BUF_LEN-BUF_SEGMENT);
      buffill -= BUF_SEGMENT;
      bufpos -= BUF_SEGMENT;
   }
   if(buffill < BUF_LEN) {
      ret = read(f, buf+buffill, BUF_LEN-buffill);
      if(ret < 0) {
         printf("Device read jumping");
         return ret;
      }
      //printf("Read %i bytes\n", ret);
      buffill += ret;
      fpos += ret;
      if(fpos > fnextcp) {
         show_progress();
         fnextcp = fpos + (ftotallen/1024);
      }
      return ret;
   } else {
      return -1;
   }
}

Maybe this will do it.
3  Bitcoin / Development & Technical Discussion / Re: Bitcoin private key/wallet.dat data recovery patch on: March 09, 2021, 09:04:01 PM
Full source

Quote
/*
Copyright (c) 2011 Aidan Thornton.  All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal with the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
  1. Redistributions of source code must retain the above copyright notice,
     this list of conditions and the following disclaimers.
  2. Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimers in the
     documentation and/or other materials provided with the distribution.
  3. Neither the names of <NAME OF DEVELOPMENT GROUP>, <NAME OF
     INSTITUTION>, nor the names of its contributors may be used to endorse
     or promote products derived from this Software without specific prior
     written permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
WITH THE SOFTWARE.
*/

#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>

#include <db.h>

#include <string>
#include <map>
#include <vector>

#include "eccrypto.h"
#include "oids.h"
#include "integer.h"

struct key_info {
   std::vector<unsigned char> privkey;
   std::vector<unsigned char> pubkey;
   std::vector<unsigned char> pubkey_comp;
   int found_priv:1;
   int found_pub:1;
   int found_pub_comp:1;
   int recovered:1;
   int recovered_comp:1;

   key_info() : found_priv(0), found_pub(0), found_pub_comp(0),
           recovered(0), recovered_comp(0) {}
};


//"\x01\x03\x6B\x65\x79\x41\x04"

#define STATE_FOUND_PUBKEY 6
#define STATE_FOUND_PUBKEY_COMP 7
#define STATE_FOUND_PUBKEY_2 13
#define STATE_FOUND_PRIVKEY 10
#define STATE_FOUND_PUBKEY_J 19

static const short statemap[][12] = {
   { 0x00, 15, 0x01, 1, 0x03, 11, -1, 0 }, // 0
   { 0x00, 15, 0x03, 2, 0x01, 8, -1, 0 }, // 1: 01
   { 0x00, 15, 0x6b, 3, 0x42, 12, 0x01, 1, 0x03, 11, -1, 0 }, // 2: 01 03
   { 0x00, 15, 0x65, 4, 0x01, 1, 0x03, 11, -1, 0 }, // 3: 01 03 6b
   { 0x00, 15, 0x79, 5, 0x01, 1, 0x03, 11, -1, 0 }, // 4: 01 03 6b 65
   { 0x00, 15, 0x41, 6, 0x21, 7, 0x01, 1, 0x03, 11, -1, 0 }, // 5: 01 03 6b 65 79
   { 0x00, 15, 0x01, 1, 0x03, 11, -1, 0 }, // 6: 01 03 6b 65 79 41 <pubkey>
   { 0x00, 15, 0x01, 1, 0x03, 11, -1, 0 }, // 7: 01 03 6b 65 79 21 <comp pubkey>
   { 0x00, 15, 0x01, 8, 0x03, 2, 0x04, 9, -1, 0}, // 8: 01 01
   { 0x00, 15, 0x20, 10, 0x01, 1, 0x03, 11, -1, 0}, // 9: 01 01 04
   { 0x00, 15, 0x01, 1, 0x03, 11, -1, 0 }, // 10: 01 01 04 20 <privkey>
   { 0x00, 15, 0x42, 12, 0x01, 1, 0x03, 11, -1, 0}, // 11: 03
   { 0x00, 13, 0x01, 1, 0x03, 11, -1, 0}, // 12: 03 42
   { 0x00, 16, 0x01, 1, 0x03, 11, -1, 0}, // 13: 03 42 00  <pubkey>
   { }, // unused
   { 0x00, 16, 0x01, 1, 0x03, 11, -1, 0 }, // 15: 00
   { 0x00, 17, 0x01, 1, 0x03, 11, -1, 0 }, // 16: 00 00   
   { 0x00, 17, 0x01, 1, 0x03, 11, 0x41, 18, -1, 0 }, // 17: 00 00 00
   { 0x00, 15, 0x01, 1, 0x03, 11, 0x04, 19, -1, 0 }, // 18: 00 00 00 41
   { 0x00, 15, 0x01, 1, 0x03, 11, -1, 0 }, // 19: 00 00 00 41 04
};


std::map<std::vector<unsigned char>, key_info* > pubkey_map;
std::map<std::vector<unsigned char>, key_info* > privkey_map;

typedef std::map<std::vector<unsigned char>, key_info* >::iterator keymap_iter;

#define BUF_SEGMENT 65536
#define BUF_LEN (65536*4)
#define BUF_WATERMARK (65536*3)
unsigned char buf[BUF_LEN]; int f; int bufpos, buffill;
unsigned long long fpos, ftotallen, fnextcp;
int num_recovered, num_pend_pub, num_pend_pub_comp, num_pend_priv, num_dups;

DB *dbp;

static void show_progress(void) {
   fprintf(stderr, "%4.1f%% done, %i keys recovered, %i %i %i pend\r", 100.0*(fpos-buffill+bufpos)/ftotallen, num_recovered, num_pend_pub, num_pend_pub_comp, num_pend_priv);
   fflush(stderr);
}

static int refill_buf(void) {
   int ret;
   //printf("refill_buf: fill = %i pos = %i\n", buffill, bufpos);
   if(bufpos > BUF_WATERMARK) {
      memcpy(buf, buf + BUF_SEGMENT, BUF_LEN-BUF_SEGMENT);
      buffill -= BUF_SEGMENT;
      bufpos -= BUF_SEGMENT;
   }
   if(buffill < BUF_LEN) {
      ret = read(f, buf+buffill, BUF_LEN-buffill);
      if(ret < 0) {
         perror("Device read");
         exit(1);
      }
      //printf("Read %i bytes\n", ret);
      buffill += ret;
      fpos += ret;
      if(fpos > fnextcp) {
         show_progress();
         fnextcp = fpos + (ftotallen/1024);
      }
      return ret;
   } else {
      return -1;
   }
}

static void dump_hex(unsigned char* data, int len) {
   int i;
   for(i = 0; i < len; i++) {
      printf("%02x", data);
   }
   printf("\n");
}

// structure of a private key:
// "308201130201010420" + private key (32 bytes) + "a081a53081a2020101302c06072a8648ce3d0101022100fffffffffffffffffffffffffffffffff ffffffffffffffffffffffefffffc2f300604010004010704410479be667ef9dcbbac55a06295ce 870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a 68554199c47d08ffb10d4b8022100fffffffffffffffffffffffffffffffebaaedce6af48a03bbf d25e8cd0364141020101a14403420004" + public key (64 bytes)

// structure of compressed private key
// "3081D30201010420" + private key (32 bytes) + "a08185308182020101302c06072a8648ce3d0101022100fffffffffffffffffffffffffffffffff ffffffffffffffffffffffefffffc2f300604010004010704210279be667ef9dcbbac55a06295ce 870b07029bfcdb2dce28d959f2815b16f81798022100fffffffffffffffffffffffffffffffebaa edce6af48a03bbfd25e8cd0364141020101a124032200" + compressed public key (33 bytes)

static void save_recovered_key(unsigned char* pubkey, unsigned char* privkey, bool compressed)
{
   DBT key, data; int ret;
   unsigned char keybuf[70],  valbuf[300];
   if(dbp == NULL) return;
   memset(&key, 0, sizeof(DBT));
   memset(&data, 0, sizeof(DBT));

   if(compressed) {
      memcpy(keybuf, "\x03key\x21", 5);
      memcpy(keybuf+5, pubkey, 33);
      key.data = keybuf;
      key.size = 33+5;

      memcpy(valbuf,"\xd6",1); // length
      memcpy(valbuf+1, "\x30\x81\xD3\x02\x01\x01\x04\x20", Cool;
      memcpy(valbuf+9, privkey, 32);
      memcpy(valbuf+41, "\xa0\x81\x85\x30\x81\x82\x02\x01\x01\x30\x2c\x06\x07\x2a\x86\x48\xce\x3d\x01\x01\x02\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xfc\x2f\x30\x06\x04\x01\x00\x04\x01\x07\x04\x21\x02\x79\xbe\x66\x7e\xf9\xdc\xbb\xac\x55\xa0\x62\x95\xce\x87\x0b\x07\x02\x9b\xfc\xdb\x2d\xce\x28\xd9\x59\xf2\x81\x5b\x16\xf8\x17\x98\x02\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xba\xae\xdc\xe6\xaf\x48\xa0\x3b\xbf\xd2\x5e\x8c\xd0\x36\x41\x41\x02\x01\x01\xa1\x24\x03\x22\x00", 141);
      memcpy(valbuf+182, pubkey, 33);
      data.data = valbuf;
      data.size = 215;
   } else {
      memcpy(keybuf, "\x03key\x41\x04", 6);
      memcpy(keybuf+6, pubkey, 64);
      key.data = keybuf;
      key.size = 64+6;

      memcpy(valbuf,"\xfd\x17\x01",3); // length
      memcpy(valbuf+3, "\x30\x82\x01\x13\x02\x01\x01\x04\x20", 9);
      memcpy(valbuf+12, privkey, 32);
      memcpy(valbuf+44, "\xa0\x81\xa5\x30\x81\xa2\x02\x01\x01\x30\x2c\x06\x07\x2a\x86\x48\xce\x3d\x01\x01\x02\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xfc\x2f\x30\x06\x04\x01\x00\x04\x01\x07\x04\x41\x04\x79\xbe\x66\x7e\xf9\xdc\xbb\xac\x55\xa0\x62\x95\xce\x87\x0b\x07\x02\x9b\xfc\xdb\x2d\xce\x28\xd9\x59\xf2\x81\x5b\x16\xf8\x17\x98\x48\x3a\xda\x77\x26\xa3\xc4\x65\x5d\xa4\xfb\xfc\x0e\x11\x08\xa8\xfd\x17\xb4\x48\xa6\x85\x54\x19\x9c\x47\xd0\x8f\xfb\x10\xd4\xb8\x02\x21\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xba\xae\xdc\xe6\xaf\x48\xa0\x3b\xbf\xd2\x5e\x8c\xd0\x36\x41\x41\x02\x01\x01\xa1\x44\x03\x42\x00\x04",174);
      memcpy(valbuf+218, pubkey, 64);
      data.data = valbuf;
      data.size = 279+3;
   }

   ret = dbp->put(dbp, NULL, &key, &data, DB_NOOVERWRITE);
   if(ret == DB_KEYEXIST) {
      printf("Skipping DB write, key already exists\n");
   } else if(ret != 0) {
      fprintf(stderr, "Error: DB write failed!\n");
      dbp->close(dbp, 0);
      exit(1);
   }
}

// really dirty hack to force a rescan at next startup
static void invalidate_best_block() {
   DBT key, data; int ret;
   unsigned char keybuf[10],  valbuf[0];
   if(dbp == NULL) return;
   memset(&key, 0, sizeof(DBT));
   memset(&data, 0, sizeof(DBT));
   
   key.data = (void*)("\x09" "bestblock");
   key.size = 10;
   data.data = (void*)"\x00\x00\x00\x00\x00";
   data.size = 5;
   ret = dbp->put(dbp, NULL, &key, &data, 0);
   if(ret != 0) {
      fprintf(stderr, "Error: DB write failed!\n");
      dbp->close(dbp, 0);
      exit(1);
   }
}

static void try_recover_key(key_info *kinfo) {
   if(kinfo->found_pub && kinfo->found_priv && !kinfo->recovered) {
      printf("pubkey = "); dump_hex(&kinfo->pubkey[0], 64);
      printf("privkey = "); dump_hex(&kinfo->privkey[0], 32);
      save_recovered_key(&kinfo->pubkey[0], &kinfo->privkey[0], false);
      kinfo->recovered = 1;
      num_recovered++; num_pend_pub--;
      if(!kinfo->recovered_comp) num_pend_priv--;
   } else if(kinfo->found_pub_comp && kinfo->found_priv && !kinfo->recovered_comp) {
      printf("pubkey_comp = "); dump_hex(&kinfo->pubkey_comp[0], 33);
      printf("privkey = "); dump_hex(&kinfo->privkey[0], 32);
      save_recovered_key(&kinfo->pubkey_comp[0], &kinfo->privkey[0], true);
      kinfo->recovered_comp = 1;
      num_recovered++; num_pend_pub_comp--;
      if(!kinfo->recovered) num_pend_priv--;
   }
   show_progress();
}

static void do_recover_privkey(int keypos) {
   std::vector<unsigned char> privkey(32);
   std::vector<unsigned char> gen_pubkey(64);
   if(buffill - keypos < 32) {
      fprintf(stderr, "Not enough data in buffer to recover key!\n");
      return;
   }
   memcpy(&privkey[0], buf+keypos, 32);

   keymap_iter iter = privkey_map.find(privkey);
   if(iter != privkey_map.end()) {
      //printf("Duplicate potential private key, skipping\n");
      num_dups++;
      show_progress();
      return;
   } else {
      CryptoPP::ECDSA<CryptoPP::ECP, CryptoPP::SHA1>::PrivateKey privateKey;      
      CryptoPP::ECDSA<CryptoPP::ECP, CryptoPP::SHA1>::PublicKey publicKey;
      CryptoPP::Integer pkey_i(&privkey[0], 32);
      privateKey.Initialize( CryptoPP::ASN1::secp256k1(), pkey_i );
      privateKey.MakePublicKey(publicKey);

      const CryptoPP::ECP::Point& q = publicKey.GetPublicElement();
      q.x.Encode(&gen_pubkey[0], 32); q.y.Encode(&gen_pubkey[32], 32);

      key_info* kinfo;
      iter = pubkey_map.find(gen_pubkey);
      if(iter != pubkey_map.end()) {
         kinfo = iter->second;
      } else {
         kinfo = new key_info();
         kinfo->pubkey = gen_pubkey;
         kinfo->found_pub = 0;
         pubkey_map[gen_pubkey] = kinfo;
      }

      kinfo->found_priv = 1;
      kinfo->privkey = privkey;
      privkey_map[privkey] = kinfo;
      num_pend_priv++;
      //printf("Found potential privkey: ");
      //dump_hex(&privkey[0], 32);
      try_recover_key(kinfo);
   }
}

static void do_recover_pubkey_uncomp(int keypos) {
   std::vector<unsigned char> pubkey(64);
   if(buffill - keypos < 64) {
      fprintf(stderr, "Not enough data in buffer to recover key!\n");
      return;
   }
   memcpy(&pubkey[0], buf+keypos, 64);

   key_info* kinfo;
   keymap_iter iter = pubkey_map.find(pubkey);
   if(iter != pubkey_map.end()) {
      kinfo = iter->second;
      if(kinfo->found_pub) {
         //printf("Duplicate potential public key, skipping\n");
         num_dups++;
         show_progress();
         return;
      }
   } else {
      kinfo = new key_info();
      kinfo->pubkey = pubkey;
      pubkey_map[pubkey] = kinfo;
   }

   kinfo->found_pub = 1;
   kinfo->pubkey = pubkey;
   num_pend_pub++;

   //printf("Found potential pubkey: ");
   //dump_hex(&pubkey[0], 64);
   try_recover_key(kinfo);
}

static void do_recover_pubkey_comp(int keypos) {
   std::vector<unsigned char> pubkey_comp(33);
   std::vector<unsigned char> gen_pubkey(64);
   if(buffill - keypos < 33) {
      fprintf(stderr, "Not enough data in buffer to recover key!\n");
      return;
   }
   memcpy(&pubkey_comp[0], buf+keypos, 33);

   CryptoPP::ECDSA<CryptoPP::ECP, CryptoPP::SHA1>::PublicKey publicKey;
    publicKey.AccessGroupParameters().Initialize( CryptoPP::ASN1::secp256k1() );
   CryptoPP::ECP::Point q;
   try {
      publicKey.GetGroupParameters().GetCurve().DecodePoint(q,&pubkey_comp[0],33);
   } catch(CryptoPP::Exception& e) {
      printf("CryptoPP exception decompressing pubkey: %s\n", e.what());
      return;
   }
   publicKey.SetPublicElement(q);
   q.x.Encode(&gen_pubkey[0], 32); q.y.Encode(&gen_pubkey[32], 32);
   
   key_info* kinfo;
   keymap_iter iter = pubkey_map.find(gen_pubkey);
   if(iter != pubkey_map.end()) {
      kinfo = iter->second;
      if(kinfo->found_pub_comp) {
         //printf("Duplicate potential compressed public key, skipping\n");
         num_dups++;
         show_progress();
         return;
      }
   } else {
      kinfo = new key_info();
      kinfo->pubkey = gen_pubkey;
      pubkey_map[gen_pubkey] = kinfo;
   }

   kinfo->found_pub_comp = 1;
   kinfo->pubkey = gen_pubkey;
   kinfo->pubkey_comp = pubkey_comp;
   num_pend_pub_comp++;

   //printf("Found potential compressed pubkey: ");
   //dump_hex(&pubkey_comp[0], 33);
   try_recover_key(kinfo);
}


static void do_recover_pubkey() {
   if(buffill - bufpos < 1)
      return;

   if(buf[bufpos] == 0x04) {
      do_recover_pubkey_uncomp(bufpos+1);
   } else if(buf[bufpos] == 0x02 || buf[bufpos] == 0x03) {
      do_recover_pubkey_comp(bufpos);
   }
}

// nasty hack to try and recover BitcoinJ public+private keys
// probably quite unreliable
static void do_recover_pubkey_j() {
   std::vector<unsigned char> pubkey(64);
   if(buffill - bufpos < 64 || bufpos < 64) {
      fprintf(stderr, "Not enough data in buffer to recover potential BitcoinJ key!\n");
      return;
   }

   int bufpos_priv = -1;
   for(int i = bufpos-64; i < bufpos-37; i++) {
      if(memcmp(buf+i, "\x00\x00\x00\x20", 4) == 0) {
         bufpos_priv = i+4; break;
      }
   }
   if(bufpos_priv < 0)
      return;

   do_recover_pubkey_uncomp(bufpos);
   do_recover_privkey(bufpos_priv);
}

static void do_scan(void) {
   int flg = 1, len; unsigned char *p;
   int stateid = 0;
   while(flg || bufpos < buffill) {
      const short *next_tbl = statemap[stateid];
      flg = refill_buf();
      for(;Wink {
         if(next_tbl[0] < 0 || next_tbl[0] == buf[bufpos]) {
            stateid = next_tbl[1]; break;
         }
         next_tbl += 2;
      }
      bufpos++;
      if(stateid == STATE_FOUND_PUBKEY || stateid == STATE_FOUND_PUBKEY_2 || stateid == STATE_FOUND_PUBKEY_COMP ) {
         //printf("Found potential key!\n");
         refill_buf();
         do_recover_pubkey();
      } else if(stateid == STATE_FOUND_PUBKEY_J ) {
         refill_buf();
         do_recover_pubkey_j();         
      } else if(stateid == STATE_FOUND_PRIVKEY) {
         refill_buf();
         do_recover_privkey(bufpos);
      }
   }
}

int main(int argc, char** argv) {
   u_int32_t flags; int ret;
   num_recovered = num_pend_pub = num_pend_pub_comp = num_pend_priv = num_dups = 0;
   if(argc < 2 || argc > 3) {
      fprintf(stderr, "bitcoin-wallet-recover v0.3\n");
      fprintf(stderr, "(C) 2011-2012 Aidan Thornton. All rights reserved.\n");
      fprintf(stderr, "See LICENSE.txt for full copyright and licensing information\n");
      fprintf(stderr, "\n");
      fprintf(stderr, "Usage: %s <device> [<new wallet>]\n", argv[0]);
      exit(1);
   }

   bufpos = 0; buffill = 0;
   f = open(argv[1], O_RDONLY);
   if(f < 0) {
      perror("Opening input");
      exit(1);
   }
   ftotallen = lseek(f, 0, SEEK_END);
   fpos = fnextcp = 0;
   lseek(f, 0, SEEK_SET);
   //printf("DEBUG: f = %i\n", f);

   if(argc >= 3) {
      ret = db_create(&dbp, NULL, 0);
      if (ret != 0) {
         fprintf(stderr, "Error: couldn't create DB to open output wallet\n");
         exit(1);
      }
      flags = DB_CREATE;
      ret = dbp->open(dbp,
            NULL, // transaction pointer
            argv[2],
            "main", // logical database name
            DB_BTREE,
            flags,
            0);
      if (ret != 0) {
         fprintf(stderr, "Error: couldn't open output wallet\n");
         exit(1);
      }
   } else {
      dbp = NULL;
   }
   
   do_scan();
   if(dbp && num_recovered > 0)
      invalidate_best_block();
   if(dbp)
      dbp->close(dbp, 0);
   fprintf(stderr, "Done - %i keys recovered, %i %i %i fail %i dups!     \n", num_recovered, num_pend_pub, num_pend_pub_comp, num_pend_priv, num_dups);
   if(num_recovered <= 0) {
      fprintf(stderr, "Sorry, nothing found :-(\n");
   } else {
      if(dbp) {
         fprintf(stderr, "Note: recovered addresses won't be listed under 'Receive coins' in the client\n\n");
      }
      fprintf(stderr, "If this helped, feel free to make a donation to the author at:\n");
      fprintf(stderr, "    *** 1CxDtwy7SAYHu7RJr5MFFUwtn8VEotTj8P ***\n");
      fprintf(stderr, "Please backup your wallet regularly and securely!\n\n");
      if(dbp) {
         fprintf(stderr, "After running the client and confirming your coins are all there, please either:\n");
         fprintf(stderr, " * Send all your coins to a new wallet that's securely backed up in one big transaction, or\n");
         fprintf(stderr, " * Stop the client and take a backup of your wallet before making any transactions\n");
         fprintf(stderr, "I'd also recommend using the -upgradewallet option, though it's not required\n\n");
      }
   }
   return 0;
}

4  Bitcoin / Development & Technical Discussion / Bitcoin private key/wallet.dat data recovery patch on: March 09, 2021, 09:00:25 PM
Hey, everyone I'm trying to use the following tool:

https://bitcointalk.org/index.php?topic=25091.0

To recover keys off an old 2011 era hard drive.  The problem is the drive has some bad sectors and I get a drive I/O error crashing the program.

Quote
static int refill_buf(void) {
   int ret;
   //printf("refill_buf: fill = %i pos = %i\n", buffill, bufpos);
   if(bufpos > BUF_WATERMARK) {
      memcpy(buf, buf + BUF_SEGMENT, BUF_LEN-BUF_SEGMENT);
      buffill -= BUF_SEGMENT;
      bufpos -= BUF_SEGMENT;
   }
   if(buffill < BUF_LEN) {
      ret = read(f, buf+buffill, BUF_LEN-buffill);
      if(ret < 0) {
         perror("Device read");
         exit(1);
      }
      //printf("Read %i bytes\n", ret);
      buffill += ret;
      fpos += ret;
      if(fpos > fnextcp) {
         show_progress();
         fnextcp = fpos + (ftotallen/1024);
      }
      return ret;
   } else {
      return -1;
   }
}

Is there a simple way to modify the code to skip ahead instead of jumping to the Device read exit block? 
5  Bitcoin / Development & Technical Discussion / Re: Why are we crippling the initial sync? on: March 01, 2021, 09:12:04 PM
So not much of default setting problem but a systemic problem with the client.  Sure you could fix any software issue by recompiling it but how about we ask why are we crippling the network in the first place?
6  Bitcoin / Development & Technical Discussion / Re: Why are we crippling the initial sync? on: March 01, 2021, 07:32:21 PM
Care to share how you can change this on the default client without changing the source and recompiling?  As I understand you can only change the default inbound peers, but I would love to be proven wrong.
7  Bitcoin / Development & Technical Discussion / Re: Why are we crippling the initial sync? on: March 01, 2021, 03:47:57 AM
Quote
Definitely shouldn't take 4 weeks, especially with NVMe if you're talking about WD SN550. My synchronization took a day with my HDD and 6 hours on my SATA SSD but they had 6GB of dbcache. Is your ISP throttling your connection by any chance?


Sorry you are correct WD SN550 not Samsung.  I have a gigabit Fiber to the home connection and my sync speed jumps like crazy when I manually add nodes so I don't think they are throttling.
8  Bitcoin / Development & Technical Discussion / Re: Why are we crippling the initial sync? on: March 01, 2021, 02:33:24 AM
Quote
Those are the nodes which allows incoming connection. It's methodology gives an inaccurate sampling of the actual node count as it doesn't take into account the nodes that doesn't allow incoming connection.

I knew I would get a comment like this.

Do we really think there are ten of thousands of nodes not accepting connecting being spun up in secret?  Or can we go with the simpler explanation of not many people are bothering to spin up a node and we shouldn't be making it harder to do so because at some point it may or may not be a problem.

Quote
when it hits a patch closer to the present day, the synchronization would slow down a lot as the more recent blocks contains much more transactions to be validated. Increasing the dbcache will help quite a lot.

Currently at June 2016 and progressing at 0.13% and hour.

Quote
Depending on your SSD model, some QLC SSDs will slow down significantly after the cache gets filled.

Samsung SN550, if a QLC drive causes it to take 4 weeks to sync something is really broken with the network.  But like I said when I manually added a bunch of nodes that had either TELUS or Google Fiber as their ISPs my sync time dropped to 40 hours.  Slowly as they disconnect and I go back to the 8-9 nodes my sync time goes back to 3 weeks.
9  Bitcoin / Development & Technical Discussion / Re: Why are we crippling the initial sync? on: March 01, 2021, 01:17:01 AM
Quote
What about disk I/O? Disk I/O is usually a major bottleneck because Bitcoin Core constantly reads and writes from storage. The updating of the UTXO set during validation causes a lot of disk I/O and it can often end up being the bottleneck.

If you increase the dbcache parameter, more of the database can be held in memory which improves the sync time.

On a SSD, but will increase.

Quote
How do you know?

https://bitnodes.io/dashboard/?days=730

Quote
Did you measure that or is that what the estimate says?

Based on the estimate and how much I've managed to sync over the last three days.

More importantly when I added a bunch of Nodes manually the estimate dropped to 40 hours. and speed of sync dropped dramatically.

10  Bitcoin / Development & Technical Discussion / Why are we crippling the initial sync? on: February 28, 2021, 10:44:05 PM
There are 10,000 full nodes many of them on fiber connection ready and willing to share the full Bitcoin blockchain.

But the core client only connects to 8-9 outbound nodes by default with no way to change this, other than manually adding clients.

source: https://bitcoin.stackexchange.com/a/8140

I'm running on 4 year old hardware and only utilizing 3% CPU and 25% memory with the only constraint being downloading the blocks. Currently my sync time is pegged at 4 weeks but when I manually add clients it drops to 40 hours.

There are not enough new nodes coming online for Pieter Wuille's explanation to make sense. There is no reason someone should have to download the Blockchain via Bittorrent to speed syncing because the Core client is purposely crippling the network.

We need to fix this if we want new users to run full nodes. More importantly lightning network depends on people running full nodes. Most people are going to lose interest when you tell them it will take 4 weeks to sync.
11  Bitcoin / Development & Technical Discussion / Re: Is there a way to only make BTC spendable to white listed addresses? on: February 09, 2021, 05:43:27 PM
Quote
Why would anyone want to store their funds on a company's server which would hold the private keys of their address

Huh? You would be holding your own keys natively on your phone, probably in the secure element.
12  Bitcoin / Development & Technical Discussion / Is there a way to only make BTC spendable to white listed addresses? on: February 09, 2021, 05:10:03 PM
I was thinking about how online banking works today.  They don't really have to worry about security because you can only wire to pre approved payees. 

If a company like Apple was to one day allow BTC to be held natively they wouldn't want transactions to be able to be sent anywhere.  One Webkit exploit combined with userland root access and hundred of millions users wallets are empties instantaneously.

But if the BTC are somehow held in a way that they can only be send to white listed addresses their is recourse for users.

Is there anyway this can be accomplished on the blockchain?
13  Other / Meta / Re: Anyone manage to get an account unlocked? on: February 05, 2021, 09:33:07 PM
Thanks guy I'll give messaging one of the team members a try!
14  Other / Meta / Re: Anyone manage to get an account unlocked? on: February 05, 2021, 08:22:50 PM
That topic was from October 2017...  Bitcoin talk said to email a certain email and I waited months for a reply before creating that topic.  Then someone responded with the updated procedure.  I never spammed them I send a single PM to Cyrus waited a week then sent one to Theymos then waited until now to post a thread to see what's up. My account says its suspended due to the leak not due to violations. I just want it back for the same reason I kept my ATI 5570 I used to mine, it's a low account number and a neat piece of history for me.  If creating two thread over 3 years apart is some crazy offence maybe its not worth it.
15  Other / Meta / Anyone manage to get an account unlocked? on: February 05, 2021, 07:13:39 AM
I messaged both Cyrus and theymos with signed proof of my account and never received a reply.  I first messaged on Jan 22.
16  Bitcoin / Development & Technical Discussion / Non-Interactive Proofs of Proofs of Work on: February 03, 2021, 10:57:49 PM
I just read up about Non-Interactive Proofs of Proofs of Work from this white paper: https://eprint.iacr.org/2019/226.pdf .

Just wondering what the current thoughts them is and if they are likely to be implemented into Bitcoin at any point in the future.
17  Bitcoin / Development & Technical Discussion / Anyone have more information on the status of CoinPrune on: January 01, 2021, 10:42:38 PM
Quote
Bitcoin was the first successful decentralized cryptocurrency and remains the most popular of its kind to this day. Despite the benefits of its blockchain, Bitcoin still faces serious scalability issues, most importantly its ever-increasing blockchain size. While alternative designs introduced schemes to periodically create snapshots and thereafter prune older blocks, already-deployed systems such as Bitcoin are often considered incapable of adapting corresponding approaches.

In our work, we revise this popular belief and present CoinPrune, a snapshot-based pruning scheme which is fully compatible to Bitcoin. CoinPrune can be deployed through an opt-in velvet fork, i.e., without impeding the established Bitcoin network. By requiring miners to publicly announce and jointly reaffirm recent snapshots on the blockchain, CoinPrune establishes trust into the snapshots' correctness even in the presence of powerful adversaries. Our evaluation shows that CoinPrune reduces the storage requirements of Bitcoin already by two orders of magnitude today, with further relative savings as the blockchain grows. In our experiments, nodes only have to fetch and process 5 GiB instead of 230 GiB of data when joining the network, reducing the synchronization time on powerful devices from currently 5 hours to 46 minutes, with even more savings for less powerful devices.

Whitepaper: https://arxiv.org/pdf/2004.06911.pdf

GitHub: https://github.com/COMSYS/coinprune

Youtube talk: https://www.youtube.com/watch?v=RuO34yT8j-g

Just found the whitepaper when researching scaling and it looks like they have a working implementation, but other than that nothing. Anyone have more info or thoughts on this?
18  Other / Meta / Account unlocks on: October 22, 2017, 02:36:02 AM
Are old accounts still being unlocked I emailed months ago to get me account unlock and haven't received any reply.
19  Other / New forum software / Re: New forum software on: October 21, 2017, 05:01:08 PM
Ouch, hasn't this project been under development for years now?  This project seems to be severely mismanaged if so. 
20  Other / New forum software / New forum software on: October 19, 2017, 11:08:39 PM
Is there any update on the new forum software Theymos has been working on?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!