tree checksum vpatch file split hunks

all signers: mircea_popescu trinque asciilifeform ben_vulpes mod6

antecedents: bitcoin-asciilifeform.1 genesis 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
funken_prikey_tools

patch:

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