global: added datasets

This commit is contained in:
nym21
2025-08-28 00:31:14 +02:00
parent 311c4fd29d
commit 36640e3710
11 changed files with 454 additions and 119 deletions

View File

@@ -31,10 +31,9 @@ In other words it's an alternative to [Glassnode](https://glassnode.com), [mempo
The toolkit can be used in various ways to accommodate as many needs as possible: The toolkit can be used in various ways to accommodate as many needs as possible:
- **[Website](https://bitcoinresearchkit.org)** \ - **[Website](https://bitview.space)** \
Everyone is welcome to visit the official instance and showcase of the suite's capabilities. \ Everyone is welcome to visit the official instance and showcase of the suite's capabilities. \
It has a wide range of functionalities including charts, tables and simulations which you can visit for free and without the need for an account. \ It has a wide range of functionalities including charts, tables and simulations which you can visit for free and without the need for an account.
Also available at: [brekit.org](https://brekit.org) // [kibo.money](https://kibo.money) // [satonomics.xyz](https://satonomics.xyz)
- **[API](https://github.com/bitcoinresearchkit/brk/tree/main/crates/brk_server#brk-server)** \ - **[API](https://github.com/bitcoinresearchkit/brk/tree/main/crates/brk_server#brk-server)** \
Researchers and developers are free to use BRK's public API with ![Datasets variant count](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fbitcoinresearchkit.org%2Fapi%2Fvecs%2Fvec-count&query=%24&style=flat&label=%20&color=white) dataset variants at their disposal. \ Researchers and developers are free to use BRK's public API with ![Datasets variant count](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fbitcoinresearchkit.org%2Fapi%2Fvecs%2Fvec-count&query=%24&style=flat&label=%20&color=white) dataset variants at their disposal. \
Just like the website, it's entirely free, with no authentication or rate-limiting. Just like the website, it's entirely free, with no authentication or rate-limiting.
@@ -62,7 +61,7 @@ If you'd like to have your own instance hosted for you please contact [hosting@b
- Updates delivered at your convenience - Updates delivered at your convenience
- Direct communication for feature requests and support - Direct communication for feature requests and support
- Bitcoin Core or Knots with desired version - Bitcoin Core or Knots with desired version
- Optional subdomains: `*.bitcoinresearchkit.org`, `*.brekit.org`, `*.kibo.money` and `*.satonomics.xyz` - Optional subdomains
- Logo featured in the Readme if desired - Logo featured in the Readme if desired
Pricing: `0.01 BTC / month` *or* `0.1 BTC / year` Pricing: `0.01 BTC / month` *or* `0.1 BTC / year`

View File

@@ -78,15 +78,25 @@ impl Vecs {
Source::None, Source::None,
version + VERSION + Version::ZERO, version + VERSION + Version::ZERO,
indexes, indexes,
VecBuilderOptions::default().add_sum().add_cumulative(), VecBuilderOptions::default()
.add_sum()
.add_minmax()
.add_average()
.add_percentiles()
.add_cumulative(),
)?, )?,
indexes_to_block_size: ComputedVecsFromHeight::forced_import( indexes_to_block_size: ComputedVecsFromHeight::forced_import(
&db, &db,
"block_size", "block_size",
Source::None, Source::Compute,
version + VERSION + Version::ZERO, version + VERSION + Version::ZERO,
indexes, indexes,
VecBuilderOptions::default().add_sum().add_cumulative(), VecBuilderOptions::default()
.add_sum()
.add_minmax()
.add_average()
.add_percentiles()
.add_cumulative(),
)?, )?,
height_to_vbytes: EagerVec::forced_import_compressed( height_to_vbytes: EagerVec::forced_import_compressed(
&db, &db,
@@ -99,7 +109,12 @@ impl Vecs {
Source::None, Source::None,
version + VERSION + Version::ZERO, version + VERSION + Version::ZERO,
indexes, indexes,
VecBuilderOptions::default().add_sum().add_cumulative(), VecBuilderOptions::default()
.add_sum()
.add_minmax()
.add_average()
.add_percentiles()
.add_cumulative(),
)?, )?,
difficultyepoch_to_timestamp: EagerVec::forced_import_compressed( difficultyepoch_to_timestamp: EagerVec::forced_import_compressed(
&db, &db,

View File

@@ -79,8 +79,8 @@ impl Vecs {
version, version,
indexes, indexes,
price, price,
compute_relative_to_all,
false, false,
compute_relative_to_all,
false, false,
)?, )?,
}) })

View File

@@ -52,12 +52,16 @@ pub struct Vecs {
pub indexes_to_coindays_destroyed: ComputedVecsFromHeight<StoredF64>, pub indexes_to_coindays_destroyed: ComputedVecsFromHeight<StoredF64>,
pub dateindex_to_spent_output_profit_ratio: Option<EagerVec<DateIndex, StoredF32>>, pub dateindex_to_spent_output_profit_ratio: Option<EagerVec<DateIndex, StoredF32>>,
pub dateindex_to_spent_output_profit_ratio_7d_ema: Option<EagerVec<DateIndex, StoredF32>>, pub dateindex_to_spent_output_profit_ratio_7d_ema: Option<EagerVec<DateIndex, StoredF32>>,
pub dateindex_to_spent_output_profit_ratio_30d_ema: Option<EagerVec<DateIndex, StoredF32>>,
pub dateindex_to_adjusted_spent_output_profit_ratio: Option<EagerVec<DateIndex, StoredF32>>, pub dateindex_to_adjusted_spent_output_profit_ratio: Option<EagerVec<DateIndex, StoredF32>>,
pub dateindex_to_adjusted_spent_output_profit_ratio_7d_ema: pub dateindex_to_adjusted_spent_output_profit_ratio_7d_ema:
Option<EagerVec<DateIndex, StoredF32>>, Option<EagerVec<DateIndex, StoredF32>>,
pub dateindex_to_adjusted_spent_output_profit_ratio_30d_ema:
Option<EagerVec<DateIndex, StoredF32>>,
pub indexes_to_realized_cap_30d_change: Option<ComputedVecsFromDateIndex<Dollars>>, pub indexes_to_realized_cap_30d_change: Option<ComputedVecsFromDateIndex<Dollars>>,
pub dateindex_to_sell_side_risk_ratio: Option<EagerVec<DateIndex, StoredF32>>, pub dateindex_to_sell_side_risk_ratio: Option<EagerVec<DateIndex, StoredF32>>,
pub dateindex_to_sell_side_risk_ratio_7d_ema: Option<EagerVec<DateIndex, StoredF32>>, pub dateindex_to_sell_side_risk_ratio_7d_ema: Option<EagerVec<DateIndex, StoredF32>>,
pub dateindex_to_sell_side_risk_ratio_30d_ema: Option<EagerVec<DateIndex, StoredF32>>,
pub indexes_to_adjusted_value_created: Option<ComputedVecsFromHeight<Dollars>>, pub indexes_to_adjusted_value_created: Option<ComputedVecsFromHeight<Dollars>>,
pub indexes_to_adjusted_value_destroyed: Option<ComputedVecsFromHeight<Dollars>>, pub indexes_to_adjusted_value_destroyed: Option<ComputedVecsFromHeight<Dollars>>,
pub indexes_to_negative_realized_loss: Option<ComputedVecsFromHeight<Dollars>>, pub indexes_to_negative_realized_loss: Option<ComputedVecsFromHeight<Dollars>>,
@@ -83,8 +87,18 @@ pub struct Vecs {
pub indexes_to_negative_unrealized_loss: Option<ComputedVecsFromDateIndex<Dollars>>, pub indexes_to_negative_unrealized_loss: Option<ComputedVecsFromDateIndex<Dollars>>,
pub height_to_net_unrealized_profit_and_loss: Option<EagerVec<Height, Dollars>>, pub height_to_net_unrealized_profit_and_loss: Option<EagerVec<Height, Dollars>>,
pub indexes_to_net_unrealized_profit_and_loss: Option<ComputedVecsFromDateIndex<Dollars>>, pub indexes_to_net_unrealized_profit_and_loss: Option<ComputedVecsFromDateIndex<Dollars>>,
pub height_to_unrealized_profit_relative_to_market_cap: Option<EagerVec<Height, StoredF32>>,
pub height_to_unrealized_loss_relative_to_market_cap: Option<EagerVec<Height, StoredF32>>,
pub height_to_negative_unrealized_loss_relative_to_market_cap:
Option<EagerVec<Height, StoredF32>>,
pub height_to_net_unrealized_profit_and_loss_relative_to_market_cap: pub height_to_net_unrealized_profit_and_loss_relative_to_market_cap:
Option<EagerVec<Height, StoredF32>>, Option<EagerVec<Height, StoredF32>>,
pub indexes_to_unrealized_profit_relative_to_market_cap:
Option<ComputedVecsFromDateIndex<StoredF32>>,
pub indexes_to_unrealized_loss_relative_to_market_cap:
Option<ComputedVecsFromDateIndex<StoredF32>>,
pub indexes_to_negative_unrealized_loss_relative_to_market_cap:
Option<ComputedVecsFromDateIndex<StoredF32>>,
pub indexes_to_net_unrealized_profit_and_loss_relative_to_market_cap: pub indexes_to_net_unrealized_profit_and_loss_relative_to_market_cap:
Option<ComputedVecsFromDateIndex<StoredF32>>, Option<ComputedVecsFromDateIndex<StoredF32>>,
pub indexes_to_realized_profit_relative_to_realized_cap: pub indexes_to_realized_profit_relative_to_realized_cap:
@@ -136,8 +150,8 @@ impl Vecs {
version: Version, version: Version,
indexes: &indexes::Vecs, indexes: &indexes::Vecs,
price: Option<&price::Vecs>, price: Option<&price::Vecs>,
extended: bool,
compute_relative_to_all: bool, compute_relative_to_all: bool,
ratio_extended: bool,
compute_adjusted: bool, compute_adjusted: bool,
) -> Result<Self> { ) -> Result<Self> {
let compute_dollars = price.is_some(); let compute_dollars = price.is_some();
@@ -420,7 +434,7 @@ impl Vecs {
Source::None, Source::None,
version + VERSION + Version::ZERO, version + VERSION + Version::ZERO,
indexes, indexes,
ratio_extended, extended,
) )
.unwrap() .unwrap()
}), }),
@@ -612,6 +626,15 @@ impl Vecs {
) )
.unwrap() .unwrap()
}), }),
dateindex_to_sell_side_risk_ratio_30d_ema: compute_dollars.then(|| {
EagerVec::forced_import(
db,
&suffix("sell_side_risk_ratio_30d_ema"),
version + VERSION + Version::ONE,
format,
)
.unwrap()
}),
dateindex_to_spent_output_profit_ratio: compute_dollars.then(|| { dateindex_to_spent_output_profit_ratio: compute_dollars.then(|| {
EagerVec::forced_import( EagerVec::forced_import(
db, db,
@@ -630,6 +653,15 @@ impl Vecs {
) )
.unwrap() .unwrap()
}), }),
dateindex_to_spent_output_profit_ratio_30d_ema: compute_dollars.then(|| {
EagerVec::forced_import(
db,
&suffix("spent_output_profit_ratio_30d_ema"),
version + VERSION + Version::ZERO,
format,
)
.unwrap()
}),
dateindex_to_adjusted_spent_output_profit_ratio: (compute_dollars && compute_adjusted).then(|| { dateindex_to_adjusted_spent_output_profit_ratio: (compute_dollars && compute_adjusted).then(|| {
EagerVec::forced_import( EagerVec::forced_import(
db, db,
@@ -648,6 +680,15 @@ impl Vecs {
) )
.unwrap() .unwrap()
}), }),
dateindex_to_adjusted_spent_output_profit_ratio_30d_ema: (compute_dollars && compute_adjusted).then(|| {
EagerVec::forced_import(
db,
&suffix("adjusted_spent_output_profit_ratio_30d_ema"),
version + VERSION + Version::ZERO,
format,
)
.unwrap()
}),
height_to_halved_supply_value: ComputedHeightValueVecs::forced_import( height_to_halved_supply_value: ComputedHeightValueVecs::forced_import(
db, db,
&suffix("halved_supply"), &suffix("halved_supply"),
@@ -705,6 +746,39 @@ impl Vecs {
) )
.unwrap() .unwrap()
}), }),
height_to_unrealized_profit_relative_to_market_cap: compute_dollars.then(
|| {
EagerVec::forced_import(
db,
&suffix("unrealized_profit_relative_to_market_cap"),
version + VERSION + Version::ZERO,
format,
)
.unwrap()
},
),
height_to_unrealized_loss_relative_to_market_cap: compute_dollars.then(
|| {
EagerVec::forced_import(
db,
&suffix("unrealized_loss_relative_to_market_cap"),
version + VERSION + Version::ZERO,
format,
)
.unwrap()
},
),
height_to_negative_unrealized_loss_relative_to_market_cap: compute_dollars.then(
|| {
EagerVec::forced_import(
db,
&suffix("negative_unrealized_loss_relative_to_market_cap"),
version + VERSION + Version::ZERO,
format,
)
.unwrap()
},
),
height_to_net_unrealized_profit_and_loss_relative_to_market_cap: compute_dollars.then( height_to_net_unrealized_profit_and_loss_relative_to_market_cap: compute_dollars.then(
|| { || {
EagerVec::forced_import( EagerVec::forced_import(
@@ -716,6 +790,45 @@ impl Vecs {
.unwrap() .unwrap()
}, },
), ),
indexes_to_unrealized_profit_relative_to_market_cap: compute_dollars.then(
|| {
ComputedVecsFromDateIndex::forced_import(
db,
&suffix("unrealized_profit_relative_to_market_cap"),
Source::Compute,
version + VERSION + Version::ONE,
indexes,
VecBuilderOptions::default().add_last(),
)
.unwrap()
},
),
indexes_to_unrealized_loss_relative_to_market_cap: compute_dollars.then(
|| {
ComputedVecsFromDateIndex::forced_import(
db,
&suffix("unrealized_loss_relative_to_market_cap"),
Source::Compute,
version + VERSION + Version::ONE,
indexes,
VecBuilderOptions::default().add_last(),
)
.unwrap()
},
),
indexes_to_negative_unrealized_loss_relative_to_market_cap: compute_dollars.then(
|| {
ComputedVecsFromDateIndex::forced_import(
db,
&suffix("negative_unrealized_loss_relative_to_market_cap"),
Source::Compute,
version + VERSION + Version::ONE,
indexes,
VecBuilderOptions::default().add_last(),
)
.unwrap()
},
),
indexes_to_net_unrealized_profit_and_loss_relative_to_market_cap: compute_dollars.then( indexes_to_net_unrealized_profit_and_loss_relative_to_market_cap: compute_dollars.then(
|| { || {
ComputedVecsFromDateIndex::forced_import( ComputedVecsFromDateIndex::forced_import(
@@ -2220,6 +2333,18 @@ impl Vecs {
exit, exit,
)?; )?;
self.dateindex_to_spent_output_profit_ratio_30d_ema
.as_mut()
.unwrap()
.compute_ema(
starting_indexes.dateindex,
self.dateindex_to_spent_output_profit_ratio
.as_ref()
.unwrap(),
30,
exit,
)?;
self.dateindex_to_sell_side_risk_ratio self.dateindex_to_sell_side_risk_ratio
.as_mut() .as_mut()
.unwrap() .unwrap()
@@ -2248,6 +2373,16 @@ impl Vecs {
exit, exit,
)?; )?;
self.dateindex_to_sell_side_risk_ratio_30d_ema
.as_mut()
.unwrap()
.compute_ema(
starting_indexes.dateindex,
self.dateindex_to_sell_side_risk_ratio.as_ref().unwrap(),
30,
exit,
)?;
self.indexes_to_supply_in_profit self.indexes_to_supply_in_profit
.as_mut() .as_mut()
.unwrap() .unwrap()
@@ -2369,6 +2504,33 @@ impl Vecs {
Ok(()) Ok(())
}, },
)?; )?;
self.height_to_unrealized_profit_relative_to_market_cap
.as_mut()
.unwrap()
.compute_percentage(
starting_indexes.height,
self.height_to_unrealized_profit.as_ref().unwrap(),
&market.height_to_marketcap,
exit,
)?;
self.height_to_unrealized_loss_relative_to_market_cap
.as_mut()
.unwrap()
.compute_percentage(
starting_indexes.height,
self.height_to_unrealized_loss.as_ref().unwrap(),
&market.height_to_marketcap,
exit,
)?;
self.height_to_negative_unrealized_loss_relative_to_market_cap
.as_mut()
.unwrap()
.compute_percentage(
starting_indexes.height,
self.height_to_negative_unrealized_loss.as_ref().unwrap(),
&market.height_to_marketcap,
exit,
)?;
self.height_to_net_unrealized_profit_and_loss_relative_to_market_cap self.height_to_net_unrealized_profit_and_loss_relative_to_market_cap
.as_mut() .as_mut()
.unwrap() .unwrap()
@@ -2380,6 +2542,65 @@ impl Vecs {
&market.height_to_marketcap, &market.height_to_marketcap,
exit, exit,
)?; )?;
self.indexes_to_unrealized_profit_relative_to_market_cap
.as_mut()
.unwrap()
.compute_all(
indexer,
indexes,
starting_indexes,
exit,
|vec, _, _, starting_indexes, exit| {
vec.compute_percentage(
starting_indexes.dateindex,
self.dateindex_to_unrealized_profit.as_ref().unwrap(),
market.indexes_to_marketcap.dateindex.as_ref().unwrap(),
exit,
)?;
Ok(())
},
)?;
self.indexes_to_unrealized_loss_relative_to_market_cap
.as_mut()
.unwrap()
.compute_all(
indexer,
indexes,
starting_indexes,
exit,
|vec, _, _, starting_indexes, exit| {
vec.compute_percentage(
starting_indexes.dateindex,
self.dateindex_to_unrealized_loss.as_ref().unwrap(),
market.indexes_to_marketcap.dateindex.as_ref().unwrap(),
exit,
)?;
Ok(())
},
)?;
self.indexes_to_negative_unrealized_loss_relative_to_market_cap
.as_mut()
.unwrap()
.compute_all(
indexer,
indexes,
starting_indexes,
exit,
|vec, _, _, starting_indexes, exit| {
vec.compute_percentage(
starting_indexes.dateindex,
self.indexes_to_negative_unrealized_loss
.as_ref()
.unwrap()
.dateindex
.as_ref()
.unwrap(),
market.indexes_to_marketcap.dateindex.as_ref().unwrap(),
exit,
)?;
Ok(())
},
)?;
self.indexes_to_net_unrealized_profit_and_loss_relative_to_market_cap self.indexes_to_net_unrealized_profit_and_loss_relative_to_market_cap
.as_mut() .as_mut()
.unwrap() .unwrap()
@@ -2822,6 +3043,18 @@ impl Vecs {
7, 7,
exit, exit,
)?; )?;
self.dateindex_to_adjusted_spent_output_profit_ratio_30d_ema
.as_mut()
.unwrap()
.compute_ema(
starting_indexes.dateindex,
self.dateindex_to_adjusted_spent_output_profit_ratio
.as_ref()
.unwrap(),
30,
exit,
)?;
} }
} }
@@ -2891,12 +3124,18 @@ impl Vecs {
self.dateindex_to_spent_output_profit_ratio_7d_ema self.dateindex_to_spent_output_profit_ratio_7d_ema
.as_ref() .as_ref()
.map_or(vec![], |v| vec![v as &dyn AnyCollectableVec]), .map_or(vec![], |v| vec![v as &dyn AnyCollectableVec]),
self.dateindex_to_spent_output_profit_ratio_30d_ema
.as_ref()
.map_or(vec![], |v| vec![v as &dyn AnyCollectableVec]),
self.dateindex_to_adjusted_spent_output_profit_ratio self.dateindex_to_adjusted_spent_output_profit_ratio
.as_ref() .as_ref()
.map_or(vec![], |v| vec![v as &dyn AnyCollectableVec]), .map_or(vec![], |v| vec![v as &dyn AnyCollectableVec]),
self.dateindex_to_adjusted_spent_output_profit_ratio_7d_ema self.dateindex_to_adjusted_spent_output_profit_ratio_7d_ema
.as_ref() .as_ref()
.map_or(vec![], |v| vec![v as &dyn AnyCollectableVec]), .map_or(vec![], |v| vec![v as &dyn AnyCollectableVec]),
self.dateindex_to_adjusted_spent_output_profit_ratio_30d_ema
.as_ref()
.map_or(vec![], |v| vec![v as &dyn AnyCollectableVec]),
self.indexes_to_value_destroyed self.indexes_to_value_destroyed
.as_ref() .as_ref()
.map_or(vec![], |v| v.vecs()), .map_or(vec![], |v| v.vecs()),
@@ -2918,6 +3157,9 @@ impl Vecs {
self.dateindex_to_sell_side_risk_ratio_7d_ema self.dateindex_to_sell_side_risk_ratio_7d_ema
.as_ref() .as_ref()
.map_or(vec![], |v| vec![v]), .map_or(vec![], |v| vec![v]),
self.dateindex_to_sell_side_risk_ratio_30d_ema
.as_ref()
.map_or(vec![], |v| vec![v]),
self.height_to_supply_in_profit self.height_to_supply_in_profit
.as_ref() .as_ref()
.map_or(vec![], |v| vec![v]), .map_or(vec![], |v| vec![v]),
@@ -2988,9 +3230,27 @@ impl Vecs {
self.indexes_to_net_unrealized_profit_and_loss self.indexes_to_net_unrealized_profit_and_loss
.as_ref() .as_ref()
.map_or(vec![], |v| v.vecs()), .map_or(vec![], |v| v.vecs()),
self.height_to_unrealized_profit_relative_to_market_cap
.as_ref()
.map_or(vec![], |v| vec![v]),
self.height_to_unrealized_loss_relative_to_market_cap
.as_ref()
.map_or(vec![], |v| vec![v]),
self.height_to_negative_unrealized_loss_relative_to_market_cap
.as_ref()
.map_or(vec![], |v| vec![v]),
self.height_to_net_unrealized_profit_and_loss_relative_to_market_cap self.height_to_net_unrealized_profit_and_loss_relative_to_market_cap
.as_ref() .as_ref()
.map_or(vec![], |v| vec![v]), .map_or(vec![], |v| vec![v]),
self.indexes_to_unrealized_profit_relative_to_market_cap
.as_ref()
.map_or(vec![], |v| v.vecs()),
self.indexes_to_unrealized_loss_relative_to_market_cap
.as_ref()
.map_or(vec![], |v| v.vecs()),
self.indexes_to_negative_unrealized_loss_relative_to_market_cap
.as_ref()
.map_or(vec![], |v| v.vecs()),
self.indexes_to_net_unrealized_profit_and_loss_relative_to_market_cap self.indexes_to_net_unrealized_profit_and_loss_relative_to_market_cap
.as_ref() .as_ref()
.map_or(vec![], |v| v.vecs()), .map_or(vec![], |v| v.vecs()),

View File

@@ -32,8 +32,8 @@ impl Vecs {
indexes: &indexes::Vecs, indexes: &indexes::Vecs,
price: Option<&price::Vecs>, price: Option<&price::Vecs>,
states_path: Option<&Path>, states_path: Option<&Path>,
extended: bool,
compute_relative_to_all: bool, compute_relative_to_all: bool,
ratio_extended: bool,
compute_adjusted: bool, compute_adjusted: bool,
) -> Result<Self> { ) -> Result<Self> {
let compute_dollars = price.is_some(); let compute_dollars = price.is_some();
@@ -56,8 +56,8 @@ impl Vecs {
version, version,
indexes, indexes,
price, price,
extended,
compute_relative_to_all, compute_relative_to_all,
ratio_extended,
compute_adjusted, compute_adjusted,
)?, )?,
}) })

View File

@@ -42,8 +42,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
false,
true, true,
false,
true, true,
)?, )?,
term: ByTerm { term: ByTerm {
@@ -143,8 +143,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
p2pk33: utxo_cohort::Vecs::forced_import( p2pk33: utxo_cohort::Vecs::forced_import(
@@ -155,8 +155,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
p2pkh: utxo_cohort::Vecs::forced_import( p2pkh: utxo_cohort::Vecs::forced_import(
@@ -167,8 +167,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
p2sh: utxo_cohort::Vecs::forced_import( p2sh: utxo_cohort::Vecs::forced_import(
@@ -179,8 +179,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
p2wpkh: utxo_cohort::Vecs::forced_import( p2wpkh: utxo_cohort::Vecs::forced_import(
@@ -191,8 +191,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
p2wsh: utxo_cohort::Vecs::forced_import( p2wsh: utxo_cohort::Vecs::forced_import(
@@ -203,8 +203,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
p2tr: utxo_cohort::Vecs::forced_import( p2tr: utxo_cohort::Vecs::forced_import(
@@ -215,8 +215,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
p2a: utxo_cohort::Vecs::forced_import( p2a: utxo_cohort::Vecs::forced_import(
@@ -227,8 +227,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
p2ms: utxo_cohort::Vecs::forced_import( p2ms: utxo_cohort::Vecs::forced_import(
@@ -239,8 +239,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
empty: utxo_cohort::Vecs::forced_import( empty: utxo_cohort::Vecs::forced_import(
@@ -251,8 +251,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
unknown: utxo_cohort::Vecs::forced_import( unknown: utxo_cohort::Vecs::forced_import(
@@ -263,8 +263,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
}, },
@@ -955,8 +955,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
_1sat_to_10sats: utxo_cohort::Vecs::forced_import( _1sat_to_10sats: utxo_cohort::Vecs::forced_import(
@@ -967,8 +967,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
_10sats_to_100sats: utxo_cohort::Vecs::forced_import( _10sats_to_100sats: utxo_cohort::Vecs::forced_import(
@@ -979,8 +979,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
_100sats_to_1k_sats: utxo_cohort::Vecs::forced_import( _100sats_to_1k_sats: utxo_cohort::Vecs::forced_import(
@@ -991,8 +991,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
_1k_sats_to_10k_sats: utxo_cohort::Vecs::forced_import( _1k_sats_to_10k_sats: utxo_cohort::Vecs::forced_import(
@@ -1003,8 +1003,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
_10k_sats_to_100k_sats: utxo_cohort::Vecs::forced_import( _10k_sats_to_100k_sats: utxo_cohort::Vecs::forced_import(
@@ -1015,8 +1015,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
_100k_sats_to_1m_sats: utxo_cohort::Vecs::forced_import( _100k_sats_to_1m_sats: utxo_cohort::Vecs::forced_import(
@@ -1027,8 +1027,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
_1m_sats_to_10m_sats: utxo_cohort::Vecs::forced_import( _1m_sats_to_10m_sats: utxo_cohort::Vecs::forced_import(
@@ -1039,8 +1039,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
_10m_sats_to_1btc: utxo_cohort::Vecs::forced_import( _10m_sats_to_1btc: utxo_cohort::Vecs::forced_import(
@@ -1051,8 +1051,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
_1btc_to_10btc: utxo_cohort::Vecs::forced_import( _1btc_to_10btc: utxo_cohort::Vecs::forced_import(
@@ -1063,8 +1063,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
_10btc_to_100btc: utxo_cohort::Vecs::forced_import( _10btc_to_100btc: utxo_cohort::Vecs::forced_import(
@@ -1075,8 +1075,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
_100btc_to_1k_btc: utxo_cohort::Vecs::forced_import( _100btc_to_1k_btc: utxo_cohort::Vecs::forced_import(
@@ -1087,8 +1087,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
_1k_btc_to_10k_btc: utxo_cohort::Vecs::forced_import( _1k_btc_to_10k_btc: utxo_cohort::Vecs::forced_import(
@@ -1099,8 +1099,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
_10k_btc_to_100k_btc: utxo_cohort::Vecs::forced_import( _10k_btc_to_100k_btc: utxo_cohort::Vecs::forced_import(
@@ -1111,8 +1111,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
_100k_btc_or_more: utxo_cohort::Vecs::forced_import( _100k_btc_or_more: utxo_cohort::Vecs::forced_import(
@@ -1123,8 +1123,8 @@ impl Vecs {
indexes, indexes,
price, price,
Some(states_path), Some(states_path),
true,
false, false,
true,
false, false,
)?, )?,
}, },
@@ -1137,8 +1137,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_100sats: utxo_cohort::Vecs::forced_import( _100sats: utxo_cohort::Vecs::forced_import(
@@ -1149,8 +1149,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_1k_sats: utxo_cohort::Vecs::forced_import( _1k_sats: utxo_cohort::Vecs::forced_import(
@@ -1161,8 +1161,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_10k_sats: utxo_cohort::Vecs::forced_import( _10k_sats: utxo_cohort::Vecs::forced_import(
@@ -1173,8 +1173,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_100k_sats: utxo_cohort::Vecs::forced_import( _100k_sats: utxo_cohort::Vecs::forced_import(
@@ -1185,8 +1185,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_1m_sats: utxo_cohort::Vecs::forced_import( _1m_sats: utxo_cohort::Vecs::forced_import(
@@ -1197,8 +1197,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_10m_sats: utxo_cohort::Vecs::forced_import( _10m_sats: utxo_cohort::Vecs::forced_import(
@@ -1209,8 +1209,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_1btc: utxo_cohort::Vecs::forced_import( _1btc: utxo_cohort::Vecs::forced_import(
@@ -1221,8 +1221,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_10btc: utxo_cohort::Vecs::forced_import( _10btc: utxo_cohort::Vecs::forced_import(
@@ -1233,8 +1233,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_100btc: utxo_cohort::Vecs::forced_import( _100btc: utxo_cohort::Vecs::forced_import(
@@ -1245,8 +1245,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_1k_btc: utxo_cohort::Vecs::forced_import( _1k_btc: utxo_cohort::Vecs::forced_import(
@@ -1257,8 +1257,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_10k_btc: utxo_cohort::Vecs::forced_import( _10k_btc: utxo_cohort::Vecs::forced_import(
@@ -1269,8 +1269,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_100k_btc: utxo_cohort::Vecs::forced_import( _100k_btc: utxo_cohort::Vecs::forced_import(
@@ -1281,8 +1281,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
}, },
@@ -1295,8 +1295,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_10sats: utxo_cohort::Vecs::forced_import( _10sats: utxo_cohort::Vecs::forced_import(
@@ -1307,8 +1307,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_100sats: utxo_cohort::Vecs::forced_import( _100sats: utxo_cohort::Vecs::forced_import(
@@ -1319,8 +1319,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_1k_sats: utxo_cohort::Vecs::forced_import( _1k_sats: utxo_cohort::Vecs::forced_import(
@@ -1331,8 +1331,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_10k_sats: utxo_cohort::Vecs::forced_import( _10k_sats: utxo_cohort::Vecs::forced_import(
@@ -1343,8 +1343,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_100k_sats: utxo_cohort::Vecs::forced_import( _100k_sats: utxo_cohort::Vecs::forced_import(
@@ -1355,8 +1355,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_1m_sats: utxo_cohort::Vecs::forced_import( _1m_sats: utxo_cohort::Vecs::forced_import(
@@ -1367,8 +1367,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_10m_sats: utxo_cohort::Vecs::forced_import( _10m_sats: utxo_cohort::Vecs::forced_import(
@@ -1379,8 +1379,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_1btc: utxo_cohort::Vecs::forced_import( _1btc: utxo_cohort::Vecs::forced_import(
@@ -1391,8 +1391,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_10btc: utxo_cohort::Vecs::forced_import( _10btc: utxo_cohort::Vecs::forced_import(
@@ -1403,8 +1403,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_100btc: utxo_cohort::Vecs::forced_import( _100btc: utxo_cohort::Vecs::forced_import(
@@ -1415,8 +1415,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_1k_btc: utxo_cohort::Vecs::forced_import( _1k_btc: utxo_cohort::Vecs::forced_import(
@@ -1427,8 +1427,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
_10k_btc: utxo_cohort::Vecs::forced_import( _10k_btc: utxo_cohort::Vecs::forced_import(
@@ -1439,8 +1439,8 @@ impl Vecs {
indexes, indexes,
price, price,
None, None,
true,
false, false,
true,
false, false,
)?, )?,
}, },

View File

@@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="description" content="Bitcoin with X-ray vision" /> <meta name="description" content="Bitcoin transparency, amplified" />
<meta <meta
name="viewport" name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
@@ -449,7 +449,7 @@
text-transform: uppercase; text-transform: uppercase;
font-size: var(--font-size-xl); font-size: var(--font-size-xl);
line-height: var(--line-height-xl); line-height: var(--line-height-xl);
font-weight: 325; font-weight: 350;
} }
h3 { h3 {
@@ -1745,7 +1745,9 @@
<div class="shadow-bottom"></div> <div class="shadow-bottom"></div>
<div id="resize-bar"></div> <div id="resize-bar"></div>
<nav id="nav" hidden></nav> <nav id="nav" hidden>
<!-- <h4>bitview</h4> -->
</nav>
<search id="search" hidden> <search id="search" hidden>
<header> <header>

View File

@@ -1,7 +1,7 @@
{ {
"name": "Bitcoin Research Kit", "name": "bitview",
"short_name": "₿RK", "short_name": "bitview",
"description": "A better, FOSS, Bitcoin-only, self-hostable Glassnode", "description": "Bitcoin transparency, amplified",
"categories": [ "categories": [
"bitcoin", "bitcoin",
"on-chain", "on-chain",

View File

@@ -113,13 +113,15 @@ export function init({
chartBottomRightCanvas.replaceWith(screenshotButton); chartBottomRightCanvas.replaceWith(screenshotButton);
screenshotButton.addEventListener("click", () => { screenshotButton.addEventListener("click", () => {
packages.modernScreenshot().then(async ({ screenshot }) => { packages.modernScreenshot().then(async ({ screenshot }) => {
elements.body.dataset.screenshot = "true"; charts.dataset.screenshot = "true";
charts.append(domain); charts.append(domain);
seriesTypeField.hidden = true; seriesTypeField.hidden = true;
try {
await screenshot(charts); await screenshot(charts);
} catch {}
charts.removeChild(domain); charts.removeChild(domain);
seriesTypeField.hidden = false; seriesTypeField.hidden = false;
elements.body.dataset.screenshot = "false"; charts.dataset.screenshot = "false";
}); });
}); });
} }

View File

@@ -24,7 +24,6 @@
* "Gigabytes" | * "Gigabytes" |
* "Hash" | * "Hash" |
* "Index" | * "Index" |
* "mb" |
* "percentage" | * "percentage" |
* "Ratio" | * "Ratio" |
* "Sats" | * "Sats" |
@@ -854,7 +853,11 @@ function createUtils() {
} }
if ( if (
(!unit || thoroughUnitCheck) && (!unit || thoroughUnitCheck) &&
(id === "txid" || (id.endsWith("bytes") && !id.endsWith("vbytes"))) (id === "txid" ||
(id.endsWith("bytes") && !id.endsWith("vbytes")) ||
id.endsWith("base_size") ||
id.endsWith("total_size") ||
id.includes("block_size"))
) { ) {
if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`);
unit = "Bytes"; unit = "Bytes";
@@ -863,15 +866,6 @@ function createUtils() {
if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`);
unit = "sd"; unit = "sd";
} }
if (
(!unit || thoroughUnitCheck) &&
(id.endsWith("_size") ||
id.endsWith("_size_sum") ||
id.endsWith("_size_cumulative"))
) {
if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`);
unit = "mb";
}
if ( if (
(!unit || thoroughUnitCheck) && (!unit || thoroughUnitCheck) &&
(id.includes("vsize") || id.includes("vbytes")) (id.includes("vsize") || id.includes("vbytes"))

View File

@@ -1183,7 +1183,7 @@ function createPartialOptions({ env, colors, vecIdToIndexes }) {
*/ */
function createSumSeries({ key, title = "", color }) { function createSumSeries({ key, title = "", color }) {
return /** @satisfies {AnyFetchedSeriesBlueprint} */ ({ return /** @satisfies {AnyFetchedSeriesBlueprint} */ ({
key, key: key in vecIdToIndexes ? key : `${key}_sum`,
title: `Sum ${title}`, title: `Sum ${title}`,
color: color ?? colors.orange, color: color ?? colors.orange,
}); });
@@ -1256,14 +1256,23 @@ function createPartialOptions({ env, colors, vecIdToIndexes }) {
]); ]);
} }
/**
* @param {VecIdAverageBase & CumulativeVecIdBase & VecIdMinBase & VecIdMaxBase & VecId90pBase & VecId75pBase & VecIdMedianBase & VecId25pBase & VecId10pBase} key
*/
function createSumCumulativeMinMaxPercentilesSeries(key) {
return [
...createSumCumulativeSeries({ concat: key }),
...createMinMaxPercentilesSeries({ concat: key }),
];
}
/** /**
* @param {VecIdAverageBase & CumulativeVecIdBase & VecIdMinBase & VecIdMaxBase & VecId90pBase & VecId75pBase & VecIdMedianBase & VecId25pBase & VecId10pBase} key * @param {VecIdAverageBase & CumulativeVecIdBase & VecIdMinBase & VecIdMaxBase & VecId90pBase & VecId75pBase & VecIdMedianBase & VecId25pBase & VecId10pBase} key
*/ */
function createAverageSumCumulativeMinMaxPercentilesSeries(key) { function createAverageSumCumulativeMinMaxPercentilesSeries(key) {
return [ return [
createAverageSeries({ concat: key }), createAverageSeries({ concat: key }),
...createSumCumulativeSeries({ concat: key }), ...createSumCumulativeMinMaxPercentilesSeries(key),
...createMinMaxPercentilesSeries({ concat: key }),
]; ];
} }
@@ -2279,6 +2288,22 @@ function createPartialOptions({ env, colors, vecIdToIndexes }) {
}, },
}, },
}), }),
...(asoprKey in vecIdToIndexes
? [
/** @satisfies {FetchedBaselineSeriesBlueprint} */ ({
type: "Baseline",
key: asoprKey,
title: "adjusted",
colors: [colors.yellow, colors.fuchsia],
defaultActive: false,
options: {
baseValue: {
price: 1,
},
},
}),
]
: []),
/** @satisfies {FetchedBaselineSeriesBlueprint} */ ({ /** @satisfies {FetchedBaselineSeriesBlueprint} */ ({
type: "Baseline", type: "Baseline",
key: `${soprKey}_7d_ema`, key: `${soprKey}_7d_ema`,
@@ -2295,8 +2320,22 @@ function createPartialOptions({ env, colors, vecIdToIndexes }) {
? [ ? [
/** @satisfies {FetchedBaselineSeriesBlueprint} */ ({ /** @satisfies {FetchedBaselineSeriesBlueprint} */ ({
type: "Baseline", type: "Baseline",
key: asoprKey, key: `${asoprKey}_7d_ema`,
title: "adjusted", title: "adj. 7d ema",
colors: [colors.amber, colors.purple],
defaultActive: false,
options: {
baseValue: {
price: 1,
},
},
}),
]
: []),
/** @satisfies {FetchedBaselineSeriesBlueprint} */ ({
type: "Baseline",
key: `${soprKey}_30d_ema`,
title: "30d ema",
colors: [colors.avocado, colors.pink], colors: [colors.avocado, colors.pink],
defaultActive: false, defaultActive: false,
options: { options: {
@@ -2305,11 +2344,13 @@ function createPartialOptions({ env, colors, vecIdToIndexes }) {
}, },
}, },
}), }),
...(asoprKey in vecIdToIndexes
? [
/** @satisfies {FetchedBaselineSeriesBlueprint} */ ({ /** @satisfies {FetchedBaselineSeriesBlueprint} */ ({
type: "Baseline", type: "Baseline",
key: `${asoprKey}_7d_ema`, key: `${asoprKey}_30d_ema`,
title: "adj. 7d ema", title: "adj. 30d ema",
colors: [colors.yellow, colors.fuchsia], colors: [colors.orange, colors.violet],
defaultActive: false, defaultActive: false,
options: { options: {
baseValue: { baseValue: {
@@ -2577,6 +2618,12 @@ function createPartialOptions({ env, colors, vecIdToIndexes }) {
color: colors.red, color: colors.red,
defaultActive: false, defaultActive: false,
}), }),
createBaseSeries({
key: `${fixKey(key)}sell_side_risk_ratio_30d_ema`,
name: "30d ema",
color: colors.rose,
defaultActive: false,
}),
]) ])
: list.flatMap(({ color, name, key }) => [ : list.flatMap(({ color, name, key }) => [
createBaseSeries({ createBaseSeries({
@@ -2613,10 +2660,30 @@ function createPartialOptions({ env, colors, vecIdToIndexes }) {
name: "Negative Loss", name: "Negative Loss",
color: colors.red, color: colors.red,
}), }),
createBaseSeries({
key: `${fixKey(args.key)}unrealized_profit_relative_to_market_cap`,
name: "Profit",
color: colors.green,
}),
createBaseSeries({
key: `${fixKey(args.key)}unrealized_loss_relative_to_market_cap`,
name: "Loss",
color: colors.red,
defaultActive: false,
}),
createBaseSeries({
key: `${fixKey(args.key)}negative_unrealized_loss_relative_to_market_cap`,
name: "Negative Loss",
color: colors.red,
}),
createPriceLine({ createPriceLine({
unit: "USD", unit: "USD",
defaultActive: false, defaultActive: false,
}), }),
createPriceLine({
unit: "%mcap",
defaultActive: false,
}),
], ],
}, },
] ]
@@ -3270,33 +3337,29 @@ function createPartialOptions({ env, colors, vecIdToIndexes }) {
bottom: [ bottom: [
createBaseSeries({ createBaseSeries({
key: "total_size", key: "total_size",
name: "Size", name: "raw",
}),
...createSumCumulativeSeries({
concat: "block_size",
}),
],
},
{
name: "Bytes",
title: "Block Bytes",
bottom: [
createBaseSeries({
key: "weight",
name: "Weight",
}),
...createSumCumulativeSeries({
concat: "block_weight",
common: "weight",
}), }),
createBaseSeries({ createBaseSeries({
key: "vbytes", key: "vbytes",
name: "Vbytes", name: "raw",
}), }),
...createSumCumulativeSeries({ createBaseSeries({
concat: "block_vbytes", key: "weight",
common: "Vbytes", name: "raw",
}), }),
// createBaseSeries({
// key: "weight",
// name: "Weight",
// }),
...createAverageSumCumulativeMinMaxPercentilesSeries(
"block_size",
),
...createAverageSumCumulativeMinMaxPercentilesSeries(
"block_weight",
),
...createAverageSumCumulativeMinMaxPercentilesSeries(
"block_vbytes",
),
], ],
}, },
], ],
@@ -3313,8 +3376,8 @@ function createPartialOptions({ env, colors, vecIdToIndexes }) {
}), }),
}, },
{ {
name: "Bytes", name: "Size",
title: "Transaction Bytes", title: "Transaction Size",
bottom: [ bottom: [
createAverageSeries({ concat: "tx_weight", title: "Weight" }), createAverageSeries({ concat: "tx_weight", title: "Weight" }),
...createMinMaxPercentilesSeries({ ...createMinMaxPercentilesSeries({