From 05eb1525b373b3a71dd8bcf9a8426f5321b4a7da Mon Sep 17 00:00:00 2001 From: marlonhanks Date: Tue, 11 May 2021 15:35:43 +0000 Subject: [PATCH] updated build heap size --- .gitignore | 2 + build.gradle | 4 +- .../litetokens/index/AccountIndex.index | Bin 0 -> 12288 bytes .../litetokens/index/AssetIssueIndex.index | Bin 0 -> 36864 bytes .../.config/litetokens/index/BlockIndex.index | Bin 0 -> 61440 bytes .../litetokens/index/TransactionIndex.index | Bin 0 -> 36864 bytes .../litetokens/index/WitnessIndex.index | Bin 0 -> 28672 bytes .../vm/EnergyWhenRequireStyleTest.java | 19 ++++++--- .../org/litetokens/core/db/ManagerTest.java | 36 +++++++++--------- .../net/node/GetBlockChainSummaryTest.java | 4 +- 10 files changed, 40 insertions(+), 25 deletions(-) create mode 100644 od/home/andres/.config/litetokens/index/AccountIndex.index create mode 100644 od/home/andres/.config/litetokens/index/AssetIssueIndex.index create mode 100644 od/home/andres/.config/litetokens/index/BlockIndex.index create mode 100644 od/home/andres/.config/litetokens/index/TransactionIndex.index create mode 100644 od/home/andres/.config/litetokens/index/WitnessIndex.index diff --git a/.gitignore b/.gitignore index d659b327a..f6a291453 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,8 @@ src/main/resources/META-INF/ # output directory /output-directory/ +/xlt-testnet-rc1-output-directory/ +/output_ChargeTest/ /output_manager/ /output_witness/ diff --git a/build.gradle b/build.gradle index 4336bdfb8..7f69a8578 100755 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,9 @@ buildscript { plugins { id "org.sonarqube" version "2.6" } - +tasks.withType(JavaExec) { + jvmArgs = ['-Xms2048m', '-Xmx2048m'] +} group 'org.litetokens' version '1.0.0' diff --git a/od/home/andres/.config/litetokens/index/AccountIndex.index b/od/home/andres/.config/litetokens/index/AccountIndex.index new file mode 100644 index 0000000000000000000000000000000000000000..821aecf5f2c18c035ec77a177ac7bd84a23d9dc3 GIT binary patch literal 12288 zcmeI#&r8EF6bJA$QwD;%+YVlyw-tsL+1=I!EUT;5$Tkp0e?+L%jcu9CWB*G39ka2C z=z8m6hi@QF!pqAGpPc&i=x18d>vaAeX}V?&#yPtoVvKRqYo_nodVRE8n9=$*FPn09 zb?ls)C_npR=P%}i1_1~_00Izz00bZa0SG_<0uZQ9py0gTbUIdXkxf#yN@iKQ8b?Vo zT~2hArgODej6b4$sgjwF^FNW=Z73Wm$m@5-kjir@=$q*Od}?iuwu?)v-t3r5C>_Q5 z-ctM0`L?`tTwjzFn8t4^(LMD^t{=E<+7u)yhO$i$p?B|uBkG9}wSG2k_t-WKJb4#9 zOA3R5*F9OAH>!ijNf3Yl1Rwwb2tWV=5P$##AOHaf9G(FF{}1m?a3csn00Izz00bZa O0SG_<0uX>e)dJr@?r_}z literal 0 HcmV?d00001 diff --git a/od/home/andres/.config/litetokens/index/AssetIssueIndex.index b/od/home/andres/.config/litetokens/index/AssetIssueIndex.index new file mode 100644 index 0000000000000000000000000000000000000000..7a9d376ace1ce432fde794244a0513bbf749c5ec GIT binary patch literal 36864 zcmeI#QBT@X6u|Ko!J<>AczZq_`PPZXHh?Xj@t?r@a$G)3ky* z*VMT@OZmMW;{ipW)OX){xXY+33`^N6Gdv${Y0R#|0009IL zKmdVM1pHFbFi$JGzuO=7$^Qt}DH|>rSN{_PqYByuNb=Q`sGRoxz{Mwd1x` zwJlLUJFzZBVg=DUQwfn(#NOi=W&f37m=)E~*mF9AxG`gj6rWnLtF@*TKhmi4Rd&6G z{3dMc(%u)3Bdh*x>(pxRi;wO4hidyuG^{JJ7vw&rmCNFyZohARwne*jQ9tpwR}Hgq zr2B6o0bS3Tc=3cm*hoYS(&iHp#TcXnkOu|BJW`EKBO!zQWy&D1nur;sg^2zK=gYid zo?E(KiR2vJ59P$^^(NAFqZeg3qmYOi&Wv{rX9cuxR}9lqO-9p(A6eE7$MT85;mkPW z`SSg{^_t5WX7y0_cOrp@PTbo*i>xGq{(d%UfzF}<;0xU_4^;YE~ODb009ILKmY**5I_I{1Q5uG0Q>)pOayHpfB*srAbl~zYE@Mg141I97DO!#gg{#{R7q?kL+U80`+x;y zW#M!1br|^^OiZ{<;#?>8P|9}yk)pcy;hXb2_c}RmUhliUBR+I`rww0hYl~Vcr9Blw z)3kK(E(Y(>s}Nkwj{XV$>e6-6Wm?;qE9HaULi(Fl>=rYHcK&z%UG7(|oc)>I$o$A; z7rv+e1f9GPKmY**5I{gd0k2?~kJj|Q;d-`n)#|$T)rsF}*mlo3J3F~(w9lPZ*KfAR zjm2j*t5ml{Y(QHrNdty>yxKzDV-nXXj z*lB)rTK=B%S=6ng`ntGTVR-$jR(V;f9g98dSgeEthhtV(#bKrXqWZQjYSqKa?w6cl zKH1Xy_a%hRrRVfw9OU+V429f3@EdE$eIdwF)-bn%#TyccJaAwlx8!12I^Jkb%8K+)ci=;4B4?gSsgk%*#02T0MjObkJPgvvqPdT!O$#qEyL z{Pa=sdkycb(emAn7k#8i?M95o^t>^M+!vZG%}pOAdEoHzA}u=~BO}j9!WlepZY6Uu zYnYEW^?p%0NzHbr^~pOwZ8|-9k4VjPF)mW~n|t`RlhX}zd0FotN{^7?n8*^T zq~N0mrMzD)-{A`e>!vI!Ld1Q0*~0R#|0009ILKtNf6zXy1yH2?qr literal 0 HcmV?d00001 diff --git a/od/home/andres/.config/litetokens/index/TransactionIndex.index b/od/home/andres/.config/litetokens/index/TransactionIndex.index new file mode 100644 index 0000000000000000000000000000000000000000..16d1c3bc3d48aafbde1e32320d07930f7927dfc1 GIT binary patch literal 36864 zcmeI#(QDH{9Ki9kYnM*fITXo*Aotj^A&x%yB(rrv%j&8zvJD?f+GG%EldX+9eGvLz z`RI#(hyRM_+SF@3VG&;f-#}<`zu)DqpZg_nuU~b-BoJruc;qFbVQd@4qVYrs!!XM7 z+>mE_ROCe|y^+5K<@#@zW#d7)S(VYs&9BC--qw$;X7zjZ;pVr^nrz@e009ILKmY** z5I_KdYY9XZ(|WX1n3`ea2bY73(7)^@;V76S-srsd!5h901{X=U8wA-YF0u+&S`uAWt&-Zf2YM-J#EUVpgy?3GTH`A}}N)v^D4V%&ch43fj(lW^@5 zcUN4EAm`=U&unK`ymZ>v`&LIsd|82=(W|9fvbIG(G?-izZlwycK zM!{I)pthGa6l#1`Lyav!?yZ^Do*Y~)3^j3PqPCPYENc8e%6uuB)_$WfwG^3T>_roA zkc4p*`b#CE2G%q-nx0CjsJ$0D_Y0=gkP{fF<)UWJOGa%fYJ8T4R)JcbZYzC-{-Jbk z{QBB#U+a@Y5&{SyfB*srAb5I_I{1Q0*~0R#|0AcFw= z{|s29B7gt_2q1s}0tg_000IagkW&Hn|2bVari}ms2q1s}0tg_000IagfItQT_Wv2M yNJRhv1Q0*~0R#|0009ILKp>|A?EiDRa7-Hk1Q0*~0R#|0009ILKmdUZ0zU!dhlxA@ literal 0 HcmV?d00001 diff --git a/od/home/andres/.config/litetokens/index/WitnessIndex.index b/od/home/andres/.config/litetokens/index/WitnessIndex.index new file mode 100644 index 0000000000000000000000000000000000000000..c6d99dad6e6668b2cae3d553ac2b349b2d2f0894 GIT binary patch literal 28672 zcmeI#O;6h}7{Ku)w6(NRh9*rp?Bd<17+fYajnmQ*X%!tET_!+mLVXERSXM?!H#p|Y z?E~zxuQLOwaUj}(oFe@#MRn}wvE84YgFo$dqa>8ar_=9)M82|?EyuCmN@-bEO+7+A z^U_e2tG0Qu=av8b)~xlq*Hi(G#oyMGFH3)y+RZ=BP4z-S009ILKmY**5I_I{1Rf+X zZ3y?xnw>t5Cgbp8bQX;-j($bSBs@Q#P2;1VgLoE>&XQqlw2F6q-wS-%+1c{1P+1zx-B7YuqjJPAk1c6ccRe?NFBuP4ds zAN!pTUjIOD`v-DG2WBy?mfY(E?|YvE+3)Rjwk9>uuQSb3-9J5rgq~st$%p zk?&b3@W@BpMalPSnHRQjH`F3RLna@ZJ0;n|oC2eKmI>AF_Sz**%cHCBZTUeT9Z3iv zfB*srAb addressToProvateKeys = addTestWitnessAndAccount(); long num = dbManager.getDynamicPropertiesStore().getLatestBlockHeaderNumber(); BlockCapsule blockCapsule0 = createTestBlockCapsule( - 1533529947843L + 3000, + 1620400001000L + 3000, num + 1, dbManager.getDynamicPropertiesStore().getLatestBlockHeaderHash().getByteString(), addressToProvateKeys); BlockCapsule blockCapsule1 = createTestBlockCapsule( - 1533529947843L + 3000, + 1620400001000L + 3000, num + 1, dbManager.getDynamicPropertiesStore().getLatestBlockHeaderHash().getByteString(), addressToProvateKeys); @@ -254,7 +254,7 @@ public void fork() BlockCapsule blockCapsule2 = createTestBlockCapsule( - 1533529947843L + 6000, + 1620400001000L + 6000, num + 2, blockCapsule1.getBlockId().getByteString(), addressToProvateKeys); dbManager.pushBlock(blockCapsule2); @@ -299,21 +299,21 @@ public void doNotSwitch() byte[] address = ecKey.getAddress(); WitnessCapsule witnessCapsule = new WitnessCapsule(ByteString.copyFrom(address)); dbManager.addWitness(ByteString.copyFrom(address)); - dbManager.generateBlock(witnessCapsule, 1533529947843L, privateKey, false); + dbManager.generateBlock(witnessCapsule, 1620400001000L, privateKey, false); Map addressToProvateKeys = addTestWitnessAndAccount(); long num = dbManager.getDynamicPropertiesStore().getLatestBlockHeaderNumber(); BlockCapsule blockCapsule0 = createTestBlockCapsule( - 1533529947843L + 3000, + 1620400001000L + 3000, num + 1, dbManager.getDynamicPropertiesStore().getLatestBlockHeaderHash().getByteString(), addressToProvateKeys); BlockCapsule blockCapsule1 = createTestBlockCapsule( - 1533529947843L + 3001, + 1620400001000L + 3001, num + 1, dbManager.getDynamicPropertiesStore().getLatestBlockHeaderHash().getByteString(), addressToProvateKeys); @@ -328,7 +328,7 @@ public void doNotSwitch() BlockCapsule blockCapsule2 = createTestBlockCapsule( - 1533529947843L + 6000, + 1620400001000L + 6000, num + 2, blockCapsule1.getBlockId().getByteString(), addressToProvateKeys); logger.info("******block2:" + blockCapsule2); try { @@ -348,7 +348,7 @@ public void doNotSwitch() } BlockCapsule blockCapsule3 = - createTestBlockCapsule(1533529947843L + 9000, + createTestBlockCapsule(1620400001000L + 9000, dbManager.getDynamicPropertiesStore().getLatestBlockHeaderNumber() + 1, dbManager.getDynamicPropertiesStore().getLatestBlockHeaderHash().getByteString(), addressToProvateKeys); @@ -363,7 +363,7 @@ public void doNotSwitch() .getBlockId()); BlockCapsule blockCapsule4 = - createTestBlockCapsule(1533529947843L + 12000, + createTestBlockCapsule(1620400001000L + 12000, dbManager.getDynamicPropertiesStore().getLatestBlockHeaderNumber() + 1, blockCapsule3.getBlockId().getByteString(), addressToProvateKeys); logger.info("******block4:" + blockCapsule4); @@ -396,12 +396,12 @@ public void testLastHeadBlockIsMaintenance() WitnessCapsule witnessCapsule = new WitnessCapsule(ByteString.copyFrom(address)); dbManager.addWitness(ByteString.copyFrom(address)); BlockCapsule blockCapsule = - dbManager.generateBlock(witnessCapsule, 1533529947843L, privateKey, true); + dbManager.generateBlock(witnessCapsule, 1620400001000L, privateKey, true); //has processed the first block of the maintenance period before starting the block dbManager.getWitnessStore().reset(); dbManager.getDynamicPropertiesStore().saveStateFlag(0); - blockCapsule = dbManager.generateBlock(witnessCapsule, 1533529947843L, privateKey, true); + blockCapsule = dbManager.generateBlock(witnessCapsule, 1620400001000L, privateKey, true); Assert.assertTrue(blockCapsule == null); } @@ -421,21 +421,21 @@ public void switchBack() byte[] address = ecKey.getAddress(); WitnessCapsule witnessCapsule = new WitnessCapsule(ByteString.copyFrom(address)); dbManager.addWitness(ByteString.copyFrom(address)); - dbManager.generateBlock(witnessCapsule, 1533529947843L, privateKey, false); + dbManager.generateBlock(witnessCapsule, 1620400001000L, privateKey, false); Map addressToProvateKeys = addTestWitnessAndAccount(); long num = dbManager.getDynamicPropertiesStore().getLatestBlockHeaderNumber(); BlockCapsule blockCapsule0 = createTestBlockCapsule( - 1533529947843L + 3000, + 1620400001000L + 3000, num + 1, dbManager.getDynamicPropertiesStore().getLatestBlockHeaderHash().getByteString(), addressToProvateKeys); BlockCapsule blockCapsule1 = createTestBlockCapsule( - 1533529947843L + 3000, + 1620400001000L + 3000, num + 1, dbManager.getDynamicPropertiesStore().getLatestBlockHeaderHash().getByteString(), addressToProvateKeys); @@ -445,7 +445,7 @@ public void switchBack() try { BlockCapsule blockCapsule2 = createTestBlockCapsuleError( - 1533529947843L + 6000, + 1620400001000L + 6000, num + 2, blockCapsule1.getBlockId().getByteString(), addressToProvateKeys); dbManager.pushBlock(blockCapsule2); @@ -459,7 +459,7 @@ public void switchBack() BlockCapsule blockCapsule3 = createTestBlockCapsule( - 1533529947843L + 9000, + 1620400001000L + 9000, dbManager.getDynamicPropertiesStore().getLatestBlockHeaderNumber() + 1, blockCapsule0.getBlockId().getByteString(), addressToProvateKeys); dbManager.pushBlock(blockCapsule3); @@ -473,7 +473,7 @@ public void switchBack() BlockCapsule blockCapsule4 = createTestBlockCapsule( - 1533529947843L + 12000, + 1620400001000L + 12000, dbManager.getDynamicPropertiesStore().getLatestBlockHeaderNumber() + 1, blockCapsule3.getBlockId().getByteString(), addressToProvateKeys); dbManager.pushBlock(blockCapsule4); diff --git a/src/test/java/org/litetokens/core/net/node/GetBlockChainSummaryTest.java b/src/test/java/org/litetokens/core/net/node/GetBlockChainSummaryTest.java index da56523d5..319cb8d10 100644 --- a/src/test/java/org/litetokens/core/net/node/GetBlockChainSummaryTest.java +++ b/src/test/java/org/litetokens/core/net/node/GetBlockChainSummaryTest.java @@ -174,7 +174,9 @@ public void testGetBlockChainSummary() { ReflectUtils.setFieldValue(peer_he, "headBlockTimeWeBothHave", System.currentTimeMillis()); Deque retSummary = del .getBlockChainSummary(peer_he.getHeadBlockWeBothHave(), peer_he.getSyncBlockToFetch()); - Assert.assertTrue(retSummary.size() == 4); + // kedia debug: logger.info("Kedia The sum is " + retSummary.size()); + // the below changes to 3 when SOLIDIFIED_THRESHOLD changes to 10 + Assert.assertTrue(retSummary.size() == 3); } catch (Exception e) { System.out.println("exception!"); }