Skip to content

Commit ab39d72

Browse files
committed
Zawy LWMA difficulty algorithm added
1 parent 8511546 commit ab39d72

File tree

9 files changed

+1145
-96
lines changed

9 files changed

+1145
-96
lines changed

configs/bytecoin-v2/forknote.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"genesis-block-reward.json",
1515
"versionized-parameters.json",
1616
"zawy-difficulty-algorithm.json",
17+
"zawy-lwma-difficulty-algorithm.json",
1718
"bugged-zawy-difficulty-algorithm.json",
1819
"block-hosts.json",
1920
"blockchain-explorer.json",
@@ -31,6 +32,7 @@
3132
"multiply/genesis-block-reward.json",
3233
"multiply/versionized-parameters.json",
3334
"multiply/zawy-difficulty-algorithm.json",
35+
"multiply/zawy-lwma-difficulty-algorithm.json",
3436
"multiply/bugged-zawy-difficulty-algorithm.json",
3537
"daemon-getrandom_outs-json.json",
3638
"simplewallet-import-keys.json",

configs/bytecoin/dashcoin.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"extensions": [
3+
"core/bytecoin.json"
4+
],
5+
"base_coin": "bytecoin",
6+
"core": {
7+
"CRYPTONOTE_NAME": "dashcoin.new",
8+
"CRYPTONOTE_DISPLAY_DECIMAL_POINT": 12,
9+
"CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX": 72,
10+
"P2P_DEFAULT_PORT": 29080,
11+
"RPC_DEFAULT_PORT": 29081,
12+
"SEED_NODES": [
13+
"108.61.188.93:7610",
14+
"128.199.146.243:29080",
15+
"195.154.181.121:7280",
16+
"93.77.229.33:29080",
17+
"144.76.59.211:29080",
18+
"176.9.147.178:7280",
19+
"176.9.47.243:7280",
20+
"84.200.76.33:29080",
21+
"98.115.76.178:29080",
22+
"195.154.181.121:7280"
23+
],
24+
"CHECKPOINTS": [
25+
"28000:70d2531151529ac00bf875281e15f51324934bc85e5733dcd92e1ccb1a665ff8",
26+
"40000:c181ec9223a91fef8658c7aa364c093c41c28d250870ca1ed829bf74f0abf038",
27+
"55000:5289fe9f2dce8f51441019b9fbc85c70ad85ff49a666ef0109f3269890c6af6d",
28+
"70000:193e335f34b8b8f1fab3857111cb668c2720340e80176a25155071e573481acb",
29+
"87500:cce8a035f34457ec1098ab41e5949cac3db00ebff3503e26f36bfa057543095a",
30+
"150000:118989862ef4903df981501aae6f5178aee794bdbceb8e01fe76ee15ab960d52",
31+
"200000:bb5b339991347c3b06431b233d3dbf9201e9176ddf4349ee46c60473725d5c98",
32+
"250000:c5b6064258237e911300cdcb6f937b37a6c17932e2bfdcba0ff12a48694709e0",
33+
"298000:5b1f21234c911eb755abce6fa66358558b380526f606222d042eb8b7ce993ae8",
34+
"360000:d9426fcdaa95a8dd2f1d151c2088a0dac2143963b8088d0de02f9c08ec8429f5",
35+
"423000:7e2c45f1a546290a7f7f28cb83c1bdc21f531f410ad0e65a12a5c86b95e194b5",
36+
"529000:b0bbedbd3e8d8051b273a8a7c8e875e1ad4184c37e6cedfb68d930e8235153dd",
37+
"600000:1f265d7710dc8b28478c62d48ef533e462008068cd7a5912b861c350ce82fbae",
38+
"636000:436f4ed7684698160120f25f1bad8aa92c38c93fbedd2b0c74671adf4d4fb191",
39+
"738000:8202b5dc2b070bd7743c44763e6eb5546ea7699f3829dc29594f046f21199b08"
40+
],
41+
"P2P_STAT_TRUSTED_PUB_KEY": "4d26c4df7f4ca7037950ad026f9ab36dd05d881952662992f2e4dcfcafbe57eb",
42+
"GENESIS_COINBASE_TX_HEX": "010a01ff0001ffffffffffff0f029b2e4c0271c0b42e7c53291a94d1c0cbff8883f8024f5142ee494ffbbd08807121013c086a48c15fb637a96991bc6d53caf77068b5ba6eeb3c82357228c49790584a",
43+
"BYTECOIN_NETWORK": "12112111-1110-4101-1311-001212110110",
44+
"UPGRADE_HEIGHT_V2": 91452,
45+
"UPGRADE_HEIGHT_V3": "static_cast<uint32_t>(-1)",
46+
"MAX_BLOCK_SIZE_INITIAL": "25 * 1024",
47+
"MAX_TRANSACTION_SIZE_LIMIT": 19400,
48+
"DEFAULT_FEE": 1000000000
49+
}
50+
}

extensions/bytecoin-v2/bug-fixes.json

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,21 @@
210210
}
211211
]
212212
},
213+
{
214+
"path": "/src/crypto/slow-hash.cpp",
215+
"multiline": true,
216+
"changes": [
217+
{
218+
"action": "replace",
219+
"marker": "(if \\(munmap\\(data, MAP_SIZE\\) != 0\\) {)[^}]+(})",
220+
"parameters": {
221+
"text": [
222+
"\\1\n std::terminate();\n \\2"
223+
]
224+
}
225+
}
226+
]
227+
},
213228
{
214229
"path": "/src/crypto/keccak.c",
215230
"changes": [
@@ -230,6 +245,188 @@
230245
]
231246
},
232247

248+
249+
{
250+
"descritption": "Fix warning as error",
251+
"path": "/src/SimpleWallet/SimpleWallet.cpp",
252+
"changes": [
253+
{
254+
"action": "replace",
255+
"marker": "Tools::SignalHandler::install([&wrpc, &wallet] {",
256+
"parameters": {
257+
"text": [
258+
" Tools::SignalHandler::install([&wrpc] {"
259+
]
260+
}
261+
}
262+
]
263+
},
264+
{
265+
"descritption": "Fix warning as error",
266+
"path": "/src/PaymentGateService/PaymentGateService.cpp",
267+
"changes": [
268+
{
269+
"action": "replace",
270+
"marker": "node->init([&log, &nodeInitStatus](std::error_code ec) {",
271+
"parameters": {
272+
"text": [
273+
" node->init([&nodeInitStatus](std::error_code ec) {"
274+
]
275+
}
276+
}
277+
]
278+
},
279+
{
280+
"descritption": "Fix warning as error",
281+
"path": "/src/BlockchainExplorer/BlockchainExplorer.cpp",
282+
"changes": [
283+
{
284+
"action": "replace",
285+
"marker": "[this, blockIndexesPtr, blocksPtr, topIndex](std::error_code ec) {",
286+
"parameters": {
287+
"text": [
288+
" [this, blockIndexesPtr, blocksPtr](std::error_code ec) {"
289+
]
290+
}
291+
}
292+
]
293+
},
294+
{
295+
"descritption": "Fix warning as error",
296+
"path": "/src/Wallet/WalletGreen.cpp",
297+
"changes": [
298+
{
299+
"action": "replace",
300+
"marker": "bool r = txIdIndex.modify(it, [this, transactionId, &info, totalAmount, &updated](WalletTransaction& transaction) {",
301+
"parameters": {
302+
"text": [
303+
" bool r = txIdIndex.modify(it, [&info, totalAmount, &updated](WalletTransaction& transaction) {"
304+
]
305+
}
306+
},
307+
{
308+
"action": "replace",
309+
"marker": "return eraseTransfers(transactionId, firstTransferIdx, [this, &knownAddresses, eraseOutputTransfers](bool isOutput, const std::string& transferAddress) {",
310+
"parameters": {
311+
"text": [
312+
" return eraseTransfers(transactionId, firstTransferIdx, [&knownAddresses, eraseOutputTransfers](bool isOutput, const std::string& transferAddress) {"
313+
]
314+
}
315+
},
316+
{
317+
"action": "replace",
318+
"marker": "m_transactions.get<TransactionIndex>().modify(it, [this, &transactionHash, &updated](CryptoNote::WalletTransaction& tx) {",
319+
"parameters": {
320+
"text": [
321+
" m_transactions.get<TransactionIndex>().modify(it, [&updated](CryptoNote::WalletTransaction& tx) {"
322+
]
323+
}
324+
}
325+
]
326+
},
327+
{
328+
"descritption": "Fix warning as error",
329+
"path": "/tests/UnitTests/INodeStubs.cpp",
330+
"changes": [
331+
{
332+
"action": "replace",
333+
"marker": "getNewBlocks(std::move(knownBlockIds), *resultHolder, startHeight, [resultHolder, callback, &startHeight, &newBlocks](std::error_code ec)",
334+
"parameters": {
335+
"text": [
336+
" getNewBlocks(std::move(knownBlockIds), *resultHolder, startHeight, [resultHolder, callback, &newBlocks](std::error_code ec)"
337+
]
338+
}
339+
}
340+
]
341+
},
342+
{
343+
"descritption": "Fix warning as error",
344+
"path": "/tests/UnitTests/TestBlockchainExplorer.cpp",
345+
"changes": [
346+
{
347+
"action": "replace",
348+
"marker": "[&status, this](const std::vector<BlockDetails>& newBlocks, const std::vector<BlockDetails>& orphanedBlocks) {",
349+
"parameters": {
350+
"text": [
351+
" [&status](const std::vector<BlockDetails>& newBlocks, const std::vector<BlockDetails>& orphanedBlocks) {"
352+
]
353+
}
354+
},
355+
{
356+
"action": "replace",
357+
"marker": "[&status, &blockHashes, this, NUMBER_OF_BLOCKS](const std::vector<BlockDetails>& newBlocks,",
358+
"parameters": {
359+
"text": [
360+
" [&status, &blockHashes, NUMBER_OF_BLOCKS](const std::vector<BlockDetails>& newBlocks,"
361+
]
362+
}
363+
},
364+
{
365+
"action": "replace",
366+
"marker": "[&status, this](const std::vector<TransactionDetails>& newTransactions,",
367+
"parameters": {
368+
"text": [
369+
" [&status](const std::vector<TransactionDetails>& newTransactions,"
370+
]
371+
}
372+
},
373+
{
374+
"action": "replace",
375+
"marker": "[&status, &poolTxs, this, POOL_TX_NUMBER](const std::vector<TransactionDetails>& newTransactions,",
376+
"parameters": {
377+
"text": [
378+
" [&status, &poolTxs, POOL_TX_NUMBER](const std::vector<TransactionDetails>& newTransactions,"
379+
]
380+
}
381+
},
382+
{
383+
"action": "replace",
384+
"marker": "> cb1 = [&status, this](const std::vector<BlockDetails>& newBlocks,",
385+
"parameters": {
386+
"text": [
387+
" > cb1 = [](const std::vector<BlockDetails>& newBlocks,"
388+
]
389+
}
390+
},
391+
{
392+
"action": "replace",
393+
"marker": "[&status, this](const std::vector<BlockDetails>& newBlocks,",
394+
"parameters": {
395+
"text": [
396+
" [](const std::vector<BlockDetails>& newBlocks,"
397+
]
398+
}
399+
},
400+
{
401+
"action": "replace",
402+
"marker": "[this](const std::vector<BlockDetails>& newBlocks, const std::vector<BlockDetails>& orphanedBlocks) {",
403+
"parameters": {
404+
"text": [
405+
" [](const std::vector<BlockDetails>& newBlocks, const std::vector<BlockDetails>& orphanedBlocks) {"
406+
]
407+
}
408+
},
409+
{
410+
"action": "replace",
411+
"marker": "[&status, this](const std::vector<BlockDetails>& newBlocks, const std::vector<BlockDetails>& orphanedBlocks) {",
412+
"parameters": {
413+
"text": [
414+
" [&status](const std::vector<BlockDetails>& newBlocks, const std::vector<BlockDetails>& orphanedBlocks) {"
415+
]
416+
}
417+
},
418+
{
419+
"action": "replace",
420+
"marker": "[&status, this](const std::vector<TransactionDetails>& newTransactions,",
421+
"parameters": {
422+
"text": [
423+
" [&status](const std::vector<TransactionDetails>& newTransactions,"
424+
]
425+
}
426+
}
427+
]
428+
},
429+
233430
{
234431
"path": "/src/CryptoNoteCore/TransactionValidationErrors.h",
235432
"changes": [

0 commit comments

Comments
 (0)