calculate fees, add to the block if vin coinbase -> pow & vout type:pubkey -> pow reward vout type:pubkeyhash -> mn reward if vout[0] type:nonstandard -> pos vout[n] type:pubkey -> pos reward vout[n] type:pubkeyhash -> mn reward vin[n] previous balance of pos rewarded address if suspected amount equal to fees, remove suspect PUBLIC DASHBOARD common: -nw height -blocks - total / last 24h -coin_supply - metod -(z_supply) - optional -nb addresses -nb txs -moved_val 24h -> need time in movements? miner: -difficulty -hashps mn -mn count -(mn online,ipv6/ipv4..) ADMIN DASHBOARD daemon info +version - getinfo/ 0.17? +last block +status - online/offline -disk size chain info -avg block size -avg move value +avg block time -seed nodes status db info +db size +db collections -db version -db uptime host info -ram usage -cpu usage -disk usage problems -suspecred balance -log -> avg block time (single interval) card calculate timestsamp (now - interval_sec) query blocks between now and timestamp_chain -> blocks number = count(blocks) -> avg block time=(timestamp of last block - timestamp block[0])/(blocks-1) ?? CHECK timezone impact on avg block time BUNCHES SEARCH PEERS Transactions Address sent received wallet delete vout if spent?! -------------- //// RAVEN Asset Transfer //// type: transfer_asset db.ADDRESSES.aggregate([ { $match: { group_id: { $in: ['csag-phc-1d4c67f18be2b4de8d4a2e65360672e096875730','csag-phc-ea0312098391f9e9d08e2c98837e61f5b1c17db6' ] } } }, { $group: { _id: "$group_id", totalBalance: { $sum: "$balance" }, countAddresses: { $sum: 1 } } }, { $sort: { _id: 1 } } ]) db.ADDRESSES.aggregate([{ { $match: { group_id: { '$in': { 'csag-phc-445e39a468dc77412eb560514347fafc29fb0845', 'csag-phc-5ec8f1b396ad787e811c10e0397230233ccedac1', 'csag-phc-dce137941531d5c28d06f6890609d4185a5db445' } } } }, { $group: { _id: group_id, totalBalance: { $sum: $balance }, countAddresses: { $sum: 1 } } }, { $sort: { _id: 1 } } }]); {$match: {_id: '408f03fc-5853-40f1-8734-b4be78f70872'}}, {$project: {address_count: 1, col_length: { $size: "$address_list" }}}, {$sort: {address_count: -1}}, {$limit: 20} ]); 'aggregate' => 'ADDRESSES', 'pipeline' => [ ['$match' => [ 'group_id' => ['$in' => $group_ids]]], ['$group' => [ '_id' => '$group_id', 'totalBalance' => [ '$sum' => '$balance' ], 'countAddresses' => [ '$sum' => 1 ] ] ], ['$sort' => ['_id' => 1]] ], 'cursor' => ['batchSize' => count($group_ids)] COLD STAKING Metrics: - count total staking balance - count accounts - save to db Sanity - ban long ping nodes (temporary) - backup wallet.dat getcoldstakingbalance ( "account" ) getdelegatedbalance ( "account" ) getnewstakingaddress ( "account" ) delegatestake "stakingaddress" amount ( "owneraddress" fExternalOwner fUseDelegated fForceNotEnabled ) delegatoradd "addr" ( "label" ) -> true/false delegatorremove "addr" listdelegators ( fBlacklist ) liststakingaddresses "addr" listaccounts signmessage "blockidcoinaddress" "message" verifymessage "blockidcoinaddress" "signature" "message" getstakingstatus getstakesplitthreshold getpeerinfo listbanned ping setban "ip(/netmask)" "add|remove" (bantime) (absolute) => bantime in seconds 0. Check provided address is valid 1. Get staking address : liststakingaddresses if count() > 0 then return [0] else createstakingaddress and do (1) 2. listdelegators ( fBlacklist ) -> check adderss already delegator No: delegatoradd
Yes: 3. x. Backup wallet.dat curl -s https://127.0.0.1/js/addons/datatables.min.js | openssl dgst -sha384 -binary | openssl base64 -A; echo Collect RVN Metrics: 1. [+] Transactions per second. Perhaps with a 1h time resolution (or user defined resolution) Possible: block_stats->txNumber / 3600 2. [+] Block fullness - asset % vs native currency transactions total bytes by tx_type count by tx_type 3. [.] Coin Days Destroyed (CDD) - track velocity of money https://en.bitcoin.it/wiki/Bitcoin_Days_Destroyed only for non-coinbase vins tx.CoinDestroyedDays = for_all(vins).Sum(vin amount*((this.block_time_sec - vin.block_time_sec)/3600)) block.CoinDestroyedDays = for_all(txs).Sum(tx.CoinDestroyedDays) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!! !!! !!! Prototype done for PoW and Single-VOUT PoS -> Pending for other type of PoS with nested_cdd !!! !!! !!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! PoS -> done classic cdd: stake base same as regular tx fo PoS rewards concept of nested_cdd -> accumulate cdd from PoS inputs to the outputs with respect of proportion of pos vout/stake_reward cases to evaluate: - stake split - stake donation (multiple stakers) - cold staking - stake + mn reward to the same address !!! TODO: calculate CDD avoiding movement to the same address, cases to analyse: - transfer to another address -> all vouts are subject of CDD - transfer to another and change to the sending address -> vouts to sending address are not subject of CDD - consolidation, sending from several addresses to one of the senders ? 4. [ ] mempool size & Fee information for inclusion in a block (not a priority right now) Mempool size collection is possible via CHAINSTATS Fee info - to be clarified 5. [ ] address count growth (Top row at https://www.ravencoin.network/rich-list, but plotted across time) To be evaluated tricky, requres range calculations after each block? can be based only on addresses or group balance shuld be re-calculated retroactively. 6. [+] addresses, groups, txs, assets count Executing calls to the db AFTER inserting addresses, txs, assets, etc. 7. [+] Net hash + difficulty across larger time frames Possible, already collected in chain_stats 8. [+] Vout by type: Added to block_stats->voutTypes 9. [+] Blocks per version Added to block_stats->blockVersions 10. [+] Average block size Added to block_stats => blocksSizeTotal / blocksNumber Visualize metrics: - General chain metrics - tx/s -> BLOCKSTATS - tx types distribution -> BLOCKSTATS - address | groups -> BLOCKSTATS - vout types -> BLOCKSTATS - block versions distribution -> BLOCKSTATS - avg block size -> BLOCKSTATS - avg block spacing -> ? - Coinnomcs - Avg price (BTC aligned, USD aligned, BTC price as a ref.) -> MARKETS - Coin supplied | burned ? or Coin circulation -> BLOCKSTATS - Coin Days Destroyed -> BLOCKSTATS - Coins moved | New coins emitted -> BLOCKSTATS - Asset-specific - asset count -> BLOCKSTATS - asset tx types -> BLOCKSTATS - PoS-specific - avg stake base -> BLOCKSTATS - avg pos reward -> BLOCKSTATS - PoW-specific - pow hr | difficulty -> CHAINSTATS - MN-specific - mn count -> CHAINSTATS - avg daily mn reward -> CHAINSTATS/BLOCKSTAS P2SH: "Pay To Script Hash" P2PK: "Pay To Public Key" P2PKH: "Pay To Public Key Hash" P2WPKH: "Pay To Witness Public Key Hash" P2WSH: "Pay-to-witness-script-hash" or P2WSH is a standard transaction type that is described by BIP-141. P2MS TODO: add full support of multisig transactions idea -> create multisig_amount in each address of multisig group store in vout list of addresses, when vout spent adjust multisig_amount of each address movements -> create movement with multisig flag, show in the address movements with appropriate marking