mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-08-09 17:13:05 -07:00
pools: updated
This commit is contained in:
@@ -1786,6 +1786,34 @@ impl Pct10Pct20Pct30Pct40Pct50Pct60Pct70Pct80Pct90Pattern {
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct ChainDataFeeFeesOutputTxPattern {
|
||||
pub chain_share: PercentPpmRatioPattern2,
|
||||
pub data_bytes: AverageBlockCumulativeSumPattern<StoredU64>,
|
||||
pub data_share: PercentPpmRatioPattern2,
|
||||
pub fee_share: _1m1w1y24hPercentPpmRatioPattern,
|
||||
pub fees: AverageBlockCumulativeSumPattern<Sats>,
|
||||
pub output_count: AverageBlockCumulativeSumPattern<StoredU64>,
|
||||
pub tx_count: AverageBlockCumulativeSumPattern<StoredU64>,
|
||||
pub tx_vsize: AverageBlockCumulativeSumPattern<VSize>,
|
||||
}
|
||||
|
||||
impl ChainDataFeeFeesOutputTxPattern {
|
||||
/// Create a new pattern node with accumulated series name.
|
||||
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
|
||||
Self {
|
||||
chain_share: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "chain_share")),
|
||||
data_bytes: AverageBlockCumulativeSumPattern::new(client.clone(), _m(&acc, "data_bytes")),
|
||||
data_share: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "data_share")),
|
||||
fee_share: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "fee_share")),
|
||||
fees: AverageBlockCumulativeSumPattern::new(client.clone(), _m(&acc, "fees")),
|
||||
output_count: AverageBlockCumulativeSumPattern::new(client.clone(), _m(&acc, "output_count")),
|
||||
tx_count: AverageBlockCumulativeSumPattern::new(client.clone(), _m(&acc, "tx_count")),
|
||||
tx_vsize: AverageBlockCumulativeSumPattern::new(client.clone(), _m(&acc, "tx_vsize")),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct _10y2y3y4y5y6y8yPattern {
|
||||
pub _10y: PercentPpmRatioPattern,
|
||||
@@ -2077,30 +2105,6 @@ impl CentsNegativeToUsdPattern2 {
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct ChainDataOutputTxPattern {
|
||||
pub chain_share: PercentPpmRatioPattern2,
|
||||
pub data_bytes: AverageBlockCumulativeSumPattern<StoredU64>,
|
||||
pub data_share: PercentPpmRatioPattern2,
|
||||
pub output_count: AverageBlockCumulativeSumPattern<StoredU64>,
|
||||
pub tx_count: AverageBlockCumulativeSumPattern<StoredU64>,
|
||||
pub tx_vsize: AverageBlockCumulativeSumPattern<VSize>,
|
||||
}
|
||||
|
||||
impl ChainDataOutputTxPattern {
|
||||
/// Create a new pattern node with accumulated series name.
|
||||
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
|
||||
Self {
|
||||
chain_share: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "chain_share")),
|
||||
data_bytes: AverageBlockCumulativeSumPattern::new(client.clone(), _m(&acc, "data_bytes")),
|
||||
data_share: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "data_share")),
|
||||
output_count: AverageBlockCumulativeSumPattern::new(client.clone(), _m(&acc, "output_count")),
|
||||
tx_count: AverageBlockCumulativeSumPattern::new(client.clone(), _m(&acc, "tx_count")),
|
||||
tx_vsize: AverageBlockCumulativeSumPattern::new(client.clone(), _m(&acc, "tx_vsize")),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern struct for repeated tree structure.
|
||||
pub struct DeltaDominanceHalfInTotalPattern2 {
|
||||
pub delta: AbsoluteRatePattern3,
|
||||
@@ -5589,7 +5593,9 @@ pub struct SeriesTree_OpReturn_Total {
|
||||
pub data_bytes: AverageBlockCumulativeSumPattern<StoredU64>,
|
||||
pub tx_count: AverageBlockCumulativeSumPattern<StoredU64>,
|
||||
pub tx_vsize: AverageBlockCumulativeSumPattern<VSize>,
|
||||
pub fees: AverageBlockCumulativeSumPattern<Sats>,
|
||||
pub chain_share: PercentPpmRatioPattern2,
|
||||
pub fee_share: _1m1w1y24hPercentPpmRatioPattern,
|
||||
}
|
||||
|
||||
impl SeriesTree_OpReturn_Total {
|
||||
@@ -5598,83 +5604,85 @@ impl SeriesTree_OpReturn_Total {
|
||||
data_bytes: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_data_bytes".to_string()),
|
||||
tx_count: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_tx_count".to_string()),
|
||||
tx_vsize: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_tx_vsize".to_string()),
|
||||
fees: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_fees".to_string()),
|
||||
chain_share: PercentPpmRatioPattern2::new(client.clone(), "op_return_chain_share".to_string()),
|
||||
fee_share: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "op_return_fee_share".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Series tree node.
|
||||
pub struct SeriesTree_OpReturn_ByKind {
|
||||
pub runes: ChainDataOutputTxPattern,
|
||||
pub veri_block: ChainDataOutputTxPattern,
|
||||
pub omni: ChainDataOutputTxPattern,
|
||||
pub stacks: ChainDataOutputTxPattern,
|
||||
pub blockstack: ChainDataOutputTxPattern,
|
||||
pub colu: ChainDataOutputTxPattern,
|
||||
pub open_assets: ChainDataOutputTxPattern,
|
||||
pub komodo: ChainDataOutputTxPattern,
|
||||
pub coin_spark: ChainDataOutputTxPattern,
|
||||
pub poet: ChainDataOutputTxPattern,
|
||||
pub docproof: ChainDataOutputTxPattern,
|
||||
pub open_timestamps: ChainDataOutputTxPattern,
|
||||
pub factom: ChainDataOutputTxPattern,
|
||||
pub eternity_wall: ChainDataOutputTxPattern,
|
||||
pub memo: ChainDataOutputTxPattern,
|
||||
pub bitproof: ChainDataOutputTxPattern,
|
||||
pub ascribe: ChainDataOutputTxPattern,
|
||||
pub stampery: ChainDataOutputTxPattern,
|
||||
pub epobc: ChainDataOutputTxPattern,
|
||||
pub bare_hash: ChainDataOutputTxPattern,
|
||||
pub text: ChainDataOutputTxPattern,
|
||||
pub empty: ChainDataOutputTxPattern,
|
||||
pub unknown: ChainDataOutputTxPattern,
|
||||
pub runes: ChainDataFeeFeesOutputTxPattern,
|
||||
pub veri_block: ChainDataFeeFeesOutputTxPattern,
|
||||
pub omni: ChainDataFeeFeesOutputTxPattern,
|
||||
pub stacks: ChainDataFeeFeesOutputTxPattern,
|
||||
pub blockstack: ChainDataFeeFeesOutputTxPattern,
|
||||
pub colu: ChainDataFeeFeesOutputTxPattern,
|
||||
pub open_assets: ChainDataFeeFeesOutputTxPattern,
|
||||
pub komodo: ChainDataFeeFeesOutputTxPattern,
|
||||
pub coin_spark: ChainDataFeeFeesOutputTxPattern,
|
||||
pub poet: ChainDataFeeFeesOutputTxPattern,
|
||||
pub docproof: ChainDataFeeFeesOutputTxPattern,
|
||||
pub open_timestamps: ChainDataFeeFeesOutputTxPattern,
|
||||
pub factom: ChainDataFeeFeesOutputTxPattern,
|
||||
pub eternity_wall: ChainDataFeeFeesOutputTxPattern,
|
||||
pub memo: ChainDataFeeFeesOutputTxPattern,
|
||||
pub bitproof: ChainDataFeeFeesOutputTxPattern,
|
||||
pub ascribe: ChainDataFeeFeesOutputTxPattern,
|
||||
pub stampery: ChainDataFeeFeesOutputTxPattern,
|
||||
pub epobc: ChainDataFeeFeesOutputTxPattern,
|
||||
pub bare_hash: ChainDataFeeFeesOutputTxPattern,
|
||||
pub text: ChainDataFeeFeesOutputTxPattern,
|
||||
pub empty: ChainDataFeeFeesOutputTxPattern,
|
||||
pub unknown: ChainDataFeeFeesOutputTxPattern,
|
||||
}
|
||||
|
||||
impl SeriesTree_OpReturn_ByKind {
|
||||
pub fn new(client: Arc<BrkClientBase>, base_path: String) -> Self {
|
||||
Self {
|
||||
runes: ChainDataOutputTxPattern::new(client.clone(), "op_return_runes".to_string()),
|
||||
veri_block: ChainDataOutputTxPattern::new(client.clone(), "op_return_veri_block".to_string()),
|
||||
omni: ChainDataOutputTxPattern::new(client.clone(), "op_return_omni".to_string()),
|
||||
stacks: ChainDataOutputTxPattern::new(client.clone(), "op_return_stacks".to_string()),
|
||||
blockstack: ChainDataOutputTxPattern::new(client.clone(), "op_return_blockstack".to_string()),
|
||||
colu: ChainDataOutputTxPattern::new(client.clone(), "op_return_colu".to_string()),
|
||||
open_assets: ChainDataOutputTxPattern::new(client.clone(), "op_return_open_assets".to_string()),
|
||||
komodo: ChainDataOutputTxPattern::new(client.clone(), "op_return_komodo".to_string()),
|
||||
coin_spark: ChainDataOutputTxPattern::new(client.clone(), "op_return_coin_spark".to_string()),
|
||||
poet: ChainDataOutputTxPattern::new(client.clone(), "op_return_poet".to_string()),
|
||||
docproof: ChainDataOutputTxPattern::new(client.clone(), "op_return_docproof".to_string()),
|
||||
open_timestamps: ChainDataOutputTxPattern::new(client.clone(), "op_return_open_timestamps".to_string()),
|
||||
factom: ChainDataOutputTxPattern::new(client.clone(), "op_return_factom".to_string()),
|
||||
eternity_wall: ChainDataOutputTxPattern::new(client.clone(), "op_return_eternity_wall".to_string()),
|
||||
memo: ChainDataOutputTxPattern::new(client.clone(), "op_return_memo".to_string()),
|
||||
bitproof: ChainDataOutputTxPattern::new(client.clone(), "op_return_bitproof".to_string()),
|
||||
ascribe: ChainDataOutputTxPattern::new(client.clone(), "op_return_ascribe".to_string()),
|
||||
stampery: ChainDataOutputTxPattern::new(client.clone(), "op_return_stampery".to_string()),
|
||||
epobc: ChainDataOutputTxPattern::new(client.clone(), "op_return_epobc".to_string()),
|
||||
bare_hash: ChainDataOutputTxPattern::new(client.clone(), "op_return_bare_hash".to_string()),
|
||||
text: ChainDataOutputTxPattern::new(client.clone(), "op_return_text".to_string()),
|
||||
empty: ChainDataOutputTxPattern::new(client.clone(), "op_return_empty".to_string()),
|
||||
unknown: ChainDataOutputTxPattern::new(client.clone(), "op_return_unknown".to_string()),
|
||||
runes: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_runes".to_string()),
|
||||
veri_block: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_veri_block".to_string()),
|
||||
omni: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_omni".to_string()),
|
||||
stacks: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_stacks".to_string()),
|
||||
blockstack: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_blockstack".to_string()),
|
||||
colu: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_colu".to_string()),
|
||||
open_assets: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_open_assets".to_string()),
|
||||
komodo: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_komodo".to_string()),
|
||||
coin_spark: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_coin_spark".to_string()),
|
||||
poet: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_poet".to_string()),
|
||||
docproof: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_docproof".to_string()),
|
||||
open_timestamps: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_open_timestamps".to_string()),
|
||||
factom: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_factom".to_string()),
|
||||
eternity_wall: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_eternity_wall".to_string()),
|
||||
memo: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_memo".to_string()),
|
||||
bitproof: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_bitproof".to_string()),
|
||||
ascribe: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_ascribe".to_string()),
|
||||
stampery: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_stampery".to_string()),
|
||||
epobc: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_epobc".to_string()),
|
||||
bare_hash: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_bare_hash".to_string()),
|
||||
text: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_text".to_string()),
|
||||
empty: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_empty".to_string()),
|
||||
unknown: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_unknown".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Series tree node.
|
||||
pub struct SeriesTree_OpReturn_Policy {
|
||||
pub pre_v30_standard: ChainDataOutputTxPattern,
|
||||
pub pre_v30_nonstandard: ChainDataOutputTxPattern,
|
||||
pub oversized: ChainDataOutputTxPattern,
|
||||
pub multiple: ChainDataOutputTxPattern,
|
||||
pub pre_v30_standard: ChainDataFeeFeesOutputTxPattern,
|
||||
pub pre_v30_nonstandard: ChainDataFeeFeesOutputTxPattern,
|
||||
pub oversized: ChainDataFeeFeesOutputTxPattern,
|
||||
pub multiple: ChainDataFeeFeesOutputTxPattern,
|
||||
}
|
||||
|
||||
impl SeriesTree_OpReturn_Policy {
|
||||
pub fn new(client: Arc<BrkClientBase>, base_path: String) -> Self {
|
||||
Self {
|
||||
pre_v30_standard: ChainDataOutputTxPattern::new(client.clone(), "op_return_policy_pre_v30_standard".to_string()),
|
||||
pre_v30_nonstandard: ChainDataOutputTxPattern::new(client.clone(), "op_return_policy_pre_v30_nonstandard".to_string()),
|
||||
oversized: ChainDataOutputTxPattern::new(client.clone(), "op_return_policy_oversized".to_string()),
|
||||
multiple: ChainDataOutputTxPattern::new(client.clone(), "op_return_policy_multiple".to_string()),
|
||||
pre_v30_standard: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_policy_pre_v30_standard".to_string()),
|
||||
pre_v30_nonstandard: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_policy_pre_v30_nonstandard".to_string()),
|
||||
oversized: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_policy_oversized".to_string()),
|
||||
multiple: ChainDataFeeFeesOutputTxPattern::new(client.clone(), "op_return_policy_multiple".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7890,6 +7898,7 @@ pub struct SeriesTree_Pools_Minor {
|
||||
pub braiinssolo: BlocksDominancePattern,
|
||||
pub solopool: BlocksDominancePattern,
|
||||
pub noderunners: BlocksDominancePattern,
|
||||
pub dmnd: BlocksDominancePattern,
|
||||
}
|
||||
|
||||
impl SeriesTree_Pools_Minor {
|
||||
@@ -8038,6 +8047,7 @@ impl SeriesTree_Pools_Minor {
|
||||
braiinssolo: BlocksDominancePattern::new(client.clone(), "braiinssolo".to_string()),
|
||||
solopool: BlocksDominancePattern::new(client.clone(), "solopool".to_string()),
|
||||
noderunners: BlocksDominancePattern::new(client.clone(), "noderunners".to_string()),
|
||||
dmnd: BlocksDominancePattern::new(client.clone(), "dmnd".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ impl Computer {
|
||||
inputs_result?;
|
||||
prices_result?;
|
||||
|
||||
// market, outputs, and (transactions → mining) are pairwise
|
||||
// market, outputs, and (transactions → mining + OP_RETURN) are pairwise
|
||||
// independent. Run all three in parallel.
|
||||
let market = scope.spawn(|| {
|
||||
timed("Computed market", || {
|
||||
@@ -362,7 +362,7 @@ impl Computer {
|
||||
})
|
||||
});
|
||||
|
||||
let tx_mining = scope.spawn(|| -> Result<()> {
|
||||
let tx_mining_op_return = scope.spawn(|| -> Result<()> {
|
||||
timed("Computed transactions", || {
|
||||
self.transactions.compute(
|
||||
indexer,
|
||||
@@ -373,31 +373,48 @@ impl Computer {
|
||||
exit,
|
||||
)
|
||||
})?;
|
||||
timed("Computed mining", || {
|
||||
self.mining.compute(
|
||||
indexer,
|
||||
&self.indexes,
|
||||
&self.blocks,
|
||||
&self.transactions,
|
||||
&self.price,
|
||||
|
||||
let (mining, op_return) = rayon::join(
|
||||
|| {
|
||||
timed("Computed mining", || {
|
||||
self.mining.compute(
|
||||
indexer,
|
||||
&self.indexes,
|
||||
&self.blocks,
|
||||
&self.transactions,
|
||||
&self.price,
|
||||
exit,
|
||||
)
|
||||
})
|
||||
},
|
||||
|| {
|
||||
timed("Computed OP_RETURN", || {
|
||||
self.op_return.compute(
|
||||
indexer,
|
||||
&self.transactions.fees,
|
||||
&self.blocks,
|
||||
exit,
|
||||
)
|
||||
})
|
||||
},
|
||||
);
|
||||
mining?;
|
||||
op_return?;
|
||||
timed("Computed OP_RETURN fee shares", || {
|
||||
self.op_return.compute_fee_shares(
|
||||
&self.mining.rewards.fees.inner,
|
||||
indexer.safe_lengths().height,
|
||||
exit,
|
||||
)
|
||||
})
|
||||
});
|
||||
|
||||
let op_return = scope.spawn(|| {
|
||||
timed("Computed OP_RETURN", || {
|
||||
self.op_return.compute(indexer, &self.blocks, exit)
|
||||
})
|
||||
});
|
||||
|
||||
timed("Computed outputs", || {
|
||||
self.outputs
|
||||
.compute(indexer, &self.inputs, &self.blocks, &self.price, exit)
|
||||
})?;
|
||||
|
||||
tx_mining.join().unwrap()?;
|
||||
op_return.join().unwrap()?;
|
||||
tx_mining_op_return.join().unwrap()?;
|
||||
market.join().unwrap()?;
|
||||
Ok(())
|
||||
})?;
|
||||
@@ -514,16 +531,14 @@ impl Computer {
|
||||
Ok(())
|
||||
})?;
|
||||
|
||||
self.indicators
|
||||
.rarity_meter
|
||||
.compute(
|
||||
indexer,
|
||||
&self.distribution,
|
||||
&self.cointime,
|
||||
&self.coinflow,
|
||||
&self.price,
|
||||
exit,
|
||||
)?;
|
||||
self.indicators.rarity_meter.compute(
|
||||
indexer,
|
||||
&self.distribution,
|
||||
&self.cointime,
|
||||
&self.coinflow,
|
||||
&self.price,
|
||||
exit,
|
||||
)?;
|
||||
|
||||
info!("Total compute time: {:?}", compute_start.elapsed());
|
||||
Ok(())
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
use brk_error::Result;
|
||||
use brk_indexer::Indexer;
|
||||
use brk_types::{Height, OpReturnKind, PartsPerMillion32, StoredU64, VSize};
|
||||
use brk_types::{Height, OpReturnKind, PartsPerMillion32, Sats, StoredU64, VSize};
|
||||
use vecdb::{AnyVec, Exit, ReadableVec, VecIndex};
|
||||
|
||||
use super::{Breakdown, Vecs, vecs::Totals};
|
||||
use crate::{
|
||||
blocks,
|
||||
internal::{PercentPerBlock, RatioU64},
|
||||
internal::{
|
||||
PerBlockCumulativeRolling, PercentCumulativeRolling, PercentPerBlock, RatioSats, RatioU64,
|
||||
ValuePerBlockCumulativeRolling,
|
||||
},
|
||||
transactions,
|
||||
};
|
||||
|
||||
const KIND_COUNT: usize = OpReturnKind::Unknown as usize + 1;
|
||||
@@ -29,6 +33,7 @@ struct Carrier {
|
||||
oversized_output_count: u64,
|
||||
oversized_data_bytes: u64,
|
||||
vsize: VSize,
|
||||
fees: Sats,
|
||||
}
|
||||
|
||||
impl Carrier {
|
||||
@@ -47,6 +52,7 @@ impl Vecs {
|
||||
pub(crate) fn compute(
|
||||
&mut self,
|
||||
indexer: &Indexer,
|
||||
fees: &transactions::FeesVecs,
|
||||
blocks: &blocks::Vecs,
|
||||
exit: &Exit,
|
||||
) -> Result<()> {
|
||||
@@ -59,7 +65,8 @@ impl Vecs {
|
||||
+ raw.to_tx_index.version()
|
||||
+ raw.kind.version()
|
||||
+ raw.post_op_return_bytes.version()
|
||||
+ txs.weight.version();
|
||||
+ txs.weight.version()
|
||||
+ fees.fee.tx_index.version();
|
||||
|
||||
self.validate_and_truncate(version, starting_lengths.height)?;
|
||||
|
||||
@@ -74,6 +81,7 @@ impl Vecs {
|
||||
let mut post_op_return_bytes = raw.post_op_return_bytes.cursor();
|
||||
let mut first_index_cursor = raw.first_index.cursor();
|
||||
let mut weight_cursor = txs.weight.cursor();
|
||||
let mut fee_cursor = fees.fee.tx_index.cursor();
|
||||
first_index_cursor.advance(skip);
|
||||
let mut start = first_index_cursor.next().unwrap().to_usize();
|
||||
|
||||
@@ -108,6 +116,8 @@ impl Vecs {
|
||||
let tx_position = tx_index.to_usize();
|
||||
weight_cursor.advance(tx_position - weight_cursor.position());
|
||||
carrier.vsize = VSize::from(weight_cursor.next().unwrap());
|
||||
fee_cursor.advance(tx_position - fee_cursor.position());
|
||||
carrier.fees = fee_cursor.next().unwrap();
|
||||
}
|
||||
|
||||
total.data_bytes += bytes;
|
||||
@@ -169,6 +179,41 @@ impl Vecs {
|
||||
)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) fn compute_fee_shares(
|
||||
&mut self,
|
||||
chain_fees: &ValuePerBlockCumulativeRolling,
|
||||
max_from: Height,
|
||||
exit: &Exit,
|
||||
) -> Result<()> {
|
||||
compute_fee_share(
|
||||
max_from,
|
||||
&mut self.total.fee_share,
|
||||
&self.total.metrics.fees,
|
||||
chain_fees,
|
||||
exit,
|
||||
)?;
|
||||
for breakdown in self.by_kind.iter_mut() {
|
||||
compute_fee_share(
|
||||
max_from,
|
||||
&mut breakdown.fee_share,
|
||||
&breakdown.metrics.total.fees,
|
||||
chain_fees,
|
||||
exit,
|
||||
)?;
|
||||
}
|
||||
for policy in self.policy.iter_mut() {
|
||||
compute_fee_share(
|
||||
max_from,
|
||||
&mut policy.fee_share,
|
||||
&policy.metrics.total.fees,
|
||||
chain_fees,
|
||||
exit,
|
||||
)?;
|
||||
}
|
||||
|
||||
let exit = exit.clone();
|
||||
self.db.run_bg(move |db| {
|
||||
let _lock = exit.lock();
|
||||
@@ -178,6 +223,23 @@ impl Vecs {
|
||||
}
|
||||
}
|
||||
|
||||
fn compute_fee_share(
|
||||
max_from: Height,
|
||||
target: &mut PercentCumulativeRolling<PartsPerMillion32>,
|
||||
numerator: &PerBlockCumulativeRolling<Sats, Sats>,
|
||||
denominator: &ValuePerBlockCumulativeRolling,
|
||||
exit: &Exit,
|
||||
) -> Result<()> {
|
||||
target.compute_binary::<Sats, Sats, RatioSats<PartsPerMillion32>, _, _, _, _>(
|
||||
max_from,
|
||||
&numerator.cumulative.height,
|
||||
&denominator.cumulative.sats.height,
|
||||
numerator.sum.as_array().map(|w| &w.height),
|
||||
denominator.sum.as_array().map(|w| &w.sats.height),
|
||||
exit,
|
||||
)
|
||||
}
|
||||
|
||||
fn compute_breakdown_data_shares(
|
||||
max_from: Height,
|
||||
breakdown: &mut Breakdown,
|
||||
@@ -212,40 +274,41 @@ fn finalize_transaction(
|
||||
return;
|
||||
}
|
||||
|
||||
add_carrier(total, carrier.vsize);
|
||||
add_carrier(total, carrier);
|
||||
let mut kinds = carrier.kinds;
|
||||
while kinds != 0 {
|
||||
let kind_index = kinds.trailing_zeros() as usize;
|
||||
add_carrier(&mut by_kind[kind_index], carrier.vsize);
|
||||
add_carrier(&mut by_kind[kind_index], carrier);
|
||||
kinds &= kinds - 1;
|
||||
}
|
||||
|
||||
if carrier.oversized_output_count > 0 {
|
||||
policy.oversized.output_count += carrier.oversized_output_count;
|
||||
policy.oversized.data_bytes += carrier.oversized_data_bytes;
|
||||
add_carrier(&mut policy.oversized, carrier.vsize);
|
||||
add_carrier(&mut policy.oversized, carrier);
|
||||
}
|
||||
|
||||
if carrier.output_count > 1 {
|
||||
policy.multiple.output_count += carrier.output_count;
|
||||
policy.multiple.data_bytes += carrier.data_bytes;
|
||||
add_carrier(&mut policy.multiple, carrier.vsize);
|
||||
add_carrier(&mut policy.multiple, carrier);
|
||||
}
|
||||
|
||||
if carrier.oversized_output_count > 0 || carrier.output_count > 1 {
|
||||
policy.pre_v30_nonstandard.output_count += carrier.output_count;
|
||||
policy.pre_v30_nonstandard.data_bytes += carrier.data_bytes;
|
||||
add_carrier(&mut policy.pre_v30_nonstandard, carrier.vsize);
|
||||
add_carrier(&mut policy.pre_v30_nonstandard, carrier);
|
||||
} else {
|
||||
policy.pre_v30_standard.output_count += carrier.output_count;
|
||||
policy.pre_v30_standard.data_bytes += carrier.data_bytes;
|
||||
add_carrier(&mut policy.pre_v30_standard, carrier.vsize);
|
||||
add_carrier(&mut policy.pre_v30_standard, carrier);
|
||||
}
|
||||
}
|
||||
|
||||
fn add_carrier(metrics: &mut Totals, vsize: VSize) {
|
||||
fn add_carrier(metrics: &mut Totals, carrier: Carrier) {
|
||||
metrics.tx_count += 1;
|
||||
metrics.tx_vsize += vsize;
|
||||
metrics.tx_vsize += carrier.vsize;
|
||||
metrics.fees += carrier.fees;
|
||||
}
|
||||
|
||||
const fn kind_bit(kind: OpReturnKind) -> u32 {
|
||||
@@ -263,6 +326,7 @@ mod tests {
|
||||
let mut policy = PolicyTotals::default();
|
||||
let mut carrier = Carrier {
|
||||
vsize: VSize::new(100),
|
||||
fees: Sats::new(500),
|
||||
..Carrier::default()
|
||||
};
|
||||
carrier.add_output(OpReturnKind::Runes, 15);
|
||||
@@ -273,6 +337,11 @@ mod tests {
|
||||
assert_eq!(total.tx_count, 1);
|
||||
assert_eq!(by_kind[OpReturnKind::Runes as usize].tx_count, 1);
|
||||
assert_eq!(by_kind[OpReturnKind::Omni as usize].tx_count, 1);
|
||||
assert_eq!(total.fees, Sats::new(500));
|
||||
assert_eq!(by_kind[OpReturnKind::Runes as usize].fees, Sats::new(500));
|
||||
assert_eq!(by_kind[OpReturnKind::Omni as usize].fees, Sats::new(500));
|
||||
assert_eq!(policy.multiple.fees, Sats::new(500));
|
||||
assert_eq!(policy.pre_v30_nonstandard.fees, Sats::new(500));
|
||||
assert_eq!(policy.multiple.output_count, 2);
|
||||
assert_eq!(policy.pre_v30_nonstandard.tx_count, 1);
|
||||
assert_eq!(policy.oversized.tx_count, 0);
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
use brk_error::Result;
|
||||
use brk_traversable::Traversable;
|
||||
use brk_types::{Height, PartsPerMillion32, StoredU64, VSize, Version};
|
||||
use brk_types::{Height, PartsPerMillion32, Sats, StoredU64, VSize, Version};
|
||||
use derive_more::{Deref, DerefMut};
|
||||
use vecdb::{AnyStoredVec, AnyVec, Database, Exit, Rw, StorageMode, WritableVec};
|
||||
|
||||
use super::ByKind;
|
||||
use crate::{
|
||||
indexes,
|
||||
internal::{PerBlockCumulativeRolling, PercentPerBlock, WindowStartVec, Windows},
|
||||
internal::{
|
||||
PerBlockCumulativeRolling, PercentCumulativeRolling, PercentPerBlock, WindowStartVec,
|
||||
Windows,
|
||||
},
|
||||
};
|
||||
|
||||
pub type Series<T, M = Rw> = PerBlockCumulativeRolling<T, T, M>;
|
||||
@@ -18,6 +21,7 @@ pub(super) struct Totals {
|
||||
pub data_bytes: u64,
|
||||
pub tx_count: u64,
|
||||
pub tx_vsize: VSize,
|
||||
pub fees: Sats,
|
||||
}
|
||||
|
||||
#[derive(Traversable)]
|
||||
@@ -25,6 +29,9 @@ pub struct TotalMetrics<M: StorageMode = Rw> {
|
||||
pub data_bytes: Series<StoredU64, M>,
|
||||
pub tx_count: Series<StoredU64, M>,
|
||||
pub tx_vsize: Series<VSize, M>,
|
||||
/// Full fees paid by carrier transactions. A transaction carrying multiple
|
||||
/// kinds contributes its fee to each kind, matching `tx_count` and `tx_vsize`.
|
||||
pub fees: Series<Sats, M>,
|
||||
}
|
||||
|
||||
impl TotalMetrics {
|
||||
@@ -57,6 +64,13 @@ impl TotalMetrics {
|
||||
indexes,
|
||||
cached_starts,
|
||||
)?,
|
||||
fees: Series::forced_import(
|
||||
db,
|
||||
&format!("{prefix}_fees"),
|
||||
version,
|
||||
indexes,
|
||||
cached_starts,
|
||||
)?,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -66,12 +80,14 @@ impl TotalMetrics {
|
||||
.len()
|
||||
.min(self.tx_count.block.len())
|
||||
.min(self.tx_vsize.block.len())
|
||||
.min(self.fees.block.len())
|
||||
}
|
||||
|
||||
pub(super) fn push(&mut self, block: Totals) {
|
||||
self.data_bytes.block.push(block.data_bytes.into());
|
||||
self.tx_count.block.push(block.tx_count.into());
|
||||
self.tx_vsize.block.push(block.tx_vsize);
|
||||
self.fees.block.push(block.fees);
|
||||
}
|
||||
|
||||
fn validate_and_truncate(&mut self, version: Version, height: Height) -> Result<()> {
|
||||
@@ -80,6 +96,7 @@ impl TotalMetrics {
|
||||
.validate_and_truncate(version, height)?;
|
||||
self.tx_count.block.validate_and_truncate(version, height)?;
|
||||
self.tx_vsize.block.validate_and_truncate(version, height)?;
|
||||
self.fees.block.validate_and_truncate(version, height)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -87,6 +104,7 @@ impl TotalMetrics {
|
||||
self.data_bytes.block.truncate_if_needed_at(len)?;
|
||||
self.tx_count.block.truncate_if_needed_at(len)?;
|
||||
self.tx_vsize.block.truncate_if_needed_at(len)?;
|
||||
self.fees.block.truncate_if_needed_at(len)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -94,6 +112,7 @@ impl TotalMetrics {
|
||||
self.data_bytes.block.write()?;
|
||||
self.tx_count.block.write()?;
|
||||
self.tx_vsize.block.write()?;
|
||||
self.fees.block.write()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -101,6 +120,7 @@ impl TotalMetrics {
|
||||
self.data_bytes.compute_rest(max_from, exit)?;
|
||||
self.tx_count.compute_rest(max_from, exit)?;
|
||||
self.tx_vsize.compute_rest(max_from, exit)?;
|
||||
self.fees.compute_rest(max_from, exit)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -112,6 +132,8 @@ pub struct Total<M: StorageMode = Rw> {
|
||||
#[traversable(flatten)]
|
||||
pub metrics: TotalMetrics<M>,
|
||||
pub chain_share: PercentPerBlock<PartsPerMillion32, M>,
|
||||
/// Share of all transaction fees, based on cumulative and rolling fee sums.
|
||||
pub fee_share: PercentCumulativeRolling<PartsPerMillion32, M>,
|
||||
}
|
||||
|
||||
impl Total {
|
||||
@@ -130,6 +152,12 @@ impl Total {
|
||||
version,
|
||||
indexes,
|
||||
)?,
|
||||
fee_share: PercentCumulativeRolling::forced_import(
|
||||
db,
|
||||
&format!("{prefix}_fee_share"),
|
||||
version,
|
||||
indexes,
|
||||
)?,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -205,6 +233,8 @@ pub struct Breakdown<M: StorageMode = Rw> {
|
||||
pub metrics: Metrics<M>,
|
||||
pub data_share: PercentPerBlock<PartsPerMillion32, M>,
|
||||
pub chain_share: PercentPerBlock<PartsPerMillion32, M>,
|
||||
/// Share of all transaction fees, based on cumulative and rolling fee sums.
|
||||
pub fee_share: PercentCumulativeRolling<PartsPerMillion32, M>,
|
||||
}
|
||||
|
||||
impl Breakdown {
|
||||
@@ -229,6 +259,12 @@ impl Breakdown {
|
||||
version,
|
||||
indexes,
|
||||
)?,
|
||||
fee_share: PercentCumulativeRolling::forced_import(
|
||||
db,
|
||||
&format!("{prefix}_fee_share"),
|
||||
version,
|
||||
indexes,
|
||||
)?,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1828,5 +1828,12 @@
|
||||
"addresses": [],
|
||||
"tags": ["/Noderunners/"],
|
||||
"link": "https://pool.noderunners.network"
|
||||
},
|
||||
{
|
||||
"id": 171,
|
||||
"name": "DMND",
|
||||
"addresses": [],
|
||||
"tags": ["/DMND/"],
|
||||
"link": "https://www.dmnd.work/"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
curl -L https://raw.githubusercontent.com/mempool/mining-pools/refs/heads/master/pools-v2.json -o pools-v2.json
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
curl -fL \
|
||||
https://raw.githubusercontent.com/mempool/mining-pools/refs/heads/master/pools-v2.json \
|
||||
-o pools-v2.json
|
||||
|
||||
cargo test -p brk_types bundled_json_entries_have_named_slugs
|
||||
|
||||
@@ -212,8 +212,7 @@ pub enum PoolSlug {
|
||||
#[serde(rename = "solopoolcom")]
|
||||
SoloPool,
|
||||
Noderunners,
|
||||
#[serde(skip)]
|
||||
Dummy171,
|
||||
Dmnd,
|
||||
#[serde(skip)]
|
||||
Dummy172,
|
||||
#[serde(skip)]
|
||||
|
||||
@@ -7,7 +7,6 @@ use crate::PoolSlug;
|
||||
use super::Pool;
|
||||
|
||||
const JSON_DATA: &str = include_str!("../pools-v2.json");
|
||||
const POOL_COUNT: usize = 171;
|
||||
const TESTNET_IDS: &[u16] = &[145, 146, 149, 150, 156, 163];
|
||||
|
||||
#[derive(Deserialize)]
|
||||
@@ -67,7 +66,7 @@ impl Pools {
|
||||
|
||||
#[allow(clippy::len_without_is_empty)]
|
||||
pub fn len(&self) -> usize {
|
||||
POOL_COUNT - TESTNET_IDS.len()
|
||||
self.iter().count()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +76,12 @@ pub fn pools() -> &'static Pools {
|
||||
let entries: Vec<JsonPoolEntry> =
|
||||
serde_json::from_str(JSON_DATA).expect("Failed to parse pools-v2.json");
|
||||
|
||||
let mut pools: Vec<Pool> = (0..POOL_COUNT).map(empty_pool).collect();
|
||||
let max_id = entries.iter().map(|entry| entry.id).max().unwrap_or(0);
|
||||
assert!(
|
||||
max_id <= u8::MAX as u16,
|
||||
"pool ID {max_id} exceeds PoolSlug's u8 range"
|
||||
);
|
||||
let mut pools: Vec<Pool> = (0..=usize::from(max_id)).map(empty_pool).collect();
|
||||
|
||||
// Position 0: Unknown pool
|
||||
pools[0] = Pool {
|
||||
@@ -124,3 +128,35 @@ pub fn pools() -> &'static Pools {
|
||||
Pools(pools)
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn bundled_json_entries_have_named_slugs() {
|
||||
let entries: Vec<JsonPoolEntry> =
|
||||
serde_json::from_str(JSON_DATA).expect("valid pools-v2.json");
|
||||
|
||||
for entry in entries {
|
||||
if TESTNET_IDS.contains(&entry.id) {
|
||||
continue;
|
||||
}
|
||||
let id = u8::try_from(entry.id).expect("pool ID fits PoolSlug");
|
||||
let slug = PoolSlug::from(id);
|
||||
assert!(
|
||||
serde_json::to_string(&slug).is_ok(),
|
||||
"pool ID {} ({}) still maps to {slug:?}",
|
||||
entry.id,
|
||||
entry.name
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dmnd_uses_upstream_id_171() {
|
||||
let dmnd = pools().get(PoolSlug::Dmnd);
|
||||
assert_eq!(dmnd.name, "DMND");
|
||||
assert_eq!(dmnd.mempool_unique_id(), 171);
|
||||
}
|
||||
}
|
||||
|
||||
+93
-82
@@ -937,7 +937,7 @@ ancestors and no descendants (matches mempool.space).
|
||||
/**
|
||||
* URL-friendly mining pool identifier
|
||||
*
|
||||
* @typedef {("unknown"|"blockfills"|"ultimuspool"|"terrapool"|"luxor"|"1thash"|"btccom"|"bitfarms"|"huobipool"|"wayicn"|"canoepool"|"btctop"|"bitcoincom"|"175btc"|"gbminers"|"axbt"|"asicminer"|"bitminter"|"bitcoinrussia"|"btcserv"|"simplecoinus"|"btcguild"|"eligius"|"ozcoin"|"eclipsemc"|"maxbtc"|"triplemining"|"coinlab"|"50btc"|"ghashio"|"stminingcorp"|"bitparking"|"mmpool"|"polmine"|"kncminer"|"bitalo"|"f2pool"|"hhtt"|"megabigpower"|"mtred"|"nmcbit"|"yourbtcnet"|"givemecoins"|"braiinspool"|"antpool"|"multicoinco"|"bcpoolio"|"cointerra"|"kanopool"|"solock"|"ckpool"|"nicehash"|"bitclub"|"bitcoinaffiliatenetwork"|"btcc"|"bwpool"|"exxbw"|"bitsolo"|"bitfury"|"21inc"|"digitalbtc"|"8baochi"|"mybtccoinpool"|"tbdice"|"hashpool"|"nexious"|"bravomining"|"hotpool"|"okexpool"|"bcmonster"|"1hash"|"bixin"|"tatmaspool"|"viabtc"|"connectbtc"|"batpool"|"waterhole"|"dcexploration"|"dcex"|"btpool"|"58coin"|"bitcoinindia"|"shawnp0wers"|"phashio"|"rigpool"|"haozhuzhu"|"7pool"|"miningkings"|"hashbx"|"dpool"|"rawpool"|"haominer"|"helix"|"bitcoinukraine"|"poolin"|"secretsuperstar"|"tigerpoolnet"|"sigmapoolcom"|"okpooltop"|"hummerpool"|"tangpool"|"bytepool"|"spiderpool"|"novablock"|"miningcity"|"binancepool"|"minerium"|"lubiancom"|"okkong"|"aaopool"|"emcdpool"|"foundryusa"|"sbicrypto"|"arkpool"|"purebtccom"|"marapool"|"kucoinpool"|"entrustcharitypool"|"okminer"|"titan"|"pegapool"|"btcnuggets"|"cloudhashing"|"digitalxmintsy"|"telco214"|"btcpoolparty"|"multipool"|"transactioncoinmining"|"btcdig"|"trickysbtcpool"|"btcmp"|"eobot"|"unomp"|"patels"|"gogreenlight"|"bitcoinindiapool"|"ekanembtc"|"canoe"|"tiger"|"1m1x"|"zulupool"|"secpool"|"ocean"|"whitepool"|"wiz"|"wk057"|"futurebitapollosolo"|"carbonnegative"|"portlandhodl"|"phoenix"|"neopool"|"maxipool"|"bitfufupool"|"gdpool"|"miningdutch"|"publicpool"|"miningsquared"|"innopolistech"|"btclab"|"parasite"|"redrockpool"|"est3lar"|"braiinssolo"|"solopoolcom"|"noderunners")} PoolSlug
|
||||
* @typedef {("unknown"|"blockfills"|"ultimuspool"|"terrapool"|"luxor"|"1thash"|"btccom"|"bitfarms"|"huobipool"|"wayicn"|"canoepool"|"btctop"|"bitcoincom"|"175btc"|"gbminers"|"axbt"|"asicminer"|"bitminter"|"bitcoinrussia"|"btcserv"|"simplecoinus"|"btcguild"|"eligius"|"ozcoin"|"eclipsemc"|"maxbtc"|"triplemining"|"coinlab"|"50btc"|"ghashio"|"stminingcorp"|"bitparking"|"mmpool"|"polmine"|"kncminer"|"bitalo"|"f2pool"|"hhtt"|"megabigpower"|"mtred"|"nmcbit"|"yourbtcnet"|"givemecoins"|"braiinspool"|"antpool"|"multicoinco"|"bcpoolio"|"cointerra"|"kanopool"|"solock"|"ckpool"|"nicehash"|"bitclub"|"bitcoinaffiliatenetwork"|"btcc"|"bwpool"|"exxbw"|"bitsolo"|"bitfury"|"21inc"|"digitalbtc"|"8baochi"|"mybtccoinpool"|"tbdice"|"hashpool"|"nexious"|"bravomining"|"hotpool"|"okexpool"|"bcmonster"|"1hash"|"bixin"|"tatmaspool"|"viabtc"|"connectbtc"|"batpool"|"waterhole"|"dcexploration"|"dcex"|"btpool"|"58coin"|"bitcoinindia"|"shawnp0wers"|"phashio"|"rigpool"|"haozhuzhu"|"7pool"|"miningkings"|"hashbx"|"dpool"|"rawpool"|"haominer"|"helix"|"bitcoinukraine"|"poolin"|"secretsuperstar"|"tigerpoolnet"|"sigmapoolcom"|"okpooltop"|"hummerpool"|"tangpool"|"bytepool"|"spiderpool"|"novablock"|"miningcity"|"binancepool"|"minerium"|"lubiancom"|"okkong"|"aaopool"|"emcdpool"|"foundryusa"|"sbicrypto"|"arkpool"|"purebtccom"|"marapool"|"kucoinpool"|"entrustcharitypool"|"okminer"|"titan"|"pegapool"|"btcnuggets"|"cloudhashing"|"digitalxmintsy"|"telco214"|"btcpoolparty"|"multipool"|"transactioncoinmining"|"btcdig"|"trickysbtcpool"|"btcmp"|"eobot"|"unomp"|"patels"|"gogreenlight"|"bitcoinindiapool"|"ekanembtc"|"canoe"|"tiger"|"1m1x"|"zulupool"|"secpool"|"ocean"|"whitepool"|"wiz"|"wk057"|"futurebitapollosolo"|"carbonnegative"|"portlandhodl"|"phoenix"|"neopool"|"maxipool"|"bitfufupool"|"gdpool"|"miningdutch"|"publicpool"|"miningsquared"|"innopolistech"|"btclab"|"parasite"|"redrockpool"|"est3lar"|"braiinssolo"|"solopoolcom"|"noderunners"|"dmnd")} PoolSlug
|
||||
*/
|
||||
/**
|
||||
* Mining pool slug + block height path parameters
|
||||
@@ -3253,6 +3253,37 @@ function createPct10Pct20Pct30Pct40Pct50Pct60Pct70Pct80Pct90Pattern(client, acc)
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {Object} ChainDataFeeFeesOutputTxPattern
|
||||
* @property {PercentPpmRatioPattern2} chainShare
|
||||
* @property {AverageBlockCumulativeSumPattern<StoredU64>} dataBytes
|
||||
* @property {PercentPpmRatioPattern2} dataShare
|
||||
* @property {_1m1w1y24hPercentPpmRatioPattern} feeShare
|
||||
* @property {AverageBlockCumulativeSumPattern<Sats>} fees
|
||||
* @property {AverageBlockCumulativeSumPattern<StoredU64>} outputCount
|
||||
* @property {AverageBlockCumulativeSumPattern<StoredU64>} txCount
|
||||
* @property {AverageBlockCumulativeSumPattern<VSize>} txVsize
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create a ChainDataFeeFeesOutputTxPattern pattern node
|
||||
* @param {BrkClient} client
|
||||
* @param {string} acc - Accumulated series name
|
||||
* @returns {ChainDataFeeFeesOutputTxPattern}
|
||||
*/
|
||||
function createChainDataFeeFeesOutputTxPattern(client, acc) {
|
||||
return {
|
||||
chainShare: createPercentPpmRatioPattern2(client, _m(acc, 'chain_share')),
|
||||
dataBytes: createAverageBlockCumulativeSumPattern(client, _m(acc, 'data_bytes')),
|
||||
dataShare: createPercentPpmRatioPattern2(client, _m(acc, 'data_share')),
|
||||
feeShare: create_1m1w1y24hPercentPpmRatioPattern(client, _m(acc, 'fee_share')),
|
||||
fees: createAverageBlockCumulativeSumPattern(client, _m(acc, 'fees')),
|
||||
outputCount: createAverageBlockCumulativeSumPattern(client, _m(acc, 'output_count')),
|
||||
txCount: createAverageBlockCumulativeSumPattern(client, _m(acc, 'tx_count')),
|
||||
txVsize: createAverageBlockCumulativeSumPattern(client, _m(acc, 'tx_vsize')),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {Object} _10y2y3y4y5y6y8yPattern
|
||||
* @property {PercentPpmRatioPattern} _10y
|
||||
@@ -3579,33 +3610,6 @@ function createCentsNegativeToUsdPattern2(client, acc) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {Object} ChainDataOutputTxPattern
|
||||
* @property {PercentPpmRatioPattern2} chainShare
|
||||
* @property {AverageBlockCumulativeSumPattern<StoredU64>} dataBytes
|
||||
* @property {PercentPpmRatioPattern2} dataShare
|
||||
* @property {AverageBlockCumulativeSumPattern<StoredU64>} outputCount
|
||||
* @property {AverageBlockCumulativeSumPattern<StoredU64>} txCount
|
||||
* @property {AverageBlockCumulativeSumPattern<VSize>} txVsize
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create a ChainDataOutputTxPattern pattern node
|
||||
* @param {BrkClient} client
|
||||
* @param {string} acc - Accumulated series name
|
||||
* @returns {ChainDataOutputTxPattern}
|
||||
*/
|
||||
function createChainDataOutputTxPattern(client, acc) {
|
||||
return {
|
||||
chainShare: createPercentPpmRatioPattern2(client, _m(acc, 'chain_share')),
|
||||
dataBytes: createAverageBlockCumulativeSumPattern(client, _m(acc, 'data_bytes')),
|
||||
dataShare: createPercentPpmRatioPattern2(client, _m(acc, 'data_share')),
|
||||
outputCount: createAverageBlockCumulativeSumPattern(client, _m(acc, 'output_count')),
|
||||
txCount: createAverageBlockCumulativeSumPattern(client, _m(acc, 'tx_count')),
|
||||
txVsize: createAverageBlockCumulativeSumPattern(client, _m(acc, 'tx_vsize')),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {Object} DeltaDominanceHalfInTotalPattern2
|
||||
* @property {AbsoluteRatePattern3} delta
|
||||
@@ -6425,42 +6429,44 @@ function createTransferPattern(client, acc) {
|
||||
* @property {AverageBlockCumulativeSumPattern<StoredU64>} dataBytes
|
||||
* @property {AverageBlockCumulativeSumPattern<StoredU64>} txCount
|
||||
* @property {AverageBlockCumulativeSumPattern<VSize>} txVsize
|
||||
* @property {AverageBlockCumulativeSumPattern<Sats>} fees
|
||||
* @property {PercentPpmRatioPattern2} chainShare
|
||||
* @property {_1m1w1y24hPercentPpmRatioPattern} feeShare
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} SeriesTree_OpReturn_ByKind
|
||||
* @property {ChainDataOutputTxPattern} runes
|
||||
* @property {ChainDataOutputTxPattern} veriBlock
|
||||
* @property {ChainDataOutputTxPattern} omni
|
||||
* @property {ChainDataOutputTxPattern} stacks
|
||||
* @property {ChainDataOutputTxPattern} blockstack
|
||||
* @property {ChainDataOutputTxPattern} colu
|
||||
* @property {ChainDataOutputTxPattern} openAssets
|
||||
* @property {ChainDataOutputTxPattern} komodo
|
||||
* @property {ChainDataOutputTxPattern} coinSpark
|
||||
* @property {ChainDataOutputTxPattern} poet
|
||||
* @property {ChainDataOutputTxPattern} docproof
|
||||
* @property {ChainDataOutputTxPattern} openTimestamps
|
||||
* @property {ChainDataOutputTxPattern} factom
|
||||
* @property {ChainDataOutputTxPattern} eternityWall
|
||||
* @property {ChainDataOutputTxPattern} memo
|
||||
* @property {ChainDataOutputTxPattern} bitproof
|
||||
* @property {ChainDataOutputTxPattern} ascribe
|
||||
* @property {ChainDataOutputTxPattern} stampery
|
||||
* @property {ChainDataOutputTxPattern} epobc
|
||||
* @property {ChainDataOutputTxPattern} bareHash
|
||||
* @property {ChainDataOutputTxPattern} text
|
||||
* @property {ChainDataOutputTxPattern} empty
|
||||
* @property {ChainDataOutputTxPattern} unknown
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} runes
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} veriBlock
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} omni
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} stacks
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} blockstack
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} colu
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} openAssets
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} komodo
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} coinSpark
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} poet
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} docproof
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} openTimestamps
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} factom
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} eternityWall
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} memo
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} bitproof
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} ascribe
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} stampery
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} epobc
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} bareHash
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} text
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} empty
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} unknown
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} SeriesTree_OpReturn_Policy
|
||||
* @property {ChainDataOutputTxPattern} preV30Standard
|
||||
* @property {ChainDataOutputTxPattern} preV30Nonstandard
|
||||
* @property {ChainDataOutputTxPattern} oversized
|
||||
* @property {ChainDataOutputTxPattern} multiple
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} preV30Standard
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} preV30Nonstandard
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} oversized
|
||||
* @property {ChainDataFeeFeesOutputTxPattern} multiple
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -7500,6 +7506,7 @@ function createTransferPattern(client, acc) {
|
||||
* @property {BlocksDominancePattern} braiinssolo
|
||||
* @property {BlocksDominancePattern} solopool
|
||||
* @property {BlocksDominancePattern} noderunners
|
||||
* @property {BlocksDominancePattern} dmnd
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -8119,6 +8126,7 @@ class BrkClient extends BrkClientBase {
|
||||
"dcexploration": "DCExploration",
|
||||
"digitalbtc": "digitalBTC",
|
||||
"digitalxmintsy": "digitalX Mintsy",
|
||||
"dmnd": "DMND",
|
||||
"dpool": "DPOOL",
|
||||
"eclipsemc": "EclipseMC",
|
||||
"eightbaochi": "8baochi",
|
||||
@@ -9774,38 +9782,40 @@ class BrkClient extends BrkClientBase {
|
||||
dataBytes: createAverageBlockCumulativeSumPattern(this, 'op_return_data_bytes'),
|
||||
txCount: createAverageBlockCumulativeSumPattern(this, 'op_return_tx_count'),
|
||||
txVsize: createAverageBlockCumulativeSumPattern(this, 'op_return_tx_vsize'),
|
||||
fees: createAverageBlockCumulativeSumPattern(this, 'op_return_fees'),
|
||||
chainShare: createPercentPpmRatioPattern2(this, 'op_return_chain_share'),
|
||||
feeShare: create_1m1w1y24hPercentPpmRatioPattern(this, 'op_return_fee_share'),
|
||||
},
|
||||
byKind: {
|
||||
runes: createChainDataOutputTxPattern(this, 'op_return_runes'),
|
||||
veriBlock: createChainDataOutputTxPattern(this, 'op_return_veri_block'),
|
||||
omni: createChainDataOutputTxPattern(this, 'op_return_omni'),
|
||||
stacks: createChainDataOutputTxPattern(this, 'op_return_stacks'),
|
||||
blockstack: createChainDataOutputTxPattern(this, 'op_return_blockstack'),
|
||||
colu: createChainDataOutputTxPattern(this, 'op_return_colu'),
|
||||
openAssets: createChainDataOutputTxPattern(this, 'op_return_open_assets'),
|
||||
komodo: createChainDataOutputTxPattern(this, 'op_return_komodo'),
|
||||
coinSpark: createChainDataOutputTxPattern(this, 'op_return_coin_spark'),
|
||||
poet: createChainDataOutputTxPattern(this, 'op_return_poet'),
|
||||
docproof: createChainDataOutputTxPattern(this, 'op_return_docproof'),
|
||||
openTimestamps: createChainDataOutputTxPattern(this, 'op_return_open_timestamps'),
|
||||
factom: createChainDataOutputTxPattern(this, 'op_return_factom'),
|
||||
eternityWall: createChainDataOutputTxPattern(this, 'op_return_eternity_wall'),
|
||||
memo: createChainDataOutputTxPattern(this, 'op_return_memo'),
|
||||
bitproof: createChainDataOutputTxPattern(this, 'op_return_bitproof'),
|
||||
ascribe: createChainDataOutputTxPattern(this, 'op_return_ascribe'),
|
||||
stampery: createChainDataOutputTxPattern(this, 'op_return_stampery'),
|
||||
epobc: createChainDataOutputTxPattern(this, 'op_return_epobc'),
|
||||
bareHash: createChainDataOutputTxPattern(this, 'op_return_bare_hash'),
|
||||
text: createChainDataOutputTxPattern(this, 'op_return_text'),
|
||||
empty: createChainDataOutputTxPattern(this, 'op_return_empty'),
|
||||
unknown: createChainDataOutputTxPattern(this, 'op_return_unknown'),
|
||||
runes: createChainDataFeeFeesOutputTxPattern(this, 'op_return_runes'),
|
||||
veriBlock: createChainDataFeeFeesOutputTxPattern(this, 'op_return_veri_block'),
|
||||
omni: createChainDataFeeFeesOutputTxPattern(this, 'op_return_omni'),
|
||||
stacks: createChainDataFeeFeesOutputTxPattern(this, 'op_return_stacks'),
|
||||
blockstack: createChainDataFeeFeesOutputTxPattern(this, 'op_return_blockstack'),
|
||||
colu: createChainDataFeeFeesOutputTxPattern(this, 'op_return_colu'),
|
||||
openAssets: createChainDataFeeFeesOutputTxPattern(this, 'op_return_open_assets'),
|
||||
komodo: createChainDataFeeFeesOutputTxPattern(this, 'op_return_komodo'),
|
||||
coinSpark: createChainDataFeeFeesOutputTxPattern(this, 'op_return_coin_spark'),
|
||||
poet: createChainDataFeeFeesOutputTxPattern(this, 'op_return_poet'),
|
||||
docproof: createChainDataFeeFeesOutputTxPattern(this, 'op_return_docproof'),
|
||||
openTimestamps: createChainDataFeeFeesOutputTxPattern(this, 'op_return_open_timestamps'),
|
||||
factom: createChainDataFeeFeesOutputTxPattern(this, 'op_return_factom'),
|
||||
eternityWall: createChainDataFeeFeesOutputTxPattern(this, 'op_return_eternity_wall'),
|
||||
memo: createChainDataFeeFeesOutputTxPattern(this, 'op_return_memo'),
|
||||
bitproof: createChainDataFeeFeesOutputTxPattern(this, 'op_return_bitproof'),
|
||||
ascribe: createChainDataFeeFeesOutputTxPattern(this, 'op_return_ascribe'),
|
||||
stampery: createChainDataFeeFeesOutputTxPattern(this, 'op_return_stampery'),
|
||||
epobc: createChainDataFeeFeesOutputTxPattern(this, 'op_return_epobc'),
|
||||
bareHash: createChainDataFeeFeesOutputTxPattern(this, 'op_return_bare_hash'),
|
||||
text: createChainDataFeeFeesOutputTxPattern(this, 'op_return_text'),
|
||||
empty: createChainDataFeeFeesOutputTxPattern(this, 'op_return_empty'),
|
||||
unknown: createChainDataFeeFeesOutputTxPattern(this, 'op_return_unknown'),
|
||||
},
|
||||
policy: {
|
||||
preV30Standard: createChainDataOutputTxPattern(this, 'op_return_policy_pre_v30_standard'),
|
||||
preV30Nonstandard: createChainDataOutputTxPattern(this, 'op_return_policy_pre_v30_nonstandard'),
|
||||
oversized: createChainDataOutputTxPattern(this, 'op_return_policy_oversized'),
|
||||
multiple: createChainDataOutputTxPattern(this, 'op_return_policy_multiple'),
|
||||
preV30Standard: createChainDataFeeFeesOutputTxPattern(this, 'op_return_policy_pre_v30_standard'),
|
||||
preV30Nonstandard: createChainDataFeeFeesOutputTxPattern(this, 'op_return_policy_pre_v30_nonstandard'),
|
||||
oversized: createChainDataFeeFeesOutputTxPattern(this, 'op_return_policy_oversized'),
|
||||
multiple: createChainDataFeeFeesOutputTxPattern(this, 'op_return_policy_multiple'),
|
||||
},
|
||||
},
|
||||
mining: {
|
||||
@@ -10570,6 +10580,7 @@ class BrkClient extends BrkClientBase {
|
||||
braiinssolo: createBlocksDominancePattern(this, 'braiinssolo'),
|
||||
solopool: createBlocksDominancePattern(this, 'solopool'),
|
||||
noderunners: createBlocksDominancePattern(this, 'noderunners'),
|
||||
dmnd: createBlocksDominancePattern(this, 'dmnd'),
|
||||
},
|
||||
},
|
||||
price: {
|
||||
|
||||
@@ -37,7 +37,7 @@ AnyAddrIndex = TypeIndex
|
||||
# Bitcoin amount as floating point (1 BTC = 100,000,000 satoshis)
|
||||
Bitcoin = float
|
||||
# URL-friendly mining pool identifier
|
||||
PoolSlug = Literal["unknown", "blockfills", "ultimuspool", "terrapool", "luxor", "1thash", "btccom", "bitfarms", "huobipool", "wayicn", "canoepool", "btctop", "bitcoincom", "175btc", "gbminers", "axbt", "asicminer", "bitminter", "bitcoinrussia", "btcserv", "simplecoinus", "btcguild", "eligius", "ozcoin", "eclipsemc", "maxbtc", "triplemining", "coinlab", "50btc", "ghashio", "stminingcorp", "bitparking", "mmpool", "polmine", "kncminer", "bitalo", "f2pool", "hhtt", "megabigpower", "mtred", "nmcbit", "yourbtcnet", "givemecoins", "braiinspool", "antpool", "multicoinco", "bcpoolio", "cointerra", "kanopool", "solock", "ckpool", "nicehash", "bitclub", "bitcoinaffiliatenetwork", "btcc", "bwpool", "exxbw", "bitsolo", "bitfury", "21inc", "digitalbtc", "8baochi", "mybtccoinpool", "tbdice", "hashpool", "nexious", "bravomining", "hotpool", "okexpool", "bcmonster", "1hash", "bixin", "tatmaspool", "viabtc", "connectbtc", "batpool", "waterhole", "dcexploration", "dcex", "btpool", "58coin", "bitcoinindia", "shawnp0wers", "phashio", "rigpool", "haozhuzhu", "7pool", "miningkings", "hashbx", "dpool", "rawpool", "haominer", "helix", "bitcoinukraine", "poolin", "secretsuperstar", "tigerpoolnet", "sigmapoolcom", "okpooltop", "hummerpool", "tangpool", "bytepool", "spiderpool", "novablock", "miningcity", "binancepool", "minerium", "lubiancom", "okkong", "aaopool", "emcdpool", "foundryusa", "sbicrypto", "arkpool", "purebtccom", "marapool", "kucoinpool", "entrustcharitypool", "okminer", "titan", "pegapool", "btcnuggets", "cloudhashing", "digitalxmintsy", "telco214", "btcpoolparty", "multipool", "transactioncoinmining", "btcdig", "trickysbtcpool", "btcmp", "eobot", "unomp", "patels", "gogreenlight", "bitcoinindiapool", "ekanembtc", "canoe", "tiger", "1m1x", "zulupool", "secpool", "ocean", "whitepool", "wiz", "wk057", "futurebitapollosolo", "carbonnegative", "portlandhodl", "phoenix", "neopool", "maxipool", "bitfufupool", "gdpool", "miningdutch", "publicpool", "miningsquared", "innopolistech", "btclab", "parasite", "redrockpool", "est3lar", "braiinssolo", "solopoolcom", "noderunners"]
|
||||
PoolSlug = Literal["unknown", "blockfills", "ultimuspool", "terrapool", "luxor", "1thash", "btccom", "bitfarms", "huobipool", "wayicn", "canoepool", "btctop", "bitcoincom", "175btc", "gbminers", "axbt", "asicminer", "bitminter", "bitcoinrussia", "btcserv", "simplecoinus", "btcguild", "eligius", "ozcoin", "eclipsemc", "maxbtc", "triplemining", "coinlab", "50btc", "ghashio", "stminingcorp", "bitparking", "mmpool", "polmine", "kncminer", "bitalo", "f2pool", "hhtt", "megabigpower", "mtred", "nmcbit", "yourbtcnet", "givemecoins", "braiinspool", "antpool", "multicoinco", "bcpoolio", "cointerra", "kanopool", "solock", "ckpool", "nicehash", "bitclub", "bitcoinaffiliatenetwork", "btcc", "bwpool", "exxbw", "bitsolo", "bitfury", "21inc", "digitalbtc", "8baochi", "mybtccoinpool", "tbdice", "hashpool", "nexious", "bravomining", "hotpool", "okexpool", "bcmonster", "1hash", "bixin", "tatmaspool", "viabtc", "connectbtc", "batpool", "waterhole", "dcexploration", "dcex", "btpool", "58coin", "bitcoinindia", "shawnp0wers", "phashio", "rigpool", "haozhuzhu", "7pool", "miningkings", "hashbx", "dpool", "rawpool", "haominer", "helix", "bitcoinukraine", "poolin", "secretsuperstar", "tigerpoolnet", "sigmapoolcom", "okpooltop", "hummerpool", "tangpool", "bytepool", "spiderpool", "novablock", "miningcity", "binancepool", "minerium", "lubiancom", "okkong", "aaopool", "emcdpool", "foundryusa", "sbicrypto", "arkpool", "purebtccom", "marapool", "kucoinpool", "entrustcharitypool", "okminer", "titan", "pegapool", "btcnuggets", "cloudhashing", "digitalxmintsy", "telco214", "btcpoolparty", "multipool", "transactioncoinmining", "btcdig", "trickysbtcpool", "btcmp", "eobot", "unomp", "patels", "gogreenlight", "bitcoinindiapool", "ekanembtc", "canoe", "tiger", "1m1x", "zulupool", "secpool", "ocean", "whitepool", "wiz", "wk057", "futurebitapollosolo", "carbonnegative", "portlandhodl", "phoenix", "neopool", "maxipool", "bitfufupool", "gdpool", "miningdutch", "publicpool", "miningsquared", "innopolistech", "btclab", "parasite", "redrockpool", "est3lar", "braiinssolo", "solopoolcom", "noderunners", "dmnd"]
|
||||
# Fee rate in sat/vB
|
||||
FeeRate = float
|
||||
# Weight in weight units (WU). Max block weight is 4,000,000 WU.
|
||||
@@ -3349,6 +3349,20 @@ class Pct10Pct20Pct30Pct40Pct50Pct60Pct70Pct80Pct90Pattern:
|
||||
self.pct80: SeriesPattern1[Dollars] = SeriesPattern1(client, _m(acc, 'pct80'))
|
||||
self.pct90: SeriesPattern1[Dollars] = SeriesPattern1(client, _m(acc, 'pct90'))
|
||||
|
||||
class ChainDataFeeFeesOutputTxPattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
def __init__(self, client: BrkClient, acc: str):
|
||||
"""Create pattern node with accumulated series name."""
|
||||
self.chain_share: PercentPpmRatioPattern2 = PercentPpmRatioPattern2(client, _m(acc, 'chain_share'))
|
||||
self.data_bytes: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, _m(acc, 'data_bytes'))
|
||||
self.data_share: PercentPpmRatioPattern2 = PercentPpmRatioPattern2(client, _m(acc, 'data_share'))
|
||||
self.fee_share: _1m1w1y24hPercentPpmRatioPattern = _1m1w1y24hPercentPpmRatioPattern(client, _m(acc, 'fee_share'))
|
||||
self.fees: AverageBlockCumulativeSumPattern[Sats] = AverageBlockCumulativeSumPattern(client, _m(acc, 'fees'))
|
||||
self.output_count: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, _m(acc, 'output_count'))
|
||||
self.tx_count: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, _m(acc, 'tx_count'))
|
||||
self.tx_vsize: AverageBlockCumulativeSumPattern[VSize] = AverageBlockCumulativeSumPattern(client, _m(acc, 'tx_vsize'))
|
||||
|
||||
class _10y2y3y4y5y6y8yPattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
@@ -3493,18 +3507,6 @@ class CentsNegativeToUsdPattern2:
|
||||
self.to_own_mcap: PercentPpmRatioPattern2 = PercentPpmRatioPattern2(client, _m(acc, 'to_own_mcap'))
|
||||
self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, acc)
|
||||
|
||||
class ChainDataOutputTxPattern:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
def __init__(self, client: BrkClient, acc: str):
|
||||
"""Create pattern node with accumulated series name."""
|
||||
self.chain_share: PercentPpmRatioPattern2 = PercentPpmRatioPattern2(client, _m(acc, 'chain_share'))
|
||||
self.data_bytes: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, _m(acc, 'data_bytes'))
|
||||
self.data_share: PercentPpmRatioPattern2 = PercentPpmRatioPattern2(client, _m(acc, 'data_share'))
|
||||
self.output_count: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, _m(acc, 'output_count'))
|
||||
self.tx_count: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, _m(acc, 'tx_count'))
|
||||
self.tx_vsize: AverageBlockCumulativeSumPattern[VSize] = AverageBlockCumulativeSumPattern(client, _m(acc, 'tx_vsize'))
|
||||
|
||||
class DeltaDominanceHalfInTotalPattern2:
|
||||
"""Pattern struct for repeated tree structure."""
|
||||
|
||||
@@ -5185,44 +5187,46 @@ class SeriesTree_OpReturn_Total:
|
||||
self.data_bytes: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'op_return_data_bytes')
|
||||
self.tx_count: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'op_return_tx_count')
|
||||
self.tx_vsize: AverageBlockCumulativeSumPattern[VSize] = AverageBlockCumulativeSumPattern(client, 'op_return_tx_vsize')
|
||||
self.fees: AverageBlockCumulativeSumPattern[Sats] = AverageBlockCumulativeSumPattern(client, 'op_return_fees')
|
||||
self.chain_share: PercentPpmRatioPattern2 = PercentPpmRatioPattern2(client, 'op_return_chain_share')
|
||||
self.fee_share: _1m1w1y24hPercentPpmRatioPattern = _1m1w1y24hPercentPpmRatioPattern(client, 'op_return_fee_share')
|
||||
|
||||
class SeriesTree_OpReturn_ByKind:
|
||||
"""Series tree node."""
|
||||
|
||||
def __init__(self, client: BrkClient, base_path: str = ''):
|
||||
self.runes: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_runes')
|
||||
self.veri_block: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_veri_block')
|
||||
self.omni: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_omni')
|
||||
self.stacks: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_stacks')
|
||||
self.blockstack: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_blockstack')
|
||||
self.colu: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_colu')
|
||||
self.open_assets: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_open_assets')
|
||||
self.komodo: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_komodo')
|
||||
self.coin_spark: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_coin_spark')
|
||||
self.poet: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_poet')
|
||||
self.docproof: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_docproof')
|
||||
self.open_timestamps: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_open_timestamps')
|
||||
self.factom: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_factom')
|
||||
self.eternity_wall: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_eternity_wall')
|
||||
self.memo: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_memo')
|
||||
self.bitproof: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_bitproof')
|
||||
self.ascribe: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_ascribe')
|
||||
self.stampery: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_stampery')
|
||||
self.epobc: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_epobc')
|
||||
self.bare_hash: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_bare_hash')
|
||||
self.text: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_text')
|
||||
self.empty: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_empty')
|
||||
self.unknown: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_unknown')
|
||||
self.runes: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_runes')
|
||||
self.veri_block: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_veri_block')
|
||||
self.omni: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_omni')
|
||||
self.stacks: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_stacks')
|
||||
self.blockstack: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_blockstack')
|
||||
self.colu: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_colu')
|
||||
self.open_assets: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_open_assets')
|
||||
self.komodo: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_komodo')
|
||||
self.coin_spark: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_coin_spark')
|
||||
self.poet: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_poet')
|
||||
self.docproof: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_docproof')
|
||||
self.open_timestamps: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_open_timestamps')
|
||||
self.factom: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_factom')
|
||||
self.eternity_wall: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_eternity_wall')
|
||||
self.memo: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_memo')
|
||||
self.bitproof: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_bitproof')
|
||||
self.ascribe: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_ascribe')
|
||||
self.stampery: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_stampery')
|
||||
self.epobc: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_epobc')
|
||||
self.bare_hash: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_bare_hash')
|
||||
self.text: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_text')
|
||||
self.empty: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_empty')
|
||||
self.unknown: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_unknown')
|
||||
|
||||
class SeriesTree_OpReturn_Policy:
|
||||
"""Series tree node."""
|
||||
|
||||
def __init__(self, client: BrkClient, base_path: str = ''):
|
||||
self.pre_v30_standard: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_policy_pre_v30_standard')
|
||||
self.pre_v30_nonstandard: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_policy_pre_v30_nonstandard')
|
||||
self.oversized: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_policy_oversized')
|
||||
self.multiple: ChainDataOutputTxPattern = ChainDataOutputTxPattern(client, 'op_return_policy_multiple')
|
||||
self.pre_v30_standard: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_policy_pre_v30_standard')
|
||||
self.pre_v30_nonstandard: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_policy_pre_v30_nonstandard')
|
||||
self.oversized: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_policy_oversized')
|
||||
self.multiple: ChainDataFeeFeesOutputTxPattern = ChainDataFeeFeesOutputTxPattern(client, 'op_return_policy_multiple')
|
||||
|
||||
class SeriesTree_OpReturn:
|
||||
"""Series tree node."""
|
||||
@@ -6358,6 +6362,7 @@ class SeriesTree_Pools_Minor:
|
||||
self.braiinssolo: BlocksDominancePattern = BlocksDominancePattern(client, 'braiinssolo')
|
||||
self.solopool: BlocksDominancePattern = BlocksDominancePattern(client, 'solopool')
|
||||
self.noderunners: BlocksDominancePattern = BlocksDominancePattern(client, 'noderunners')
|
||||
self.dmnd: BlocksDominancePattern = BlocksDominancePattern(client, 'dmnd')
|
||||
|
||||
class SeriesTree_Pools:
|
||||
"""Series tree node."""
|
||||
@@ -7047,6 +7052,7 @@ class BrkClient(BrkClientBase):
|
||||
"dcexploration": "DCExploration",
|
||||
"digitalbtc": "digitalBTC",
|
||||
"digitalxmintsy": "digitalX Mintsy",
|
||||
"dmnd": "DMND",
|
||||
"dpool": "DPOOL",
|
||||
"eclipsemc": "EclipseMC",
|
||||
"eightbaochi": "8baochi",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
- Version: `v0.3.6`
|
||||
- Base URL: https://bitview.space
|
||||
- Metrics: 56817
|
||||
- Metrics: 57530
|
||||
- Operations: 97
|
||||
|
||||
For machine-readable tool construction, use [https://bitview.space/openapi.json](https://bitview.space/openapi.json). For the complete source-derived series tree, use [https://bitview.space/api/series](https://bitview.space/api/series).
|
||||
@@ -1834,7 +1834,7 @@ curl -s "https://bitview.space/version"
|
||||
|
||||
### `PoolSlug`
|
||||
|
||||
`unknown | blockfills | ultimuspool | terrapool | luxor | 1thash | btccom | bitfarms | huobipool | wayicn | canoepool | btctop | bitcoincom | 175btc | gbminers | axbt | asicminer | bitminter | bitcoinrussia | btcserv | simplecoinus | btcguild | eligius | ozcoin | eclipsemc | maxbtc | triplemining | coinlab | 50btc | ghashio | stminingcorp | bitparking | mmpool | polmine | kncminer | bitalo | f2pool | hhtt | megabigpower | mtred | nmcbit | yourbtcnet | givemecoins | braiinspool | antpool | multicoinco | bcpoolio | cointerra | kanopool | solock | ckpool | nicehash | bitclub | bitcoinaffiliatenetwork | btcc | bwpool | exxbw | bitsolo | bitfury | 21inc | digitalbtc | 8baochi | mybtccoinpool | tbdice | hashpool | nexious | bravomining | hotpool | okexpool | bcmonster | 1hash | bixin | tatmaspool | viabtc | connectbtc | batpool | waterhole | dcexploration | dcex | btpool | 58coin | bitcoinindia | shawnp0wers | phashio | rigpool | haozhuzhu | 7pool | miningkings | hashbx | dpool | rawpool | haominer | helix | bitcoinukraine | poolin | secretsuperstar | tigerpoolnet | sigmapoolcom | okpooltop | hummerpool | tangpool | bytepool | spiderpool | novablock | miningcity | binancepool | minerium | lubiancom | okkong | aaopool | emcdpool | foundryusa | sbicrypto | arkpool | purebtccom | marapool | kucoinpool | entrustcharitypool | okminer | titan | pegapool | btcnuggets | cloudhashing | digitalxmintsy | telco214 | btcpoolparty | multipool | transactioncoinmining | btcdig | trickysbtcpool | btcmp | eobot | unomp | patels | gogreenlight | bitcoinindiapool | ekanembtc | canoe | tiger | 1m1x | zulupool | secpool | ocean | whitepool | wiz | wk057 | futurebitapollosolo | carbonnegative | portlandhodl | phoenix | neopool | maxipool | bitfufupool | gdpool | miningdutch | publicpool | miningsquared | innopolistech | btclab | parasite | redrockpool | est3lar | braiinssolo | solopoolcom | noderunners`
|
||||
`unknown | blockfills | ultimuspool | terrapool | luxor | 1thash | btccom | bitfarms | huobipool | wayicn | canoepool | btctop | bitcoincom | 175btc | gbminers | axbt | asicminer | bitminter | bitcoinrussia | btcserv | simplecoinus | btcguild | eligius | ozcoin | eclipsemc | maxbtc | triplemining | coinlab | 50btc | ghashio | stminingcorp | bitparking | mmpool | polmine | kncminer | bitalo | f2pool | hhtt | megabigpower | mtred | nmcbit | yourbtcnet | givemecoins | braiinspool | antpool | multicoinco | bcpoolio | cointerra | kanopool | solock | ckpool | nicehash | bitclub | bitcoinaffiliatenetwork | btcc | bwpool | exxbw | bitsolo | bitfury | 21inc | digitalbtc | 8baochi | mybtccoinpool | tbdice | hashpool | nexious | bravomining | hotpool | okexpool | bcmonster | 1hash | bixin | tatmaspool | viabtc | connectbtc | batpool | waterhole | dcexploration | dcex | btpool | 58coin | bitcoinindia | shawnp0wers | phashio | rigpool | haozhuzhu | 7pool | miningkings | hashbx | dpool | rawpool | haominer | helix | bitcoinukraine | poolin | secretsuperstar | tigerpoolnet | sigmapoolcom | okpooltop | hummerpool | tangpool | bytepool | spiderpool | novablock | miningcity | binancepool | minerium | lubiancom | okkong | aaopool | emcdpool | foundryusa | sbicrypto | arkpool | purebtccom | marapool | kucoinpool | entrustcharitypool | okminer | titan | pegapool | btcnuggets | cloudhashing | digitalxmintsy | telco214 | btcpoolparty | multipool | transactioncoinmining | btcdig | trickysbtcpool | btcmp | eobot | unomp | patels | gogreenlight | bitcoinindiapool | ekanembtc | canoe | tiger | 1m1x | zulupool | secpool | ocean | whitepool | wiz | wk057 | futurebitapollosolo | carbonnegative | portlandhodl | phoenix | neopool | maxipool | bitfufupool | gdpool | miningdutch | publicpool | miningsquared | innopolistech | btclab | parasite | redrockpool | est3lar | braiinssolo | solopoolcom | noderunners | dmnd`
|
||||
|
||||
### `PoolStats`
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# Bitcoin Research Kit (BRK)
|
||||
|
||||
> Free, open-source Bitcoin analytics API and block explorer. 56817 on-chain time-series and 97 API operations. No authentication required.
|
||||
> Free, open-source Bitcoin analytics API and block explorer. 57530 on-chain time-series and 97 API operations. No authentication required.
|
||||
|
||||
## API
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
- Version: `v0.3.6`
|
||||
- Base URL: https://bitview.space
|
||||
- Metrics: 56817
|
||||
- Metrics: 57530
|
||||
- Operations: 97
|
||||
|
||||
For machine-readable tool construction, use [https://bitview.space/openapi.json](https://bitview.space/openapi.json). For the complete source-derived series tree, use [https://bitview.space/api/series](https://bitview.space/api/series).
|
||||
@@ -1834,7 +1834,7 @@ curl -s "https://bitview.space/version"
|
||||
|
||||
### `PoolSlug`
|
||||
|
||||
`unknown | blockfills | ultimuspool | terrapool | luxor | 1thash | btccom | bitfarms | huobipool | wayicn | canoepool | btctop | bitcoincom | 175btc | gbminers | axbt | asicminer | bitminter | bitcoinrussia | btcserv | simplecoinus | btcguild | eligius | ozcoin | eclipsemc | maxbtc | triplemining | coinlab | 50btc | ghashio | stminingcorp | bitparking | mmpool | polmine | kncminer | bitalo | f2pool | hhtt | megabigpower | mtred | nmcbit | yourbtcnet | givemecoins | braiinspool | antpool | multicoinco | bcpoolio | cointerra | kanopool | solock | ckpool | nicehash | bitclub | bitcoinaffiliatenetwork | btcc | bwpool | exxbw | bitsolo | bitfury | 21inc | digitalbtc | 8baochi | mybtccoinpool | tbdice | hashpool | nexious | bravomining | hotpool | okexpool | bcmonster | 1hash | bixin | tatmaspool | viabtc | connectbtc | batpool | waterhole | dcexploration | dcex | btpool | 58coin | bitcoinindia | shawnp0wers | phashio | rigpool | haozhuzhu | 7pool | miningkings | hashbx | dpool | rawpool | haominer | helix | bitcoinukraine | poolin | secretsuperstar | tigerpoolnet | sigmapoolcom | okpooltop | hummerpool | tangpool | bytepool | spiderpool | novablock | miningcity | binancepool | minerium | lubiancom | okkong | aaopool | emcdpool | foundryusa | sbicrypto | arkpool | purebtccom | marapool | kucoinpool | entrustcharitypool | okminer | titan | pegapool | btcnuggets | cloudhashing | digitalxmintsy | telco214 | btcpoolparty | multipool | transactioncoinmining | btcdig | trickysbtcpool | btcmp | eobot | unomp | patels | gogreenlight | bitcoinindiapool | ekanembtc | canoe | tiger | 1m1x | zulupool | secpool | ocean | whitepool | wiz | wk057 | futurebitapollosolo | carbonnegative | portlandhodl | phoenix | neopool | maxipool | bitfufupool | gdpool | miningdutch | publicpool | miningsquared | innopolistech | btclab | parasite | redrockpool | est3lar | braiinssolo | solopoolcom | noderunners`
|
||||
`unknown | blockfills | ultimuspool | terrapool | luxor | 1thash | btccom | bitfarms | huobipool | wayicn | canoepool | btctop | bitcoincom | 175btc | gbminers | axbt | asicminer | bitminter | bitcoinrussia | btcserv | simplecoinus | btcguild | eligius | ozcoin | eclipsemc | maxbtc | triplemining | coinlab | 50btc | ghashio | stminingcorp | bitparking | mmpool | polmine | kncminer | bitalo | f2pool | hhtt | megabigpower | mtred | nmcbit | yourbtcnet | givemecoins | braiinspool | antpool | multicoinco | bcpoolio | cointerra | kanopool | solock | ckpool | nicehash | bitclub | bitcoinaffiliatenetwork | btcc | bwpool | exxbw | bitsolo | bitfury | 21inc | digitalbtc | 8baochi | mybtccoinpool | tbdice | hashpool | nexious | bravomining | hotpool | okexpool | bcmonster | 1hash | bixin | tatmaspool | viabtc | connectbtc | batpool | waterhole | dcexploration | dcex | btpool | 58coin | bitcoinindia | shawnp0wers | phashio | rigpool | haozhuzhu | 7pool | miningkings | hashbx | dpool | rawpool | haominer | helix | bitcoinukraine | poolin | secretsuperstar | tigerpoolnet | sigmapoolcom | okpooltop | hummerpool | tangpool | bytepool | spiderpool | novablock | miningcity | binancepool | minerium | lubiancom | okkong | aaopool | emcdpool | foundryusa | sbicrypto | arkpool | purebtccom | marapool | kucoinpool | entrustcharitypool | okminer | titan | pegapool | btcnuggets | cloudhashing | digitalxmintsy | telco214 | btcpoolparty | multipool | transactioncoinmining | btcdig | trickysbtcpool | btcmp | eobot | unomp | patels | gogreenlight | bitcoinindiapool | ekanembtc | canoe | tiger | 1m1x | zulupool | secpool | ocean | whitepool | wiz | wk057 | futurebitapollosolo | carbonnegative | portlandhodl | phoenix | neopool | maxipool | bitfufupool | gdpool | miningdutch | publicpool | miningsquared | innopolistech | btclab | parasite | redrockpool | est3lar | braiinssolo | solopoolcom | noderunners | dmnd`
|
||||
|
||||
### `PoolStats`
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Bitcoin Research Kit (BRK)
|
||||
|
||||
> Free, open-source Bitcoin analytics API and block explorer. 56817 on-chain time-series and 97 API operations. No authentication required.
|
||||
> Free, open-source Bitcoin analytics API and block explorer. 57530 on-chain time-series and 97 API operations. No authentication required.
|
||||
|
||||
## API
|
||||
|
||||
|
||||
Reference in New Issue
Block a user