hirosystems / stacks-blockchain-api

API for the Stacks blockchain
https://stacks-blockchain-api.vercel.app
GNU General Public License v3.0
170 stars 108 forks source link

Improve STX testnet faucet #1945

Closed zone117x closed 2 months ago

zone117x commented 2 months ago

We've ran into the TOO_MUCH_CHAINING issue a few times during congestion, bitcoin re-orgs and block storm.

One approach to improving the faucet is to use something like the send-many stx smart contract, and when new faucet request is made, perform an RBF for any previous faucet send-many contract calls in the mempool.

If we can't depend on the send-many contract to already be deployed, it may be possible to use the same approach except with performing a contract-deploy, assuming it's possible to send stx during contract instantiation.

Another approach could be just spreading out the faucet funds to multiple seed accounts, and adjusting the API code to try sending from all given accounts rather than just the one.

smcclellan commented 2 months ago

Closing as the above PR is solving this issue.