Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional consensus test for mastery #885

Merged
merged 6 commits into from
Apr 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
modAionImpl/test_resources/masteryStateAt1016684.txt filter=lfs diff=lfs merge=lfs -text
modAionImpl/test_resources/masteryStateAt1023762.txt filter=lfs diff=lfs merge=lfs -text
modAionImpl/test_resources/masteryStateAt720106.txt filter=lfs diff=lfs merge=lfs -text
modAionImpl/test_resources/masteryStateAt449071.txt filter=lfs diff=lfs merge=lfs -text
modAionImpl/test_resources/masteryStorageAt449071.txt filter=lfs diff=lfs merge=lfs -text
12 changes: 0 additions & 12 deletions modAionImpl/src/org/aion/zero/impl/AionBlockchainImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -1369,18 +1369,6 @@ private AionBlockSummary applyBlock(IAionBlock block) {
for (AionTxExecSummary summary : executionSummaries) {
receipts.add(summary.getReceipt());
summaries.add(summary);

// save contract creation data to contract details
AionTxReceipt receipt = summary.getReceipt();
AionTransaction tx = receipt.getTransaction();
if (tx.isContractCreationTransaction() && receipt.isSuccessful()) {
track.saveVmType(
tx.getContractAddress(),
TransactionTypeRule.isValidAVMContractDeployment(tx.getTargetVM())
? TransactionTypes.AVM_CREATE_CODE
// FVM contracts do not always have the correct type
: TransactionTypes.FVM_CREATE_CODE);
}
}
}
Map<Address, BigInteger> rewards = addReward(block);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.aion.types.Hash256;
import org.aion.zero.exceptions.HeaderStructureException;
import org.aion.zero.impl.blockchain.ChainConfiguration;
import org.aion.zero.impl.config.CfgAion;
import org.aion.zero.impl.core.energy.AbstractEnergyStrategyLimit;
import org.aion.zero.impl.core.energy.TargetStrategy;
import org.aion.zero.impl.db.AionContractDetailsImpl;
Expand Down Expand Up @@ -398,6 +397,7 @@ public AbstractEnergyStrategyLimit getEnergyLimitStrategy() {
bc.getRepository().getBlockStore().saveBlock(parentBest, totalDiffParent, true);
bc.getRepository().getBlockStore().saveBlock(best, totalDiff, true);
bc.setBestBlock(best);
bc.setTotalDifficulty(totalDiff);
bc.getRepository().loadImportableState(trieData, DatabaseType.STATE);
bc.getRepository().getWorldState().setRoot(best.getStateRoot());
bc.getRepository().getWorldState().sync(false);
Expand Down

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions modAionImpl/test_resources/masteryStateAt1023762.txt
Git LFS file not shown
1 change: 1 addition & 0 deletions modAionImpl/test_resources/masteryStateAt250717.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f905f3f876a0ff786748c4dae7942711ee8eb3439f3f2b6ea7b3d906305c2cc324eeba850598b853f85180a03561d92626d7acd37bc985c7176fc845ae1d876ad6bcd99756ba6fec30ca35738080808080808080808080a02faeb808481288c405db90d9126584e6411f907756807f3239f7616b2c41badc808080f898a0ca800af41aaf9d973d025f89cb4b4904c434ca5273b8811409cdbeaca59e9669b875f873a0365f2af53c805b6b31dbb9ad5a5cb4a3f89961fffc76ae93e3575d2688260d71b850f84e808a3a8b41932f3bbeed06b8a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f897a03561d92626d7acd37bc985c7176fc845ae1d876ad6bcd99756ba6fec30ca3573b874f872a020ababb7fc6699d3178df12ebdd141b095ec0076586b8c4d4fae7f5a563c8263b84ff84d01890180446bd24f656000a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f897a08044eb2b9ffb917591b14cfc09f5d41ae6d9abdbfdf3a369a6c6480d5524d0a6b874f872a03baa19fd2249424c6876a14b4e1313aaaec2776dfa5b51c7169658ab3c03b8edb84ff84d0e8901e9fd58efa8625000a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f89aa02faeb808481288c405db90d9126584e6411f907756807f3239f7616b2c41badcb877f875a020955bfb84f3efa2043bed4bfa90ff3cd072b419b3f601c8dc930f6029e9c171b852f850038c0103a6e5bc70fd9c0ab38000a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f897a022bbf941b5b0ac42f58c8e5f44fec0d59663114448655e4b0ad45af8b713b44ab874f872a0200a76619d1898d7265ded662bdf5b10c9df8d2ab8b73d18872929b781fbecd7b84ff84d8089740186c333383422c9a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f8d6a0aa7ed7f11d46e4aa493c6a00659e873542fce66f740068d73dc12982e219c92cb8b3f8b18080a0ca800af41aaf9d973d025f89cb4b4904c434ca5273b8811409cdbeaca59e96698080808080a0beb637c787490ee23d2946583d43a8cd6c444d05e9f2a3c64ff1e38eca50b40f808080a097b58305ab74d1c243a6fadef0e824c3215dbed9a6287ca1c139a548a0ef1999a0ff786748c4dae7942711ee8eb3439f3f2b6ea7b3d906305c2cc324eeba85059880a08044eb2b9ffb917591b14cfc09f5d41ae6d9abdbfdf3a369a6c6480d5524d0a680f876a0beb637c787490ee23d2946583d43a8cd6c444d05e9f2a3c64ff1e38eca50b40fb853f851a01718b04fa8c28bd5159e183827b0ee227590fb3d28383bf0d4a167d5594416aa8080808080808080808080808080a022bbf941b5b0ac42f58c8e5f44fec0d59663114448655e4b0ad45af8b713b44a80f88ea01718b04fa8c28bd5159e183827b0ee227590fb3d28383bf0d4a167d5594416aab86bf869a0205ff8943e102428313e141d414bda168a65c16f3a7b75e9cf5ccd5702cf7a66b846f8448080a005fd02342b56544ead95ab1e477b0baaa70f75b109b23098a84b67bf52c25deba00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8f898a097b58305ab74d1c243a6fadef0e824c3215dbed9a6287ca1c139a548a0ef1999b875f873a03159efc25eac3a247b2e85333234f1a984e5a026618911c65ffb1debe7d6c099b850f84e018a152cf4e66b98dfb4e000a045b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0a00e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8
1 change: 1 addition & 0 deletions modAionImpl/test_resources/masteryStateAt257158.txt

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions modAionImpl/test_resources/masteryStateAt449071.txt
Git LFS file not shown
3 changes: 3 additions & 0 deletions modAionImpl/test_resources/masteryStateAt720106.txt
Git LFS file not shown
3 changes: 3 additions & 0 deletions modAionImpl/test_resources/masteryStorageAt449071.txt
Git LFS file not shown