Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PLT-214 Refactored the Epoch-StakePoolDelegation indexer to the Marconi
interface. * Rewrote the Epoch-StakePoolDelegation using the marconi-core interface and to make it support rollbacks and resuming. * Computed the LedgerState directly with functions in `ouroboros-network` instead of using `cardano-api` and `cardano-streaming` (allows more fined grained control of what to extract). * Moved orphan instances of EpochStakepoolSize indexer to the Orphans module and added rountrip ToField/FromField tests. * Added LedgerState serialization/deserialization functions in Orphans module.
- Loading branch information
1 parent
ef102f5
commit a069152
Showing
13 changed files
with
1,335 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
marconi-chain-index/performance/monitor-marconi-sync-all.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/env bash | ||
|
||
CURRENT_SCRIPT_PATH=$0 | ||
CURRENT_SCRIPT_BASEPATH=$(dirname "$CURRENT_SCRIPT_PATH") | ||
|
||
monitor_indexer () { | ||
indexer=$1 | ||
network=$2 | ||
|
||
case $network in | ||
mainnet) | ||
networkid="764824073" | ||
echo $networkid | ||
indexers_cli="--disable-datum --disable-script-tx --disable-address-datum --disable-mintburn --disable-epoch-stakepool-size" | ||
;; | ||
preprod) | ||
networkid="1" | ||
echo $networkid | ||
indexers_cli="--disable-datum --disable-script-tx --disable-utxo --disable-address-datum --disable-mintburn" | ||
;; | ||
esac | ||
|
||
echo "Syncing ${indexer} indexer..." | ||
case $indexer in | ||
utxo) | ||
indexers_cli="--disable-datum --disable-script-tx --disable-address-datum --disable-mintburn --disable-epoch-stakepool-size" | ||
;; | ||
addressdatum) | ||
indexers_cli="--disable-datum --disable-script-tx --disable-utxo --disable-mintburn --disable-epoch-stakepool-size" | ||
;; | ||
mintburn) | ||
indexers_cli="--disable-datum --disable-script-tx --disable-utxo --disable-address-datum --disable-epoch-stakepool-size" | ||
;; | ||
epochsdd) | ||
indexers_cli="--disable-datum --disable-script-tx --disable-utxo --disable-address-datum --disable-mintburn" | ||
;; | ||
esac | ||
|
||
cabal build marconi-chain-index | ||
$(cabal exec -- which marconi-chain-index) \ | ||
-s "$HOME"/cardano-node/${network}/cardano-node.socket \ | ||
--testnet-magic ${networkid} \ | ||
${indexers_cli} \ | ||
-d ~/cardano-node/${network}/marconi-chain-index \ | ||
--node-config-path "$HOME"/cardano-node/${network}/${network}-config.json >> "${CURRENT_SCRIPT_BASEPATH}"/marconi-chain-index-"${indexer}".log & | ||
pid=$! | ||
"${CURRENT_SCRIPT_BASEPATH}"/monitor-marconi-sync.sh "${CURRENT_SCRIPT_BASEPATH}"/marconi-chain-index-"${indexer}".log $pid >> >(tee "${CURRENT_SCRIPT_BASEPATH}"/marconi-chain-index-"${indexer}"-monitor.log) | ||
} | ||
|
||
if [[ $1 ]] && [ "$1" == "utxo" ] || [ "$1" == "addressdatum" ] || [ "$1" == "mintburn" ] || [ "$1" == "epochsdd" ]; then indexer=$1; else echo "provide indexer to run: utxo, addressdatum, mintburn or epochsdd (arg0)" && exit 1; fi | ||
if [[ $2 ]] && [ "$2" == "mainnet" ] || [ "$2" == "preprod" ]; then network=$2; else echo "provide network (mainnet, preprod) (arg1)" && exit 1; fi | ||
|
||
monitor_indexer "$indexer" "$network" | ||
|
||
trap 'kill $(jobs -p)' EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.