spacemeshos / go-spacemesh

Go Implementation of the Spacemesh protocol full node. 💾⏰💪
https://spacemesh.io
MIT License
752 stars 211 forks source link

Server: failed to encode batch id #5330

Closed zhangxf55 closed 11 months ago

zhangxf55 commented 11 months ago

Description

Environments:

  1. go-spacemesh: v1.2.5+266ea931c3b4f97d352ab4c3e0c3e53f003c7760
  2. os: ubuntu 22.04
  3. go: go version go1.21.4 linux/amd64

Steps to reproduce

  1. using postcli to generate postdata:
    nohup /root/postcli/postcli -provider 0 -commitmentAtxId fbcb70441d90cb36c1f6e973d1f5fd373b2ce0c893d387bd36ea76f0c8555c94 -labelsPerUnit 4294967296 -maxFileSize 2147483648 -numUnits 88 -datadir /data &
  2. execute go-spacemesh to smesh:
    /root/go-spacemesh/go-spacemesh --listen /ip4/0.0.0.0/tcp/7513 --config /root/smesher/config.json -d /data/chain --smeshing-coinbase sm1***********vzs --smeshing-start --smeshing-opts-datadir /data
  3. content of config.json
    {
    "main": {
        "layer-duration": "5m",
        "layers-per-epoch": 4032,
        "poet-server": [
                "https://mainnet-poet-0.spacemesh.network",
                "https://mainnet-poet-1.spacemesh.network",
                "https://mainnet-poet-2.spacemesh.network",
                "https://poet-110.spacemesh.network",
                "https://poet-111.spacemesh.network",
                "https://poet-112.spacemesh.network"
        ]
    },
    "post": {
        "post-labels-per-unit": 4294967296,
        "post-max-numunits": 1048576
    },
    "poet": {
        "cycle-gap": "12h"
    },
    "genesis": {
        "genesis-time": "2023-07-14T08:00:00Z",
        "genesis-extra-data": "00000000000000000001a6bc150307b5c1998045752b3c87eccf3c013036f3cc",
        "accounts": {
            "sm1qqqqqqylyl2l0zsmmax0wnutt4dwnrkcwef5eeq3xladz": 2743200000000000,
            "sm1qqqqqqyp8ueuuh2dgrc2g6ps4xvueyjpky6rfaqnxdy97": 5867100000000000,
            "sm1qqqqqqzgmt5vv4jgucas8vvrlu4daa4r29cunwqpv0trt": 1022800000000000,
            "sm1qqqqqq80we5pmwztmqgpxu6xasapgn65r4xjczqxu39a2": 409000000000000,
            "sm1qqqqqqy6anfdew2sdtvuuaffjy0l7ssu9r8vjsss5c442": 2045400000000000,
            "sm1qqqqqqyw9lvmmayckrxlnf8u7850tsjdg8zz6dg956gxg": 270600000000000,
            "sm1qqqqqq9a8g5act6ewmmmmmux8l570kr6l68htzsq94wg4": 4090900000000000,
            "sm1qqqqqqrgqc65x5q6exujgjs970fvcakd790na3gsr3uu7": 333300000000000,
            "sm1qqqqqqpc4ppx8s4gmdaa5tzg35s6l3v6ujg6hmqz3s4lc": 859100000000000,
            "sm1qqqqqq8za0geafhj4avegdwhtaw9fmgjh07s55cufk695": 293300000000000,
            "sm1qqqqqqpf6djx3axy7aag8zhyf84ljsulhfypfxgpw5y0u": 1990600000000000,
            "sm1qqqqqq827v998nt99vupxlrfucdk0tapp2hjyygmn3kyd": 409100000000000,
            "sm1qqqqqqpc55ghjq6sxf5k77yc8n82fkwhlj0jedcgw2zck": 4909100000000000,
            "sm1qqqqqqxq54zvz484hhcnrghnqrjlw26twwld32slz3lxa": 191800000000000,
            "sm1qqqqqqyf5uc2n8mutm3tuateu5efcm9awvrclmcm5mhdf": 2933540000000000,
            "sm1qqqqqq99klpy92mwlfcft5lmz8q5sef2v2qvtucd9y55v": 2933540000000000,
            "sm1qqqqqqyjpjgup8fz32cufcv2nlqrr3nyvge7akqt0daea": 2933540000000000,
            "sm1qqqqqq8zukfwtggnfq4jaqpv6m8xgtg5ay2ezaqpr2w6y": 2933540000000000,
            "sm1qqqqqqrhftrq9knsetema7dt0qfzgd5a20m9rcczk0gk5": 2933540000000000,
            "sm1qqqqqqyfq5f522mmrzs4lczhaf30jh4pmqyfrzcg8vrpc": 3303792000000000,
            "sm1qqqqqqx55z5795569fq5kym3gw2h6zp6ajeh46c5wtrzf": 455300000000000,
            "sm1qqqqqqyvet26gqsxjt6w50nnp80jvajr3n25xzsdpxn65": 831250000000000,
            "sm1qqqqqqzgqpjxdw77aw74f8mz540rykda4x2jgjgaca7z5": 184375000000000,
            "sm1qqqqqq9s5l9tc87wspycr68dfagmzxplzdn7zlcymnkup": 15000000000000,
            "sm1qqqqqqptx3mdg4gm67arv4ykau6nfy6w9v03x9s49wmru": 100000000000000,
            "sm1qqqqqq9fwfymdr7qv0tfc3ppa4q8ara6qm7kwugw9gdme": 500000000000000,
            "sm1qqqqqqy3fc8nvdetan6qjz5cju7h4c60mjyvdlqnlqpxu": 15688500000000000,
            "sm1qqqqqqrt64knhuxu3kzq50ak04nrkk9yf2zxprshmvkcy": 88818783000000000
        }
    },
    "api": {
        "grpc-public-services": [
                "debug",
                "global",
                "mesh",
                "node",
                "transaction",
                "activation"
        ],
        "grpc-public-listener": "0.0.0.0:9092",
        "grpc-private-services": [
                "smesher",
                "admin"
        ],
        "grpc-private-listener": "127.0.0.1:9093",
        "grpc-json-listener": "0.0.0.0:9094"
    },
    "p2p": {
        "disable-reuseport": false,
        "p2p-disable-legacy-discovery": true,
        "autoscale-peers": true,
        "bootnodes": [
                "/dns4/mainnet-bootnode-0.spacemesh.network/tcp/5000/p2p/12D3KooWPStnitMbLyWAGr32gHmPr538mT658Thp6zTUujZt3LRf",
                "/dns4/mainnet-bootnode-2.spacemesh.network/tcp/5000/p2p/12D3KooWAsMgXLpyGdsRNjHBF3FaXwnXhyMEqWQYBXUpvCHNzFNK",
                "/dns4/mainnet-bootnode-4.spacemesh.network/tcp/5000/p2p/12D3KooWRcTWDHzptnhJn5h6CtwnokzzMaDLcXv6oM9CxQEXd5FL",
                "/dns4/mainnet-bootnode-6.spacemesh.network/tcp/5000/p2p/12D3KooWRS47KAs3ZLkBtE2AqjJCwxRYqZKmyLkvombJJdrca8Hz",
                "/dns4/mainnet-bootnode-8.spacemesh.network/tcp/5000/p2p/12D3KooWFYv99aGbtXnZQy6UZxyf72NpkWJp3K4HS8Py35WhKtzE",
                "/dns4/mainnet-bootnode-10.spacemesh.network/tcp/5000/p2p/12D3KooWHK5m83sNj2eNMJMGAngcS9gBja27ho83t79Q2CD4iRjQ",
                "/dns4/mainnet-bootnode-12.spacemesh.network/tcp/5000/p2p/12D3KooWG4gk8GtMsAjYxHtbNC7oEoBTMRLbLDpKgSQMQkYBFRsw",
                "/dns4/mainnet-bootnode-14.spacemesh.network/tcp/5000/p2p/12D3KooWRkZMjGNrQfRyeKQC9U58cUwAfyQMtjNsupixkBFag8AY",
                "/dns4/mainnet-bootnode-16.spacemesh.network/tcp/5000/p2p/12D3KooWDAFRuFrMNgVQMDy8cgD71GLtPyYyfQzFxMZr2yUBgjHK",
                "/dns4/mainnet-bootnode-18.spacemesh.network/tcp/5000/p2p/12D3KooWMJmdfwxDctuGGoTYJD8Wj9jubQBbPfrgrzzXaQ1RTKE6"],
        "min-peers": 20,
        "low-peers": 50,
        "high-peers": 50,
        "inbound-fraction": 1,
        "outbound-fraction": 0.5
    },
    "logging": {
        "p2p": "error"
    },
    "cache": {
        "atx-size": 300000
    },
    "smeshing": {
        "smeshing-opts": {
                "smeshing-opts-maxfilesize": 2147483648,
                "smeshing-opts-provider": 4294967295,
                "smeshing-opts-numunits": 56
        },
        "smeshing-proving-opts": {
                "smeshing-opts-proving-nonces": 288,
                "smeshing-opts-proving-threads": 4
        }
    }
    }

Actual Behavior

  1. go-spacemesh FATAL error log:
    serve: failed to serialize epoch atx    {"node_id": "0816ff62d4ee7fc1e9ca22eb52776394a9327d0c69d646635f7a81ed0b0651dd", "module": "fetcher", "requestId": "bedf11b9-13b8-4146-9b91-c8029426c305", "epoch_id": 9, "errmsg": "too many elements to encode in collection with scale limit set: 100000", "name": "fetcher"}
pigmej commented 11 months ago

Yes, you need to update to 1.2.6+. 1.2.5 is no longer supported because of more than 100k ATX per epoch.