Bor Mainnet Upgrade: v0.3.3 [Action Required]

Hello All,

We are releasing a new version of Bor - v0.3.3 for Mainnet. This version includes a hardfork named Delhi fork. Please upgrade your mainnet nodes before block number 38,189,056 (https://polygonscan.com/block/countdown/38189056) which is expected to be mined on Tue, 17th Jan 2023 around 6:00 PM UTC.

Prerequisites

The instructions given below assume that you already have bor v0.3.0 installed for the mainnet. If not, please find the announcement mentioning steps for the same here. Once that is installed, please follow the instructions below to upgrade to v0.3.3. Note that this version is an immediate successor of v0.3.0 for Mainnet.

Instructions to Upgrade

  1. Stop bor service

    sudo service bor stop
    
  2. Install Bor with a version tag, network name (mainnet or mumbai), and node type (sentry, validator, or archive).

    # Replace the node type
    curl -L https://raw.githubusercontent.com/maticnetwork/install/main/bor.sh | bash -s -- v0.3.3 mainnet <node_type>
    
  3. Check bor version

    /usr/bin/bor version
    
    # It should print 
    # 0.3.3-stable
    
  4. Restart bor service

    sudo service bor start
    

Important Considerations

We’ve noticed from the feedback received that the many of the node operators are facing sync/peering issues with the latest release and we’d like to point out few considerations which might be possible reasons for the same.

  1. The old cli used different default values for mainnet and mumbai chains and hence the cache which was implicitly used for mainnet was 4096 MB. With new-cli, as there is only one set of default values (at the moment), the cache for mainnet nodes (if not set explicitly) will be set to 1024 MB which will degrade the syncing performance of the node. Hence, we’d recommend using 4096 MB as the cache value if you’re running a mainnet node. To do so, add/update the cache field under cache tag in the config.toml (/var/lib/bor/config.toml) file used to run the node. (If you’re running the node with flags, use --cache flag).

    [cache]
        cache = 4096
    		...
    
  2. The old cli was capable to read and consume the static and trusted nodes files residing in datadir (by name static-nodes.json and trusted-nodes.json respectively). With new-cli, it will only consider these values of static and trusted nodes if they’re provided in the config.toml files. Hence, we’d recommend checking/updating these fields once (if not done already) and move all the values to this config.toml (/var/lib/bor/config.toml) file. This will help the node in connecting to better peers and sync well.

    [p2p]
    		...
        [p2p.discovery]
    				...
            bootnodes = [] # Update the bootnodes here
            static-nodes = [] # Update the static nodes here
            trusted-nodes = [] # Update the trusted nodes here
    

Change log

Hard fork specific changes:

  • Decrease sprint length from 64 to 16
  • Increase baseFeeChangeDenominator from 8 to 16

New-cli:

  • Pruning has been introduced in the new-cli (using the command bor snapshot prune-state). The internal mechanism of pruning will work in the same way as it used to with the previous versions. The command snapshot prune-state will be available as a subcommand of the bor binary and will accept relevant flags (e.g. datadir). More details can be found here.
  • Adds support for a new flag for tweaking the number of tries in memory (—cache.triesinmemory, default: 128) (Make TriesInMemory configurable through CLI and toml config by 0xsharma · Pull Request #552 · maticnetwork/bor · GitHub).
  • Updates and improvements in the description and documentation of the flags in new-cli along with their default values in the help command.

Improvements and feature additions:

Testing and benchmarking

Docker Images

You can find the latest docker images here:

Bor: https://hub.docker.com/r/0xpolygon/bor/tags

Heimdall: https://hub.docker.com/r/0xpolygon/heimdall/tags

Erigon

For upgrading nodes using the Erigon client, please refer Erigon v0.0.5 Release for Mainnet [Action Required].

Thanks,
Polygon Team

2 Likes

cache is already updated to 4096, at least in https://github.com/maticnetwork/bor/releases/download/v0.3.3/bor-mainnet-sentry-config_v0.3.3-amd64.deb

1 Like

That’s right @Gaia , this is mainly for nodes who migrated from an old/outdated config converting to toml config using the script that was shipped as part of v0.3.0.