Resurrect onchain Solana programs by reconstructing historical binaries from upgrade buffer writes, even after they have been upgraded.
This CLI currently depends on Helius and its enhanced-transactions endpoint to fetch program buffer writes. Pull requests are welcome if you'd like to add alternative providers.
- cp .env.sample .env
- Edit .env to set your Helius
HELIUS_API_KEY cargo build --release
Reconstruct and store historical program binaries for slots >= a given slot:
./target/release/gg-program-resurrect resurrect --program 9H6tua7jkLhdm3w8BvgpTn5LZNU7g4ZynDmCiNN3q6Rp --slot 375000000
./target/release/gg-program-resurrect resurrect --program TessVdML9pBGgG9yGks7o4HewRaXVAMuoVj4x83GLQH --slot 375000000 --max-rps 32$ cd historical/TessVdML9pBGgG9yGks7o4HewRaXVAMuoVj4x83GLQH && for f in $(ls *.so); do shasum -a 256 $f; done
33d36548b6989a05fa65b9a18dab4c654ea54777d9217972e7bfde22f764b50c 376562263.so
807f15e08f3c41dccebdfcc052ee4d30b28f8b42e60883fa5d5c0b8efb60c5bd 381100308.so
08cb128934b999334da955a23447b924f7d4d904c086e9456f6d14854d57b4ce 382406315.so
e5a8ba9d4d886cdadc74a00dd6b4de41929af779916c2e01fea0d59ae62d7e7c 382628780.so
30819bd2e468f369708e84f632ad74a30a6fc901a0db2d8a403b75cd6afec629 391901181.soOutputs are stored under historical/<PROGRAM>/<SLOT>.so. If a slot file already exists, it will be skipped.
MIT.
This code is being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the code. It has not been audited and as such there can be no assurance it will work as intended, and users may experience delays, failures, errors, omissions or loss of transmitted information. Nothing in this repo should be construed as investment advice or legal advice for any particular facts or circumstances and is not meant to replace competent counsel. It is strongly advised for you to contact a reputable attorney in your jurisdiction for any questions or concerns with respect thereto. Author is not liable for any use of the foregoing, and users should proceed with caution and use at their own risk.