Skip to content

Commit a89b6e8

Browse files
authored
Merge pull request #611 from KomodoPlatform/dev
0.8.2 [Smaug]
2 parents 41265fb + 261233c commit a89b6e8

15 files changed

+297
-128
lines changed

configure.ac

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
22
AC_PREREQ([2.60])
33
define(_CLIENT_VERSION_MAJOR, 0)
44
define(_CLIENT_VERSION_MINOR, 8)
5-
define(_CLIENT_VERSION_REVISION, 1)
6-
define(_CLIENT_VERSION_BUILD, 2)
5+
define(_CLIENT_VERSION_REVISION, 2)
6+
define(_CLIENT_VERSION_BUILD, 0)
77
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
88
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
99
define(_CLIENT_VERSION_IS_RELEASE, true)
10-
define(_COPYRIGHT_YEAR, 2023)
10+
define(_COPYRIGHT_YEAR, 2024)
1111
AC_INIT([Komodo],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_SUFFIX(_ZC_BUILD_VAL)],[https://github.com/KomodoPlatform/komodo/issues],[komodo])
1212
AC_CONFIG_SRCDIR([src/main.cpp])
1313
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])

src/assetchains.json

+19-85
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
[
2-
{
3-
"ac_name": "BET",
4-
"ac_supply": "999999"
5-
},
6-
{
7-
"ac_name": "BOTS",
8-
"ac_supply": "999999"
9-
},
102
{
113
"ac_name": "CCL",
124
"ac_supply": "200000000",
135
"ac_end": "1",
146
"ac_cc": "2",
157
"addressindex": "1",
168
"spentindex": "1",
17-
"addnode": ["142.93.136.89", "195.201.22.89"]
9+
"addnode": ["209.222.101.247", "103.195.100.32", "142.93.136.89", "195.201.22.89", "15.235.204.174", "148.113.1.52", "65.21.77.109", "89.19.26.211", "89.19.26.212"]
1810
},
1911
{
2012
"ac_name": "CLC",
@@ -27,116 +19,58 @@
2719
"ac_snapshot":"1440",
2820
"ac_pubkey":"02df9bda7bfe2bcaa938b29a399fb0ba58cfb6cc3ddc0001062a600f60a8237ad9",
2921
"ac_adaptivepow":"6",
30-
"addnode": ["node.cryptocollider.com"]
22+
"addnode": ["209.222.101.247", "103.195.100.32", "node.cryptocollider.com", "15.235.204.174", "148.113.1.52", "65.21.77.109", "89.19.26.211", "89.19.26.212"]
3123
},
3224
{
33-
"ac_name": "CRYPTO",
34-
"ac_supply": "999999"
35-
},
36-
{
37-
"ac_name": "DEX",
38-
"ac_supply": "999999"
25+
"ac_name": "DOC",
26+
"ac_supply": "90000000000",
27+
"ac_reward": "100000000",
28+
"ac_cc": "3",
29+
"ac_staked": "10",
30+
"addnode": ["209.222.101.247", "103.195.100.32", "65.21.77.109", "65.21.51.47", "15.235.204.174", "148.113.1.52", "65.21.77.109", "89.19.26.211", "89.19.26.212"]
3931
},
4032
{
4133
"ac_name": "GLEEC",
4234
"ac_supply": "210000000",
4335
"ac_public": "1",
4436
"ac_staked": "100",
45-
"addnode":["95.217.161.126"]
46-
},
47-
{
48-
"ac_name": "HODL",
49-
"ac_supply": "9999999"
37+
"addnode": ["209.222.101.247", "103.195.100.32", "95.217.161.126", "15.235.204.174", "148.113.1.52", "65.21.77.109", "89.19.26.211", "89.19.26.212"]
5038
},
5139
{
5240
"ac_name": "ILN",
5341
"ac_supply": "10000000000",
5442
"ac_cc": "2",
55-
"addnode": ["51.75.122.83"]
56-
},
57-
{
58-
"ac_name": "JUMBLR",
59-
"ac_supply": "999999"
43+
"addnode": ["209.222.101.247", "103.195.100.32", "51.75.122.83", "15.235.204.174", "148.113.1.52", "65.21.77.109", "89.19.26.211", "89.19.26.212"]
6044
},
6145
{
6246
"ac_name": "KOIN",
6347
"ac_supply": "125000000",
64-
"addnode": ["3.0.32.10"]
65-
},
66-
{
67-
"ac_name": "MESH",
68-
"ac_supply": "1000007",
69-
"ac_ccactivate": "320000"
70-
},
71-
{
72-
"ac_name": "MGW",
73-
"ac_supply": "999999"
48+
"addnode": ["209.222.101.247", "103.195.100.32", "3.0.32.10", "15.235.204.174", "148.113.1.52", "65.21.77.109", "89.19.26.211", "89.19.26.212"]
7449
},
7550
{
76-
"ac_name": "MORTY",
51+
"ac_name": "MARTY",
7752
"ac_supply": "90000000000",
7853
"ac_reward": "100000000",
7954
"ac_cc": "3",
8055
"ac_staked": "10",
81-
"addnode": ["138.201.136.145", "95.217.44.58"]
82-
},
83-
{
84-
"ac_name": "MSHARK",
85-
"ac_supply": "1400000"
56+
"addnode": ["209.222.101.247", "103.195.100.32", "65.21.77.109", "65.21.51.47", "15.235.204.174", "148.113.1.52", "65.21.77.109", "89.19.26.211", "89.19.26.212"]
8657
},
8758
{
8859
"ac_name": "NINJA",
89-
"ac_supply": "100000000"
90-
},
91-
{
92-
"ac_name": "PANGEA",
93-
"ac_supply": "999999"
60+
"ac_supply": "100000000",
61+
"addnode": ["209.222.101.247", "103.195.100.32", "209.222.101.247", "103.195.100.32", "15.235.204.174", "148.113.1.52", "65.21.77.109", "89.19.26.211", "89.19.26.212"]
9462
},
9563
{
9664
"ac_name": "PIRATE",
9765
"ac_supply": "0",
9866
"ac_reward": "25600000000",
9967
"ac_halving": "77777",
10068
"ac_private": "1",
101-
"addnode": ["88.99.212.81"]
102-
},
103-
{
104-
"ac_name": "REVS",
105-
"ac_supply": "1300000"
106-
},
107-
{
108-
"ac_name": "RICK",
109-
"ac_supply": "90000000000",
110-
"ac_reward": "100000000",
111-
"ac_cc": "3",
112-
"ac_staked": "10",
113-
"addnode": ["138.201.136.145", "95.217.44.58"]
69+
"addnode": ["209.222.101.247", "103.195.100.32", "88.99.212.81", "15.235.204.174", "148.113.1.52", "65.21.77.109", "89.19.26.211", "89.19.26.212"]
11470
},
11571
{
11672
"ac_name": "SUPERNET",
117-
"ac_supply": "816061"
118-
},
119-
{
120-
"ac_name": "THC",
121-
"ac_supply": "251253103",
122-
"ac_reward": "360000000,300000000,240000000,180000000,150000000,90000000,0",
123-
"ac_staked": "100",
124-
"ac_eras": "7",
125-
"ac_end": "500001,1000001,1500001,2000001,2500001,4500001,0",
126-
"ac_perc": "233333333",
127-
"ac_cc": "2",
128-
"ac_ccenable": "229,236,240",
129-
"ac_script": "2ea22c8020987fad30df055db6fd922c3a57e55d76601229ed3da3b31340112e773df3d0d28103120c008203000401ccb8",
130-
"ac_founders": "150",
131-
"ac_cbmaturity": "1",
132-
"ac_sapling": "1",
133-
"earlytxid": "7e4a76259e99c9379551389e9f757fc5f46c33ae922a8644dc2b187af2a6adc1",
134-
"addnode": ["157.230.45.184", "165.22.52.123"]
135-
},
136-
{
137-
"ac_name": "ZILLA",
138-
"ac_supply": "11000000",
139-
"ac_sapling": "5000000",
140-
"addnode": ["51.68.215.104"]
73+
"ac_supply": "816061",
74+
"addnode": ["209.222.101.247", "103.195.100.32", "209.222.101.247", "103.195.100.32", "15.235.204.174", "148.113.1.52", "65.21.77.109", "89.19.26.211", "89.19.26.212"]
14175
}
142-
]
76+
]

src/assetchains.old

-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ komodod -pubkey=$pubkey -ac_name=MARTY -ac_supply=90000000000 -ac_reward=1000000
1313
komodod -pubkey=$pubkey -ac_name=NINJA -ac_supply=100000000 -addnode=95.213.238.98 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 &
1414
komodod -pubkey=$pubkey -ac_name=PIRATE -ac_supply=0 -ac_reward=25600000000 -ac_halving=77777 -ac_private=1 -addnode=88.99.212.81 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 &
1515
komodod -pubkey=$pubkey -ac_name=SUPERNET -ac_supply=816061 -addnode=95.213.238.98 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 &
16-
komodod -pubkey=$pubkey -ac_name=THC -ac_supply=251253103 -ac_reward=360000000,300000000,240000000,180000000,150000000,90000000,0 -ac_staked=100 -ac_eras=7 -ac_end=500001,1000001,1500001,2000001,2500001,4500001,0 -ac_perc=233333333 -ac_cc=2 -ac_ccenable=229,236,240 -ac_script=2ea22c8020987fad30df055db6fd922c3a57e55d76601229ed3da3b31340112e773df3d0d28103120c008203000401ccb8 -ac_founders=150 -ac_cbmaturity=1 -ac_sapling=1 -addnode=157.230.45.184 -addnode=165.22.52.123 -earlytxid=7e4a76259e99c9379551389e9f757fc5f46c33ae922a8644dc2b187af2a6adc1 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 &

src/chain.h

+60
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ extern CCriticalSection cs_main;
3939

4040
static const int SPROUT_VALUE_VERSION = 80102;
4141
static const int SAPLING_VALUE_VERSION = 80102;
42+
static const int TRANSPARENT_VALUE_VERSION = 80103;
43+
static const int BURNED_VALUE_VERSION = 80104;
4244

4345
// These 5 are declared here to avoid circular dependencies
4446
// code used this moved into .cpp
@@ -193,6 +195,44 @@ class CBlockIndex
193195
//! (memory only) The anchor for the tree state up to the end of this block
194196
uint256 hashFinalSproutRoot;
195197

198+
//! The change to the chain supply caused by this block. This is defined as
199+
//! the value of the coinbase outputs in this block, minus fees not claimed
200+
//! by the miner.
201+
//!
202+
//! Will be boost::none under the following conditions:
203+
//! - if the block has never been connected to a chain tip
204+
//! - for older blocks until a reindex has taken place
205+
boost::optional<CAmount> nChainSupplyDelta;
206+
207+
//! (memory only) Total chain supply up to and including this block.
208+
//!
209+
//! Will be boost::none until a reindex has taken place, if nChainTx is
210+
//! zero, or if the block has never been connected to a chain tip.
211+
boost::optional<CAmount> nChainTotalSupply;
212+
213+
//! Change in value in the transparent pool produced by the action of the
214+
//! transparent inputs to and outputs from transactions in this block.
215+
//!
216+
//! Will be boost::none for older blocks until a reindex has taken place.
217+
boost::optional<CAmount> nTransparentValue;
218+
219+
//! (memory only) Total value of the transparent value pool up to and
220+
//! including this block.
221+
//!
222+
//! Will be boost::none until a reindex has taken place.
223+
//! Will be boost::none if nChainTx is zero.
224+
boost::optional<CAmount> nChainTransparentValue;
225+
226+
// This refers to the number of coins burned in this block,
227+
// essentially making them unspendable (due to the OP_RETURN scripts value).
228+
//!
229+
//! For older blocks, this will be boost::none until a reindexing has occurred.
230+
boost::optional<CAmount> nBurnedAmountDelta;
231+
232+
//! (memory only) Total value of the burned coins up to and
233+
//! including this block.
234+
boost::optional<CAmount> nChainTotalBurned;
235+
196236
//! Change in value held by the Sprout circuit over this block.
197237
//! Will be boost::none for older blocks on old nodes until a reindex has taken place.
198238
boost::optional<CAmount> nSproutValue;
@@ -249,6 +289,13 @@ class CBlockIndex
249289
hashSproutAnchor = uint256();
250290
hashFinalSproutRoot = uint256();
251291
nSequenceId = 0;
292+
293+
nChainSupplyDelta = boost::none;
294+
nChainTotalSupply = boost::none;
295+
nTransparentValue = boost::none;
296+
nChainTransparentValue = boost::none;
297+
nBurnedAmountDelta = boost::none;
298+
nChainTotalBurned = boost::none;
252299
nSproutValue = boost::none;
253300
nChainSproutValue = boost::none;
254301
nSaplingValue = 0;
@@ -443,6 +490,19 @@ class CDiskBlockIndex : public CBlockIndex
443490
READWRITE(nNonce);
444491
READWRITE(nSolution);
445492

493+
// Only read/write nTransparentValue if the client version used to create
494+
// this index was storing them.
495+
if ((s.GetType() & SER_DISK) && (nVersion >= TRANSPARENT_VALUE_VERSION)) {
496+
READWRITE(nChainSupplyDelta);
497+
READWRITE(nTransparentValue);
498+
}
499+
500+
// Only read/write nBurnedAmountDelta if the client version used to create
501+
// this index was storing them.
502+
if ((s.GetType() & SER_DISK) && (nVersion >= BURNED_VALUE_VERSION)) {
503+
READWRITE(nBurnedAmountDelta);
504+
}
505+
446506
// Only read/write nSproutValue if the client version used to create
447507
// this index was storing them.
448508
if ((s.GetType() & SER_DISK) && (nVersion >= SPROUT_VALUE_VERSION)) {

src/clientversion.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
//! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
3333
#define CLIENT_VERSION_MAJOR 0
3434
#define CLIENT_VERSION_MINOR 8
35-
#define CLIENT_VERSION_REVISION 1
36-
#define CLIENT_VERSION_BUILD 2
35+
#define CLIENT_VERSION_REVISION 2
36+
#define CLIENT_VERSION_BUILD 0
3737

3838
//! Set to true for release, false for prerelease or test build
3939
#define CLIENT_VERSION_IS_RELEASE true
@@ -42,7 +42,7 @@
4242
* Copyright year (2009-this)
4343
* Todo: update this when changing our copyright comments in the source
4444
*/
45-
#define COPYRIGHT_YEAR 2023
45+
#define COPYRIGHT_YEAR 2024
4646

4747
#endif //HAVE_CONFIG_H
4848

src/coins.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,12 @@ const CScript &CCoinsViewCache::GetSpendFor(const CTxIn& input) const
590590
* @returns Sum of value of all inputs (scriptSigs), (positive valueBalance or zero) and JoinSplit vpub_new
591591
*/
592592
CAmount CCoinsViewCache::GetValueIn(int32_t nHeight,int64_t &interestp,const CTransaction& tx) const
593+
{
594+
return GetTransparentValueIn(nHeight, interestp, tx) + tx.GetShieldedValueIn();
595+
}
596+
597+
// TODO: remove this if it ends up unused
598+
CAmount CCoinsViewCache::GetTransparentValueIn(int32_t nHeight,int64_t &interestp,const CTransaction& tx) const
593599
{
594600
CAmount value,nResult = 0;
595601
interestp = 0;
@@ -617,7 +623,6 @@ CAmount CCoinsViewCache::GetValueIn(int32_t nHeight,int64_t &interestp,const CTr
617623
}
618624
#endif
619625
}
620-
nResult += tx.GetShieldedValueIn();
621626

622627
return nResult;
623628
}

src/coins.h

+13-2
Original file line numberDiff line numberDiff line change
@@ -562,11 +562,22 @@ class CCoinsViewCache : public CCoinsViewBacked
562562
* so may not be able to calculate this.
563563
* @param[in] nHeight the chain height
564564
* @param[out] interestp the interest found
565-
* @param[in] tx transaction for which we are checking input total
566-
* @returns Sum of value of all inputs (scriptSigs), (positive valueBalance or zero) and JoinSplit vpub_new
565+
* @param[in] tx transaction for which we are checking input total
566+
* @return Sum of value of all inputs (scriptSigs), JoinSplit vpub_new, and
567+
* positive values of valueBalanceSapling, and valueBalanceOrchard.
567568
*/
568569
CAmount GetValueIn(int32_t nHeight,int64_t &interestp,const CTransaction& tx) const;
569570

571+
/**
572+
* Amount of coins coming in to a transaction in the transparent inputs.
573+
*
574+
* @param[in] nHeight the chain height
575+
* @param[out] interestp the interest found
576+
* @param[in] tx transaction for which we are checking input total
577+
* @return Sum of value of all inputs (scriptSigs)
578+
*/
579+
CAmount GetTransparentValueIn(int32_t nHeight,int64_t &interestp,const CTransaction& tx) const;
580+
570581
//! Check whether all prevouts of the transaction are present in the UTXO set represented by this view
571582
bool HaveInputs(const CTransaction& tx) const;
572583

src/cryptoconditions/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ libcryptoconditions_core_a_SOURCES = \
6565
src/asn/per_decoder.c \
6666
src/asn/per_encoder.c \
6767
src/asn/per_opentype.c
68-
libcryptoconditions_core_a_CPPFLAGS=-I. -I./src/include -I./src/asn
68+
libcryptoconditions_core_a_CPPFLAGS=-I. -I./src/include -I./src/asn -fPIC
6969

7070
test:
7171
bash -c '[ -d .env ] || virtualenv .env -p python3'

0 commit comments

Comments
 (0)