Cleanup IPFS and Oracle Entries
Sometimes IPFS or Oracle entries are not evicted from a developer’s contract due to the DSP experiencing unpredictable behavior. This causes the developer’s smart contract RAM supply to increase as the ipfsentry
/ oracleentry
table rows are not evicted. If this happens, you may run the cleanup.js file with the following environment variables:
The cleanup script will auto detect which table to cleanup ipfsentry
or oracleentry
depending on which one is present on the contract. If both are set, you can use the TABLE
env variable to specify which to cleanup.
Mandatory:
CONTRACT
contract to clean IPFS / oracle entriesDSP_ENDPOINT
the DSP’s endpoint that you staked to for IPFS and/or Oracle servicesTABLE
specify table name to be cleaed: (ipfs (vRAM) table:ipfsentry
or oracle table:oracleentry
)DSP_ALLOW_API_NON_BROADCAST
enables the/event
DSP API endpoint to accept non-blocking service events such as xcommits.
Sidechain:
If cleaning an account on a sidechain, must add the following environment variables.
SIDECHAIN
if using a sidechain, must specify sidechain name (sidechain names can be found here)SIDECHAIN_DSP_PORT
if using a sidechain, must specify sidechain DSP’s portDSP_LIQUIDX_CONTRACT
the liquidx contract name must be setliquidx.dsp
on mainnet if cleaning a sidechainNODEOS_MAINNET_ENDPOINT
set mainnet nodeos endpoint
Optional:
CHUNK_SIZE
represents the number of async requests for cleanups to send to the DSP at a time
Then run with:
Last updated