tree checksum vpatch file split hunks

all signers: mircea_popescu trinque asciilifeform ben_vulpes mod6

antecedents: bitcoin-asciilifeform.1 genesis mod6_der_high_low_s asciilifeform_lets_lose_testnet

press order:

genesisasciilifeform ben_vulpes mircea_popescu mod6 trinque
bitcoin-asciilifeform.1asciilifeform ben_vulpes mod6
rm_rf_upnpasciilifeform ben_vulpes mod6
bitcoin-asciilifeform.3-turdmeister-alert-snipasciilifeform ben_vulpes mod6
asciilifeform_orphanage_thermonukeasciilifeform ben_vulpes mod6
bitcoin-asciilifeform.2-https_snipsnipasciilifeform ben_vulpes mod6
bitcoin-v0_5_3_1-static_makefile_v002.8asciilifeform ben_vulpes mod6
bitcoin-asciilifeform.4-goodbye-win32asciilifeform ben_vulpes mod6
bitcoin-v0_5_3_1-rev_bump.7asciilifeform ben_vulpes mod6
asciilifeform_tx-orphanage_amputationasciilifeform ben_vulpes mod6
asciilifeform_dnsseed_snipsnipasciilifeform ben_vulpes mod6
asciilifeform_zap_hardcoded_seedsasciilifeform ben_vulpes mod6
asciilifeform_zap_showmyip_crudasciilifeform ben_vulpes mod6
asciilifeform_dns_thermonyukyoolar_kleansingasciilifeform ben_vulpes mod6
asciilifeform_ver_now_5_4_and_irc_is_gone_and_now_must_give_ipasciilifeform ben_vulpes mod6
asciilifeform-kills-integer-retardationasciilifeform ben_vulpes mod6
asciilifeform_and_now_we_have_block_dumper_correctedasciilifeform ben_vulpes mod6
mod6_fix_dumpblock_paramsasciilifeform ben_vulpes mod6
asciilifeform_and_now_we_have_eatblockasciilifeform ben_vulpes mod6
asciilifeform_lets_lose_testnetasciilifeform ben_vulpes mod6
asciilifeform_add_verifyall_optionasciilifeform ben_vulpes mod6
programmable-versionstringben_vulpes mod6
mod6_der_high_low_sben_vulpes mod6
mod6_privkey_toolsmod6

patch:

- E4FA4700D17D7DA955E3EE980C4A4315E44655DAFDEC0A4657278E174FA92A187DE81C121D30B85A86FD0FE4334867CA73090142C58A3D51083F4EBE7DD4B35C
+ 1F4664B4C9784CC26DF8A5CDCBFF6523E4E3CC5E0BAF7940896F757D8D88F1D82110BD6E5CDE43C17D989BDF8FB48500D4FB1706E87F5DCA29B7DC9A0C0585F7
bitcoin/src/base58.h
(18 . 6)(18 . 7)
5 #include <string>
6 #include <vector>
7 #include "bignum.h"
8 #include "key.h"
9
10 static const char* pszBase58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
11
(315 . 4)(316 . 32)
13 }
14 };
15
16 /** A base58-encoded secret key */
17 class CBitcoinSecret : public CBase58Data
18 {
19 public:
20 void SetSecret(const CSecret& vchSecret)
21 {
22 assert(vchSecret.size() == 32);
23 SetData(128, &vchSecret[0], vchSecret.size());
24 }
25
26 CSecret GetSecret()
27 {
28 CSecret vchSecret;
29 vchSecret.resize(32);
30 memcpy(&vchSecret[0], &vchData[0], 32);
31 return vchSecret;
32 }
33
34 CBitcoinSecret(const CSecret& vchSecret)
35 {
36 SetSecret(vchSecret);
37 }
38
39 CBitcoinSecret()
40 {
41 }
42 };
43
44 #endif
- EDE2E19DD0CE3D03F54689CBEDA30B4B36152F7E532B3D34F0F8C55BB292F7D25C149B88162D96A8208997237A32566D0E555AA7105BFED8175983D80AD892E6
+ 7A2E0923BE3E44C746A463B71649FB4CA12729A3AA0DD9E0E8AC83ED47DD240FA22DBB4FC0C6220E7BEAB25DF3540220ACCDCA04544F77992212C178F31F2131
bitcoin/src/bitcoinrpc.cpp
(7 . 6)(7 . 7)
49 #include "db.h"
50 #include "net.h"
51 #include "init.h"
52 #include "util.h"
53 #undef printf
54 #include <boost/asio.hpp>
55 #include <boost/iostreams/concepts.hpp>
(584 . 7)(585 . 7)
57 if (!key.SetCompactSignature(Hash(ss.begin(), ss.end()), vchSig))
58 return false;
59
60 return (key.GetAddress() == addr);
61 return (CBitcoinAddress(key.GetPubKey()) == addr);
62 }
63
64
(1838 . 6)(1839 . 60)
66 } // ... but will return 'false' if we already have the block.
67
68
69 Value importprivkey(const Array& params, bool fHelp)
70 {
71 if (fHelp || params.size() < 1 || params.size() > 2)
72 throw runtime_error(
73 "importprivkey <bitcoinprivkey> [label]\n"
74 "Adds a private key (as returned by dumpprivkey) to your wallet.");
75
76 string strSecret = params[0].get_str();
77 string strLabel = "";
78 if (params.size() > 1)
79 strLabel = params[1].get_str();
80 CBitcoinSecret vchSecret;
81 bool fGood = vchSecret.SetString(strSecret);
82
83 if (!fGood) throw JSONRPCError(-5,"Invalid private key");
84
85 CKey key;
86 CSecret secret = vchSecret.GetSecret();
87 key.SetSecret(secret);
88 CBitcoinAddress vchAddress = CBitcoinAddress(key.GetPubKey());
89
90 CRITICAL_BLOCK(cs_main)
91 CRITICAL_BLOCK(pwalletMain->cs_wallet)
92 {
93 pwalletMain->MarkDirty();
94 pwalletMain->SetAddressBookName(vchAddress, strLabel);
95
96 if (!pwalletMain->AddKey(key))
97 throw JSONRPCError(-4,"Error adding key to wallet");
98
99 pwalletMain->ScanForWalletTransactions(pindexGenesisBlock, true);
100 pwalletMain->ReacceptWalletTransactions();
101 }
102
103 return Value::null;
104 }
105
106 Value dumpprivkey(const Array& params, bool fHelp)
107 {
108 if (fHelp || params.size() != 1)
109 throw runtime_error(
110 "dumpprivkey <bitcoinaddress>\n"
111 "Reveals the private key corresponding to <bitcoinaddress>.");
112
113 string strAddress = params[0].get_str();
114 CBitcoinAddress address;
115 if (!address.SetString(strAddress))
116 throw JSONRPCError(-5, "Invalid bitcoin address");
117 CSecret vchSecret;
118 if (!pwalletMain->GetSecret(address, vchSecret))
119 throw JSONRPCError(-4,"Private key for address " + strAddress + " is not known");
120 return CBitcoinSecret(vchSecret).ToString();
121 }
122
123
124 //
125 // Call Table
(1887 . 6)(1942 . 8)
127 make_pair("listsinceblock", &listsinceblock),
128 make_pair("dumpblock", &dumpblock),
129 make_pair("eatblock", &eatblock),
130 make_pair("importprivkey", &importprivkey),
131 make_pair("dumpprivkey", &dumpprivkey),
132 };
133 map<string, rpcfn_type> mapCallTable(pCallTable, pCallTable + sizeof(pCallTable)/sizeof(pCallTable[0]));
134
- AFE71ADE56FAE65B970FF3DFB3F14EDACEE0AF497AE57E2D2502C9A4B4F49F3336F9D3794B72A87D185B92FC01F1A5077E1CCD63A61AC4FA9C4464C6224FD1E4
+ 6C895CB293F5A285F55BD313D7DF2020BE08F1792B0C6EC649A359661F38FBC6B8045DE847A44CD9FD8429CDC2E960364D2EED6346EE042F32BB46798BCDB189
bitcoin/src/key.h
(14 . 7)(14 . 6)
139
140 #include "serialize.h"
141 #include "uint256.h"
142 #include "base58.h"
143
144 // secp160k1
145 // const unsigned int PRIVATE_KEY_SIZE = 192;
(419 . 12)(418 . 6)
147 return true;
148 }
149
150 // Get the address corresponding to this key
151 CBitcoinAddress GetAddress() const
152 {
153 return CBitcoinAddress(GetPubKey());
154 }
155
156 bool IsValid()
157 {
158 if (!fSet)
- D11A428A6FD4D8431CCE1195406DFF39B0A585A0F44C6156A07A33E02C61D711220747B25BF9C341E88DEAE60719C1DDEB03DF016F7374B966B3A0B830E6F98A
+ 86ECA03A230C96EE276A1269C8F53B60E6D12B104D2805B09227EAC556FD40B76EA817001F0991C3C8929BCBD8281AF4FCB62513059A5B1A18986147D2905DFE
bitcoin/src/keystore.cpp
(29 . 7)(29 . 7)
163 bool CBasicKeyStore::AddKey(const CKey& key)
164 {
165 CRITICAL_BLOCK(cs_KeyStore)
166 mapKeys[key.GetAddress()] = key.GetSecret();
167 mapKeys[CBitcoinAddress(key.GetPubKey())] = key.GetSecret();
168 return true;
169 }
170
- 247C94EA309F95DDC3B90DCD41DD9212BD5269E8772816BB272A1152422CC1C50BEAD6370495043A9ABC924E119C926D55ECD7F39D1022C7D4EB50718188A641
+ ED95D6650AE506D0883462041D5035216FDB08534E179EA59DEABF5226CE23B6922B0A5FF005202F7732265FBB6B5A4612BDBC7D950D6FB921BABBF6BBA83C77
bitcoin/src/keystore.h
(28 . 6)(28 . 15)
175 // This may succeed even if GetKey fails (e.g., encrypted wallets)
176 virtual bool GetPubKey(const CBitcoinAddress &address, std::vector<unsigned char>& vchPubKeyOut) const;
177
178 virtual bool GetSecret(const CBitcoinAddress &address, CSecret& vchSecret) const
179 {
180 CKey key;
181 if (!GetKey(address, key))
182 return false;
183 vchSecret = key.GetSecret();
184 return true;
185 }
186
187 // Generate a new key, and add it to the store
188 virtual std::vector<unsigned char> GenerateNewKey();
189 };
- BDC4FC472BE4A86FB91FA69368FAACE04414FDEEE5B8C82795E31D37E21581B973CAF7F3E9CCC27D487944A5782E3B59615180EAB87C8B3E81242901F3039E4D
+ 5215203AB6BF6D76003D6E82B3C54145FB5F59B41AF5B88D72D315E0723FEA8E1313894707EC159D2303A22109B1D8961AA822AE2DD45416BD00E440832F6EE3
bitcoin/src/wallet.cpp
(224 . 6)(224 . 15)
194 }
195 }
196
197 void CWallet::MarkDirty()
198 {
199 CRITICAL_BLOCK(cs_wallet)
200 {
201 BOOST_FOREACH(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet)
202 item.second.MarkDirty();
203 }
204 }
205
206 bool CWallet::AddToWallet(const CWalletTx& wtxIn)
207 {
208 uint256 hash = wtxIn.GetHash();
- 86F5E1CA584E6AA01B956278EA06EFF4F79B58CA386C490FE605384923F90FCC710FD6BF2F14926D5DFD43E17FC5655A0150B32BC750F05506BAF439255C8E30
+ E99F1C98E8619088D9EC26E6334E58316381F55FA449A510A6595D850302F2C3C250853E2637E4C28C223FCB73E13F7BF74CA2D5C866AFF849D6BDA6D601483F
bitcoin/src/wallet.h
(73 . 6)(73 . 7)
213 bool Unlock(const SecureString& strWalletPassphrase);
214 bool ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase);
215 bool EncryptWallet(const SecureString& strWalletPassphrase);
216 void MarkDirty();
217
218 bool AddToWallet(const CWalletTx& wtxIn);
219 bool AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate = false);