spin up some kind of pipeline that will index all of the sweep for Stakehouse validators and produce a sum of accurate earnings
- base on thisDocumentation we can create simple query in graphql for getting all public keys.
{
stakehouseAccounts(first:1000,skip:0) {
id
}
}
we can loop use this query until the result is empty.
-
After we get the public keys. we can use this api for getting validators information.
-
next base on this Documentation. we can use this formula
total_eth_obtained = 32 - current_balance (in ETH)
![Screenshot 2023-07-16 at 18 05 55](https://private-user-images.githubusercontent.com/26897306/253800257-277a4af2-65af-409b-a54a-bfd53c55d4f9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyNjQ4NDIsIm5iZiI6MTcyMTI2NDU0MiwicGF0aCI6Ii8yNjg5NzMwNi8yNTM4MDAyNTctMjc3YTRhZjItNjVhZi00MDliLWE1NGEtYmZkNTNjNTVkNGY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE4VDAxMDIyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMxMDcyZjU0ZjY2MWI2ZWY1NWNhNGU5MTZjZDgxMmYxMmY0ZGYzOTE1NzMyNGRiZTFhMjA3MjY1Y2Y3MzI0MTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.oX8iBsso4_5CTTMsA89L7dd3X7ymsBCujvekYU6_rX4)
I use rust because currently i'm learning this language since one week ago. the resut example already saved in data
folders
- install rust with following this instruction
- Download this repo
- enter this repo through terminal/command prompt
- run
cargo build
- run
./target/debug/bswp-pipeline --help
for seing the detailsblockswap simple pipeline Usage: bswp-pipeline [OPTIONS] Options: -s, --start-page <START_PAGE> first batch pub keys data [default: 0] -e, --end-page <END_PAGE> end batch pub keys data [default: 0] -h, --help Print help -V, --version Print version
Currently because the access to sss still free plan so we can use multi threading for process the datas