Fantom-foundation / Sonic

go-opera fork for Carmen and Tosca integration
GNU Lesser General Public License v3.0
20 stars 22 forks source link

Comprehensive guide how to sync the sonic #139

Closed m-e-m-f-i-s-19 closed 4 months ago

m-e-m-f-i-s-19 commented 5 months ago

I used full mpt genesis file: https://download.fantom.network/mainnet-109331-full-mpt.g and it took several days to read it and import to carmen but now it has to sync 2 years period. Is this how it supposed to work? Could you please confirm that or update documentation about how to setup sonic node.

Could you please, update the documentation how to start sonic node correctly. Also would be nice to have updated snapshot.

janzhanal commented 5 months ago

I did try to run from snapshot from https://snapshot-trace.fantom.network/files/sonic/snapshot-27-May-2024-04-29/ and failed with

failed to initialize the node: failed to make consensus engine: failed to open EvmStore: starting node with enabled archive (rpc mode), but the archive database does exists - terminated to avoid creating an inconsistent archive database (re-apply genesis and resync the node to switch to archive configuration)

so I would also appreciate a bit of docu to start the node...

Sleapy31 commented 5 months ago

All effort is put on shilling random numbers on twitter instead of facilitate node syncing

thaarok commented 4 months ago

Sonic use a different format for genesis files - they are now available to download from https://download.fantom.network/ - use the "Sonic Genesis Files".

Legacy genesis file can be used as a fallback, but only the full-mpt version - I don't recommend. Updating the documentation is in progress.

janzhanal commented 4 months ago

Hello @thaarok, thank you for your point unfortunately it does not work:

root@ovh-us-hi-26:/go# sonictool --cache 64226 --datadir=/data genesis /data/mainnet-285300-archive.g
genesis file check failed: genesis file doesn't refer to any trusted preset
root@ovh-us-hi-26:/go# sonictool --cache 64226 --datadir=/data genesis /data/mainnet-5577-archive.g 
genesis file check failed: genesis file doesn't refer to any trusted preset
thaarok commented 4 months ago

@janzhanal please use up-to-date Sonic client version 1.2.1-c

janzhanal commented 4 months ago

yes, that helped, thank you