Hello Everyone,
We are planning on sunsetting support for Erigon (GitHub0xpolygon/erigon) on the Polygon PoS network by 1st August.
For users that need to run a full archive node, our recommendation is to do this via Bor w/ PBSS which has a similar efficient data storage footprint.
In order to bootstrap syncing a full archive node, you may wish to use a recent snapshot which is available from Stakepool at:
https://docs.stakepool.dev.br/polygon/snapshots/polygon
We will be adding additional snapshot providers shortly.
Below mentioned is config.toml to start a mainnet node.
chain = "mainnet"
datadir = "/var/lib/bor/data"
"db.engine" = "pebble"
"state.scheme" = "path"
syncmode = "full"
gcmode = "archive"
snapshot = true
[history] # For historical data retention related flags
transactions = 0 # Number of recent blocks to maintain transactions index for (default = about 2 months, 0 = entire chain)
logs = 0 # Number of recent blocks to maintain log search index for (default = about 2 months, 0 = entire chain)
"logs.disable" = false # Do not maintain log search index
state = 0 # Number of recent blocks to retain state history for, only relevant in state.scheme=path (default = 90,000 blocks, 0 = entire chain)
[p2p]
maxpeers = 800
port = 30303
maxpendpeers = 500
[p2p.discovery]
bootnodes = [ "enode://48e6326841ce106f6b4e229a1be7e98a1d12be57e328b08cb461f6744ae4e78f5ec2340996ce9b40928a1a90137aadea13e25ca34774b52a3600d13a52c5c7bb@34.185.209.56:30303", "enode://8ab6905fe76aa9001adb77135250e918db888cac216870c0e95cf26650d83d31d8c2c93d54c3333e0a2196517c41651d174b743ec3e11f44e595f62b77fec7ba@34.185.162.14:30303", "enode://02e0b33cf60fb1f88f853c7c04830156151f4acd1c36173cd3fe1f375801fb4f5be5b3a89c98527915d37ed217752933c3faf4c820df740c9dd681294caebcf6@34.179.171.228:30303", "enode://079c387b65b09674825462ea63c528ca996af7b03d19b1b2ab6557347434838067db6dd7ae5e0c2e08d5ba164117f3d7faffbf3e890cb91cffbdf45a433ddfce@35.246.166.189:30303", "enode://191d06720948ae0119343e5798098f5b1f95a308174c4119d226da91833bc0176009bcc8bf5012e490500562d4d5b5427c307b01f3485b2e8351ac5afd946864@34.142.28.190:30303", "enode://30a4651b245e9a0cec674b9ecb5a06ca01553aa727e14a77d0f1ccdb9e48a975f3be631505f417aae438be545ac3b290cd3ed00bef96efd7fb0fb7f916397b3f@34.39.56.114:30303", "enode://b950b98b92e118551d79c7280b97ddfcdf3dacb620367ebd45e8382f8e69390df192055386221025ffd3c03912da2aadf668ae6ea7b35f391d82ef87452b3f02@34.147.169.102:30303", "enode://92ef18168f6c281a313d0ca76d6122b913a101352b5069af9cea6c8dd0f8b51d669601d59fdf250e972cf9a547d8a10f21ecf5b99ce8511605f328e5f66e845f@34.105.180.11:30303" ]
static-nodes = []
trusted-nodes = []
dns = [ "enrtree://AKUEZKN7PSKVNR65FZDHECMKOJQSGPARGTPPBI7WS2VUL4EGR6XPC@pos.polygon-peers.io" ]
[heimdall]
ws-address = "ws://localhost:26657/websocket"
# url = "http://localhost:1317"
# "bor.without" = false
# grpc-address = ""
[txpool]
nolocals = true
pricelimit = 25000000000
accountslots = 256
globalslots = 65536
accountqueue = 256
globalqueue = 65536
lifetime = "1h30m0s"
[jsonrpc]
ipcpath = "/var/lib/bor/bor.ipc"
[jsonrpc.http]
enabled = true
port = 8545
host = "0.0.0.0"
api = ["eth", "net", "web3", "txpool", "bor", "debug", "trace"]
vhosts = ["*"]
corsdomain = ["*"]
# prefix = ""
# ep-size = 40
# ep-requesttimeout = "0s"
[jsonrpc.ws]
enabled = true
port = 8546
# prefix = ""
# host = "localhost"
# api = ["web3", "net"]
origins = ["*"]
# ep-size = 40
# ep-requesttimeout = "0s"
[telemetry]
metrics = true
[cache]
cache = 24576
gc = 0
gomemlimit = "55GB"
snapshot = 25
database = 45
trie = 25
# database = 50
# trie = 30
# noprefetch = false
# preimages = false
# txlookuplimit = 2350000
# blocklogs = 32
# timeout = "1h0m0s"
# fdlimit = 0
The history block in the config contains data retention flags related to transactions, logs and specifically state. The history.state = 0 is a key flag which stores whole state till genesis. The flag can be set to a number N if you want to retain only limited number of recent states.
Note that bor doesn’t have trie node retention yet which means historical eth_getProof requests aren’t served as of now. Only requests for latest 128 blocks is served.
Please let us know if you have any questions! Also feel free to create support ticket for any assistance
Thanks,
Polygon Labs