Skip to content

Instantly share code, notes, and snippets.

@guilledk
Created May 9, 2024 13:49
Show Gist options
  • Select an option

  • Save guilledk/7245e53b50851327b6dd5e8abfe1f63c to your computer and use it in GitHub Desktop.

Select an option

Save guilledk/7245e53b50851327b6dd5e8abfe1f63c to your computer and use it in GitHub Desktop.

Translator start settings

Translator consumes nodeos state history and stores evm info in elasticsearch.

A note about index naming

Translator will name elastic indexes acording to two settings chainName and depending on what data is to be stored, a suffix from elastic.subfix (yes there is a typo on the config setting name), so for example:

chainName: telos-mainnet

"subfix": {
    "delta": "delta-v1.5",
    "transaction": "action-v1.5",
    "error": "error-v1.5",
    "fork": "fork-v1.5"
}

Then:

  • evm block data index name will be: telos-mainnet-delta-v1.5-XXXXXXXX
  • evm tx data index name will be: telos-mainnet-action-v1.5-XXXXXXXX
  • error data index name will be: telos-mainnet-error-v1.5-XXXXXXXX (you should not see any docs on this index unless something went wrong)
  • native fork handling data will be: telos-mainnet-fork-v1.5-XXXXXXXX

IMPORTANT!

If index naming config of telos-evm-rpc service does not match index naming on elastic, rpc wont find any blocks!

startBlock

Telos zero block (native not evm) number to start from, if data is found in elastic translator will default to start from last block on db.

IMPORTANT!

Nodeos to consume from must contain state history data about startBlock - 1 (for starting from genesis).

evmPrevHash

Only required when starting from no data on database but from a block after genesis (on genesis defaults to zero hash), translator needs a hash to use as the parent hash to the first evm block its gonna generate.

evmValidateHash

Sanity check setting, translator will fail if first evm block generated hash a diferent hash than evmValidateHash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment