qortal/src/main/resources/blockchain.json

76 lines
4.2 KiB
JSON
Raw Normal View History

{
NTP and performance changes + fixes. New NTP class now runs as a simplistic NTP client, repeatedly polling several NTP servers and maintaining a more accurate time independent of operating system. Several occurrences of System.currentTimeMillis() replaced with NTP.getTime() particularly where block/transaction/networking is involved. GET /admin/info now includes "currentTimestamp" as reported from NTP. Added support for block timestamps determined by generator, instead of supplied by clock. (BlockChain.newBlockTimestampHeight - not yet activated). Incorrect timestamps will produce a TIMESTAMP_INCORRECT Block.ValidationResult. Block.calcMinimumTimestamp repurposed as Block.calcTimestamp for above. Block timestamps are now allowed to be max 2000ms in the future, was previously max 500ms. Block generation prohibited until initial NTP sync. Instead of deleting INVALID unconfirmed transactions in BlockGenerator, Controller now deletes EXPIRED unconfirmed transactions every so often. This also fixes persistent expired unconfirmed transactions on nodes that do not generate blocks, as BlockGenerator.deleteInvalidTransactions() was never reached. Abbreviated block sigs added to log entries declaring a new block is generated in BlockGenerator. Controller checks for NTP sync much faster during start-up and SysTray's tooltip text starts as "Synchronizing clock" until NTP sync occurs. After NTP sync, Controller logs NTP offset every so often (currently every 5 mins). When considering synchronizing, Controller skips peers that have the same block sig as last time when synchronization resulted in no action, e.g. INFERIOR_CHAIN, NOTHING_TO_DO and also OK. OK is included as another sync attempt would result in NOTHING_TO_DO. Previously this skipping check only happened after prior INFERIOR_CHAIN. During inbound peer handshaking, if we receive a peer ID that matches an existing inbound peer then send peer ID of all zeros, then close connection. Remote end should detect this and cleanly close connection instead of waiting for handshake timeout. Randomly generated peer IDs have lowest bit set to avoid all zeros. Might need further work. Networking doesn't connect, or accept, until NTP has synced. Transaction validation can fail with CLOCK_NOT_SYNCED if NTP not synced.
2019-07-31 16:08:22 +01:00
"blockTimestampMargin": 2000,
New synchronizer and other improvements API call GET /addresses/online reports online accounts, including both addresses relating to the proxy-forge public key. New PeerChainTipData class to replace the broken "peer data lock" that was supposed to make sure peer's last height/blockSig/timestamp were all in sync. Now peer's chain tip data is a single object reference that can be replaced in one go. Removed pointless API calls /blocks/time and /blocks/{generatingbalance}. Various changes, mostly in Block class, to do with switching to BlockTimingByHeight from old min/max block time. New block 'weight' based on number of online accounts and 'distance' of perturbed generator public key from 'ideal' public key (for that particular block's height). New sub-chain 'weight' based on accumulating block weights, currently by shifting previous accumulator left by 8 bits then adding next block's weight. More validation of BlockChain config. Helpful for debugging, probably not very useful to end-users. BlockGenerator now uses unified Peer predicates from Controller, like: Controller.hasMisbehaved, Controller.hasNoRecentBlock, etc. Controller now keeps a list of chain-tip signatures that are for inferior chains, so it doesn't try to synchronize with peers with inferior chains. (This list is wiped when node's blockchain changes/block is generated). Controller now asks Gui to display error box if it can't parse Settings. Controller.potentiallySynchronize() does more filtering of potential peers before calling actuallySynchronize(). (Mostly moved from Synchronizer, so now we expect actuallySynchronize() to do something rather than bail out because it doesn't like the peer after all). If synchronization discovers that peer has an inferior chain, then Controller notifies that peer of our superior chain, to help keep the network in sync. Renamed OnlineAccount to OnlineAccountData, as it is in package org.qora.data after all... Synchronizer reworked to request block summaries so it can judge which chain is better, and hence whether to sync with peer or abort. Slight optimization of Peer.readChannel() to exit earlier if no more network messages can be extracted from buffer. More tests. Improved documentation and logging.
2019-09-26 17:43:50 +01:00
"transactionExpiryPeriod": 86400000,
"maxBlockSize": 2097152,
"maxBytesPerUnitFee": 1024,
"unitFee": "0.001",
"useBrokenMD160ForAddresses": false,
"requireGroupForApproval": false,
"defaultGroupId": 0,
"oneNamePerAccount": true,
"maxProxyRelationships": 20,
"onlineAccountSignaturesMinLifetime": 2592000000,
"onlineAccountSignaturesMaxLifetime": 3196800000,
"genesisInfo": {
"version": 4,
New synchronizer and other improvements API call GET /addresses/online reports online accounts, including both addresses relating to the proxy-forge public key. New PeerChainTipData class to replace the broken "peer data lock" that was supposed to make sure peer's last height/blockSig/timestamp were all in sync. Now peer's chain tip data is a single object reference that can be replaced in one go. Removed pointless API calls /blocks/time and /blocks/{generatingbalance}. Various changes, mostly in Block class, to do with switching to BlockTimingByHeight from old min/max block time. New block 'weight' based on number of online accounts and 'distance' of perturbed generator public key from 'ideal' public key (for that particular block's height). New sub-chain 'weight' based on accumulating block weights, currently by shifting previous accumulator left by 8 bits then adding next block's weight. More validation of BlockChain config. Helpful for debugging, probably not very useful to end-users. BlockGenerator now uses unified Peer predicates from Controller, like: Controller.hasMisbehaved, Controller.hasNoRecentBlock, etc. Controller now keeps a list of chain-tip signatures that are for inferior chains, so it doesn't try to synchronize with peers with inferior chains. (This list is wiped when node's blockchain changes/block is generated). Controller now asks Gui to display error box if it can't parse Settings. Controller.potentiallySynchronize() does more filtering of potential peers before calling actuallySynchronize(). (Mostly moved from Synchronizer, so now we expect actuallySynchronize() to do something rather than bail out because it doesn't like the peer after all). If synchronization discovers that peer has an inferior chain, then Controller notifies that peer of our superior chain, to help keep the network in sync. Renamed OnlineAccount to OnlineAccountData, as it is in package org.qora.data after all... Synchronizer reworked to request block summaries so it can judge which chain is better, and hence whether to sync with peer or abort. Slight optimization of Peer.readChannel() to exit earlier if no more network messages can be extracted from buffer. More tests. Improved documentation and logging.
2019-09-26 17:43:50 +01:00
"timestamp": "1569510000000",
"transactions": [
{ "type": "ISSUE_ASSET", "owner": "QUwGVHPPxJNJ2dq95abQNe79EyBN2K26zM", "assetName": "QORT", "description": "QORTAL coin", "quantity": 10000000, "isDivisible": true, "reference": "28u54WRcMfGujtQMZ9dNKFXVqucY7XfPihXAqPFsnx853NPUwfDJy1sMH5boCkahFgjUNYqc5fkduxdBhQTKgUsC", "data": "{}" },
{ "type": "ISSUE_ASSET", "owner": "QUwGVHPPxJNJ2dq95abQNe79EyBN2K26zM", "assetName": "QORA", "description": "Representative legacy QORA", "quantity": 10000000000, "isDivisible": true, "data": "{}", "isUnspendable": true },
{ "type": "GENESIS", "recipient": "QcatTpaU1UneBs3fVHo8QN6mUmuceRVzFY", "amount": "1000000" },
{ "type": "GENESIS", "recipient": "QcatoCyyp7dVfMtJ92sgUUPDoBJevaemRX", "amount": "1000000" },
{ "type": "GENESIS", "recipient": "QTiga19sttbf6CLQLT83mhCSWEaCvjk8th", "amount": "1000000" },
{ "type": "GENESIS", "recipient": "QcrowX39FuycKvMFFBsakyd5HSxe7bxFsn", "amount": "1000000" },
{ "type": "ACCOUNT_FLAGS", "target": "QcatTpaU1UneBs3fVHo8QN6mUmuceRVzFY", "andMask": -1, "orMask": 1, "xorMask": 0 },
{ "type": "ACCOUNT_FLAGS", "target": "QcatoCyyp7dVfMtJ92sgUUPDoBJevaemRX", "andMask": -1, "orMask": 1, "xorMask": 0 },
{ "type": "ACCOUNT_FLAGS", "target": "QTiga19sttbf6CLQLT83mhCSWEaCvjk8th", "andMask": -1, "orMask": 1, "xorMask": 0 },
{ "type": "ACCOUNT_FLAGS", "target": "QcrowX39FuycKvMFFBsakyd5HSxe7bxFsn", "andMask": -1, "orMask": 1, "xorMask": 0 },
{ "type": "ACCOUNT_LEVEL", "target": "QcatTpaU1UneBs3fVHo8QN6mUmuceRVzFY", "level": 8 },
{ "type": "ACCOUNT_LEVEL", "target": "QcatoCyyp7dVfMtJ92sgUUPDoBJevaemRX", "level": 3 },
{ "type": "ACCOUNT_LEVEL", "target": "QTiga19sttbf6CLQLT83mhCSWEaCvjk8th", "level": 10 },
{ "type": "ACCOUNT_LEVEL", "target": "QcrowX39FuycKvMFFBsakyd5HSxe7bxFsn", "level": 10 },
{ "type": "CREATE_GROUP", "creatorPublicKey": "6rNn9b3pYRrG9UKqzMWYZ9qa8F3Zgv2mVWrULGHUusb", "owner": "QcatTpaU1UneBs3fVHo8QN6mUmuceRVzFY", "groupName": "dev-group", "description": "developer group", "isOpen": false, "approvalThreshold": "PCT60", "minimumBlockDelay": 0, "maximumBlockDelay": 1440 },
{ "type": "CREATE_GROUP", "creatorPublicKey": "JBNBQQDzZsm5do1BrwWAp53Ps4KYJVt749EGpCf7ofte", "owner": "QTiga19sttbf6CLQLT83mhCSWEaCvjk8th", "groupName": "Tiga", "description": "Tiga's group", "isOpen": true, "approvalThreshold": "PCT20", "minimumBlockDelay": 120, "maximumBlockDelay": 2880 },
{ "type": "PROXY_FORGING", "forgerPublicKey": "6rNn9b3pYRrG9UKqzMWYZ9qa8F3Zgv2mVWrULGHUusb", "recipient": "QcatTpaU1UneBs3fVHo8QN6mUmuceRVzFY", "proxyPublicKey": "8X3w1521UNnnonieugAxhfbfvqoRpwPXJrwGQZb5JjQ3", "share": 100 }
]
},
"rewardsByHeight": [
{ "height": 2, "reward": 5.0000 },
{ "height": 259204, "reward": 4.7500 },
{ "height": 518406, "reward": 4.5125 },
{ "height": 777608, "reward": 4.2869 },
{ "height": 1036810, "reward": 4.0725 },
{ "height": 1296012, "reward": 3.8689 },
{ "height": 1555214, "reward": 3.6755 },
{ "height": 1814416, "reward": 3.4917 },
{ "height": 2073618, "reward": 3.3171 },
{ "height": 2332820, "reward": 3.1512 }
],
"sharesByLevel": [
{ "levels": [ 1, 2 ], "share": 0.05 },
{ "levels": [ 3, 4 ], "share": 0.10 },
{ "levels": [ 5, 6 ], "share": 0.15 },
{ "levels": [ 7, 8 ], "share": 0.20 },
{ "levels": [ 9, 10 ], "share": 0.25 }
],
"qoraHoldersShare": 0.20,
"blocksNeededByLevel": [ 7200, 64800, 129600, 172800, 244000, 345600, 518400, 691200, 864000, 1036800 ],
"blockTimingsByHeight": [
{ "height": 1, "target": 60000, "deviation": 30000, "power": 0.2 }
],
"featureTriggers": {
"messageHeight": 0,
"atHeight": 0,
"newBlockDistanceHeight": 0,
"newBlockTimingHeight": 0,
"newBlockTimestampHeight": 0,
"assetsTimestamp": 0,
"votingTimestamp": 0,
"arbitraryTimestamp": 0,
"powfixTimestamp": 0,
"v2Timestamp": 0,
"newAssetPricingTimestamp": 0,
"groupApprovalTimestamp": 0
}
}