Skip to content

Latest commit

 

History

History

protected-event-distribution

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Engine to generate protected event Settlements

Usage

1. Gathering input data

# Download input files from Google Storage
epoch=652
bucket=marinade-validator-bonds-mainnet
# generated by @marinade-finance/validator-bonds > snapshot-parser-cli
gcloud storage cp "gs://$bucket/$epoch/validators.json" "validators.json"
gcloud storage cp "gs://$bucket/$epoch/stakes.json" "stakes.json"
# generated by @marinade-finance/ds-sam > analyze-revenues
gcloud storage cp "gs://$bucket/$epoch/evaluation.json" "evaluation.json"

2. Generating protected events

# Setup whitelisting (check .buildkite/prepare-claims.yml)
# native stake authority, liquid stake authority, and the exit native staker authority
export WHITELIST_STAKE_AUTHORITY="stWirqFCf2Uts1JBL1Jsd3r6VBWhgnpdPxCTe1MFjrq,4bZ6o3eUUNXhKuqjdCnCoPAoLgWiuLYixKaxoa8PpiKk,ex9CfkBZZd6Nv9XdnoDmmB45ymbu4arXVk7g5pWnt3N"

# TODO: fix arguments based on the changes happened in the code
# Build & run
cargo run --release --bin protected-event-distribution-cli -- \
    --settlement-config settlement-config.yaml \
    --validator-meta-collection "./validators.json" \
    --stake-meta-collection "./stakes.json" \
    --revenue-expectation-collection "./evaluation.json" \
    --output-protected-event-collection "./protected-event.json" \
    --output-settlement-collection "./protected-event-settlements.json" \
    --output-merkle-tree-collection "./protected-event-merkle-trees.json"