Menu

#3958 Catchup hash mismatch (Version: v20.0.0-rc2)

open
nobody
bug (31)
2023-10-11
2023-10-04
Anonymous
No

Originally created by: leighmcculloch
Originally owned by: dmkozh

Issue Description

Running stellar-core normally connected to testnet results in periodic "Catchup material failed verification - hash mismatch" errors.

Steps to Reproduce

Unknown at this time. This has occurred three times when running stellar-core in the quickstart image connected to the testnet network as a watcher node.

docker run --name stellar -p 8000:8000 stellar/quickstart:testing --testnet --enable-soroban-rpc

No other action has been required to my knowledge.

Your Environment and Setup

stellar-core Version

$ stellar-core version
Warning: soroban-env-host-curr is running a pre-release version 20.0.0-rc1
v20.0.0rc2
rust version: rustc 1.72.1 (d5c2e9c34 2023-09-13)
soroban-env-host: 
    curr:
        package version: 20.0.0-rc1
        git version: f19ef13363a1e0cbff7b100c0599a1d63dea88a6
        ledger protocol version: 20
        pre-release version: 57
        rs-stellar-xdr:
            package version: 20.0.0-rc1
            git version: d5ce0c9e7aa83461773a6e81662067f35d39e4c1
            base XDR git version: 9ac02641139e6717924fdad716f6e958d0168491

Environment

  • Operation System & Version (You can usually obtain from uname -a)

console $ uname -a Linux 781545c4c81d 6.3.13-linuxkit [#1] SMP PREEMPT Thu Sep 7 07:48:47 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

  • Are you running from the command line? From a container?

Both. Command line inside a container running inside a VM managed by Docker for Mac on an Apple Silicon M2 Mac.

  • Did you pass in special parameters when building the app?

The stellar/quickstart:testing image has stellar-core compiled with the --disable-tests option.

  • Please add any additional relevant configuration related to this bug report.

The stellar/quickstart:testing image is a multi-platform image and when this issue occurred I was running it using the linux/arm64 platform image. To run specifically that image you can pass to docker --platform linux/arm64 or if using a container runtime that doesn't support specifying the platform the same image is available as a single-platform image under the name stellar/quickstart:testing-arm64.

Supporting Files

  • Configuration files

The configuration file template used for testnet in quickstart is here:
https://github.com/stellar/quickstart/blob/140ee88feb0d265120255827f0e2e1dae04d6da5/testnet/core/etc/stellar-core.cfg#L3

Once the template is fully rendered it is:
```toml
HTTP_PORT=11626
PUBLIC_HTTP_PORT=true
LOG_FILE_PATH=""
MANUAL_CLOSE=false

NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
KNOWN_CURSORS=["HORIZON"]
DATABASE="postgresql://dbname=core host=localhost user=stellar password=..."
CATCHUP_RECENT=100

UNSAFE_QUORUM=true
FAILURE_SAFETY=1

[[HOME_DOMAINS]]
HOME_DOMAIN="testnet.stellar.org"
QUALITY="HIGH"

[[VALIDATORS]]
NAME="sdf_testnet_1"
HOME_DOMAIN="testnet.stellar.org"
PUBLIC_KEY="GDKXE2OZMJIPOSLNA6N6F2BVCI3O777I2OOC4BV7VOYUEHYX7RTRYA7Y"
ADDRESS="core-testnet1.stellar.org"
HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_001/{0} -o {1}"

[[VALIDATORS]]
NAME="sdf_testnet_2"
HOME_DOMAIN="testnet.stellar.org"
PUBLIC_KEY="GCUCJTIYXSOXKBSNFGNFWW5MUQ54HKRPGJUTQFJ5RQXZXNOLNXYDHRAP"
ADDRESS="core-testnet2.stellar.org"
HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_002/{0} -o {1}"

[[VALIDATORS]]
NAME="sdf_testnet_3"
HOME_DOMAIN="testnet.stellar.org"
PUBLIC_KEY="GC2V2EFSXN6SQTWVYA5EPJPBWWIMSD2XQNKUOHGEKB535AQE2I6IXV2Z"
ADDRESS="core-testnet3.stellar.org"
HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_003/{0} -o {1}"
```

  • Log files

2023-09-20T21:36:16.487 GDHDX [History ERROR] Catchup material failed verification - hash mismatch, propagating failure 2023-09-20T21:36:16.487 GDHDX [History ERROR] One or more of history archives may be corrupted. Update HISTORY configuration entry to only contain valid ones

Full log of stellar-core stderr output is attached: full-log-2023-09-20.txt (github.com).

  • Status – the status of stellar-core on its info endpoint was cycling on these:

Catching up; Catching up to ledger 1619071: downloading ledger files 1/1 (100%) Catching up; Catching up to ledger 1619071: Failed: download-verify-ledgers-seq Catching up; Catching up to ledger 1619071: Succeeded: batch-download-ledger-0018b47f-0018b4bf : 1/1 children completed Catching up; Catching up to ledger 1619071: Succeeded: batch-download-ledger-0018b47f-0018b4bf : 2/2 children completed Catching up; Catching up to ledger 1619071: Succeeded: batch-download-ledger-0018b47f-0018b4bf : 3/3 children completed Catching up; Catching up to ledger 1619071: Succeeded: batch-download-ledger-0018b47f-0018b4bf : 4/4 children completed Catching up; Catching up to ledger 1619071: Succeeded: batch-download-ledger-0018b47f-0018b4bf : 5/5 children completed

Discussions

There has been some offline discussion on Slack about this issue:

Related

Tickets: #3965
Tickets: #3977

Discussion

  • Anonymous

    Anonymous - 2023-10-04

    Originally posted by: leighmcculloch

    The same issue occurred again for me on October 2nd, although I failed to capture which ledger.

     
  • Anonymous

    Anonymous - 2023-10-04

    Originally posted by: leighmcculloch

    The same issue occurred again for me on October 3rd, when attempting to catchup ledger 1834623. I saw the following status on the info endpoint:

    Catching up; Catching up to ledger 1834623: Failed: download-verify-ledgers-seq
    
     
  • Anonymous

    Anonymous - 2023-10-04

    Originally posted by: MonsieurNicolas

    I ran into this as well. Similar config just with bucketsdb enabled (so faster to repro), and on Windows.

    Similar situation, where the node replayed a few ledgers from archive, then crashed replaying buffered ledgers:
    stellar-testnet-bdb - corrupt.log (github.com)

    All I did was run new-db followed by run.

    This does not seem to happen all the time, and does not happen when replaying the exact same range using offline catchup. This may indicate that somehow the txset gets borked by catchup?

     
  • Anonymous

    Anonymous - 2023-10-05

    Originally posted by: MonsieurNicolas

    OK I could repro it some other time, and could capture data on both a "good" (replaying from history) and a "bad" (from consensus).
    I got a divergence on ledger 1850632 that I could narrow down to the last transaction applied, in the way fees got applied before even applying the transaction (9461a5cd2a008d5d82d686c6df65658e4c070f366b96431ec205783670217a89).

    Transaction is

    {
        "TransactionEnvelope": {
            "type": "ENVELOPE_TYPE_TX",
            "v1": {
                "tx": {
                    "sourceAccount": "GDFVUKYAUWPLYJPX3ARBX3OTJ7QTAKPDBTN4ZOM6XN73TKZBGBAXKUKI",
                    "fee": 11039742,
                    "seqNum": 7231384896670557,
                    "cond": {
                        "type": "PRECOND_V2",
                        "v2": {
                            "timeBounds": {
                                "minTime": 0,
                                "maxTime": 0
                            },
                            "ledgerBounds": null,
                            "minSeqNum": 0,
                            "minSeqAge": 0,
                            "minSeqLedgerGap": 0,
                            "extraSigners": []
                        }
                    },
                    "memo": {
                        "type": "MEMO_NONE"
                    },
                    "operations": [
                        {
                            "sourceAccount": null,
                            "body": {
                                "type": "INVOKE_HOST_FUNCTION",
                                "invokeHostFunctionOp": {
                                    "hostFunction": {
                                        "type": "HOST_FUNCTION_TYPE_INVOKE_CONTRACT",
                                        "invokeContract": {
                                            "contractAddress": {
                                                "type": "SC_ADDRESS_TYPE_CONTRACT",
                                                "contractId": "efed63cd4a96519d184afcf3088315fd89405d49fd0bd1496d85ba5435afe4f1"
                                            },
                                            "functionName": "set_price",
                                            "args": [
                                                {
                                                    "type": "SCV_ADDRESS",
                                                    "address": {
                                                        "type": "SC_ADDRESS_TYPE_ACCOUNT",
                                                        "accountId": "GDFVUKYAUWPLYJPX3ARBX3OTJ7QTAKPDBTN4ZOM6XN73TKZBGBAXKUKI"
                                                    }
                                                },
                                                {
                                                    "type": "SCV_VEC",
                                                    "vec": [
                                                        {
                                                            "type": "SCV_I128",
                                                            "i128": {
                                                                "hi": 0,
                                                                "lo": 155383359693576
                                                            }
                                                        },
                                                        {
                                                            "type": "SCV_I128",
                                                            "i128": {
                                                                "hi": 0,
                                                                "lo": 492624913447783
                                                            }
                                                        },
                                                        {
                                                            "type": "SCV_I128",
                                                            "i128": {
                                                                "hi": 0,
                                                                "lo": 134721619395826
                                                            }
                                                        },
                                                        {
                                                            "type": "SCV_I128",
                                                            "i128": {
                                                                "hi": 0,
                                                                "lo": 93618481334069
                                                            }
                                                        },
                                                        {
                                                            "type": "SCV_I128",
                                                            "i128": {
                                                                "hi": 0,
                                                                "lo": 81743603005931
                                                            }
                                                        },
                                                        {
                                                            "type": "SCV_I128",
                                                            "i128": {
                                                                "hi": 0,
                                                                "lo": 14783492239079824
                                                            }
                                                        },
                                                        {
                                                            "type": "SCV_I128",
                                                            "i128": {
                                                                "hi": 0,
                                                                "lo": 132899060256543527
                                                            }
                                                        },
                                                        {
                                                            "type": "SCV_I128",
                                                            "i128": {
                                                                "hi": 0,
                                                                "lo": 90341423159922
                                                            }
                                                        }
                                                    ]
                                                },
                                                {
                                                    "type": "SCV_U64",
                                                    "u64": 1696462500000
                                                }
                                            ]
                                        }
                                    },
                                    "auth": [
                                        {
                                            "credentials": {
                                                "type": "SOROBAN_CREDENTIALS_SOURCE_ACCOUNT"
                                            },
                                            "rootInvocation": {
                                                "function": {
                                                    "type": "SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN",
                                                    "contractFn": {
                                                        "contractAddress": {
                                                            "type": "SC_ADDRESS_TYPE_CONTRACT",
                                                            "contractId": "efed63cd4a96519d184afcf3088315fd89405d49fd0bd1496d85ba5435afe4f1"
                                                        },
                                                        "functionName": "set_price",
                                                        "args": [
                                                            {
                                                                "type": "SCV_ADDRESS",
                                                                "address": {
                                                                    "type": "SC_ADDRESS_TYPE_ACCOUNT",
                                                                    "accountId": "GDFVUKYAUWPLYJPX3ARBX3OTJ7QTAKPDBTN4ZOM6XN73TKZBGBAXKUKI"
                                                                }
                                                            },
                                                            {
                                                                "type": "SCV_VEC",
                                                                "vec": [
                                                                    {
                                                                        "type": "SCV_I128",
                                                                        "i128": {
                                                                            "hi": 0,
                                                                            "lo": 155383359693576
                                                                        }
                                                                    },
                                                                    {
                                                                        "type": "SCV_I128",
                                                                        "i128": {
                                                                            "hi": 0,
                                                                            "lo": 492624913447783
                                                                        }
                                                                    },
                                                                    {
                                                                        "type": "SCV_I128",
                                                                        "i128": {
                                                                            "hi": 0,
                                                                            "lo": 134721619395826
                                                                        }
                                                                    },
                                                                    {
                                                                        "type": "SCV_I128",
                                                                        "i128": {
                                                                            "hi": 0,
                                                                            "lo": 93618481334069
                                                                        }
                                                                    },
                                                                    {
                                                                        "type": "SCV_I128",
                                                                        "i128": {
                                                                            "hi": 0,
                                                                            "lo": 81743603005931
                                                                        }
                                                                    },
                                                                    {
                                                                        "type": "SCV_I128",
                                                                        "i128": {
                                                                            "hi": 0,
                                                                            "lo": 14783492239079824
                                                                        }
                                                                    },
                                                                    {
                                                                        "type": "SCV_I128",
                                                                        "i128": {
                                                                            "hi": 0,
                                                                            "lo": 132899060256543527
                                                                        }
                                                                    },
                                                                    {
                                                                        "type": "SCV_I128",
                                                                        "i128": {
                                                                            "hi": 0,
                                                                            "lo": 90341423159922
                                                                        }
                                                                    }
                                                                ]
                                                            },
                                                            {
                                                                "type": "SCV_U64",
                                                                "u64": 1696462500000
                                                            }
                                                        ]
                                                    }
                                                },
                                                "subInvocations": []
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    ],
                    "ext": {
                        "v": 1,
                        "sorobanData": {
                            "ext": {
                                "v": 0
                            },
                            "resources": {
                                "footprint": {
                                    "readOnly": [
                                        {
                                            "type": "CONTRACT_CODE",
                                            "contractCode": {
                                                "hash": "3552bdb4f930b7df7587622601cea3c3c832e503a903229bf8c41636e891527f"
                                            }
                                        }
                                    ],
                                    "readWrite": [
                                        {
                                            "type": "CONTRACT_DATA",
                                            "contractData": {
                                                "contract": {
                                                    "type": "SC_ADDRESS_TYPE_CONTRACT",
                                                    "contractId": "efed63cd4a96519d184afcf3088315fd89405d49fd0bd1496d85ba5435afe4f1"
                                                },
                                                "key": {
                                                    "type": "SCV_U128",
                                                    "u128": {
                                                        "hi": 1696462500000,
                                                        "lo": 0
                                                    }
                                                },
                                                "durability": "TEMPORARY"
                                            }
                                        },
                                        {
                                            "type": "CONTRACT_DATA",
                                            "contractData": {
                                                "contract": {
                                                    "type": "SC_ADDRESS_TYPE_CONTRACT",
                                                    "contractId": "efed63cd4a96519d184afcf3088315fd89405d49fd0bd1496d85ba5435afe4f1"
                                                },
                                                "key": {
                                                    "type": "SCV_U128",
                                                    "u128": {
                                                        "hi": 1696462500000,
                                                        "lo": 1
                                                    }
                                                },
                                                "durability": "TEMPORARY"
                                            }
                                        },
                                        {
                                            "type": "CONTRACT_DATA",
                                            "contractData": {
                                                "contract": {
                                                    "type": "SC_ADDRESS_TYPE_CONTRACT",
                                                    "contractId": "efed63cd4a96519d184afcf3088315fd89405d49fd0bd1496d85ba5435afe4f1"
                                                },
                                                "key": {
                                                    "type": "SCV_U128",
                                                    "u128": {
                                                        "hi": 1696462500000,
                                                        "lo": 2
                                                    }
                                                },
                                                "durability": "TEMPORARY"
                                            }
                                        },
                                        {
                                            "type": "CONTRACT_DATA",
                                            "contractData": {
                                                "contract": {
                                                    "type": "SC_ADDRESS_TYPE_CONTRACT",
                                                    "contractId": "efed63cd4a96519d184afcf3088315fd89405d49fd0bd1496d85ba5435afe4f1"
                                                },
                                                "key": {
                                                    "type": "SCV_U128",
                                                    "u128": {
                                                        "hi": 1696462500000,
                                                        "lo": 3
                                                    }
                                                },
                                                "durability": "TEMPORARY"
                                            }
                                        },
                                        {
                                            "type": "CONTRACT_DATA",
                                            "contractData": {
                                                "contract": {
                                                    "type": "SC_ADDRESS_TYPE_CONTRACT",
                                                    "contractId": "efed63cd4a96519d184afcf3088315fd89405d49fd0bd1496d85ba5435afe4f1"
                                                },
                                                "key": {
                                                    "type": "SCV_U128",
                                                    "u128": {
                                                        "hi": 1696462500000,
                                                        "lo": 4
                                                    }
                                                },
                                                "durability": "TEMPORARY"
                                            }
                                        },
                                        {
                                            "type": "CONTRACT_DATA",
                                            "contractData": {
                                                "contract": {
                                                    "type": "SC_ADDRESS_TYPE_CONTRACT",
                                                    "contractId": "efed63cd4a96519d184afcf3088315fd89405d49fd0bd1496d85ba5435afe4f1"
                                                },
                                                "key": {
                                                    "type": "SCV_U128",
                                                    "u128": {
                                                        "hi": 1696462500000,
                                                        "lo": 5
                                                    }
                                                },
                                                "durability": "TEMPORARY"
                                            }
                                        },
                                        {
                                            "type": "CONTRACT_DATA",
                                            "contractData": {
                                                "contract": {
                                                    "type": "SC_ADDRESS_TYPE_CONTRACT",
                                                    "contractId": "efed63cd4a96519d184afcf3088315fd89405d49fd0bd1496d85ba5435afe4f1"
                                                },
                                                "key": {
                                                    "type": "SCV_U128",
                                                    "u128": {
                                                        "hi": 1696462500000,
                                                        "lo": 6
                                                    }
                                                },
                                                "durability": "TEMPORARY"
                                            }
                                        },
                                        {
                                            "type": "CONTRACT_DATA",
                                            "contractData": {
                                                "contract": {
                                                    "type": "SC_ADDRESS_TYPE_CONTRACT",
                                                    "contractId": "efed63cd4a96519d184afcf3088315fd89405d49fd0bd1496d85ba5435afe4f1"
                                                },
                                                "key": {
                                                    "type": "SCV_U128",
                                                    "u128": {
                                                        "hi": 1696462500000,
                                                        "lo": 7
                                                    }
                                                },
                                                "durability": "TEMPORARY"
                                            }
                                        },
                                        {
                                            "type": "CONTRACT_DATA",
                                            "contractData": {
                                                "contract": {
                                                    "type": "SC_ADDRESS_TYPE_CONTRACT",
                                                    "contractId": "efed63cd4a96519d184afcf3088315fd89405d49fd0bd1496d85ba5435afe4f1"
                                                },
                                                "key": {
                                                    "type": "SCV_LEDGER_KEY_CONTRACT_INSTANCE"
                                                },
                                                "durability": "PERSISTENT"
                                            }
                                        }
                                    ]
                                },
                                "instructions": 24902788,
                                "readBytes": 36304,
                                "writeBytes": 1956
                            },
                            "refundableFee": 136743
                        }
                    }
                },
                "signatures": [
                    {
                        "hint": "56dc3d4b",
                        "signature": "4bf40fa4c21154c8127949e83ca3d2097b712b1f67e58fc14f973ac61dd630561674849245f4f536b8e80463cee13e77a701bfb0352d1e0d9ba6a9216877be04"
                    },
                    {
                        "hint": "5c9e0b2a",
                        "signature": "8ce736daa4f529290706c99281c30bcc705a571095d0d3a6fb3471354f0aeb1b298ecd692a8dc979dab578aa44daa8cf2c2a1ef9b27511a3fa3862086d44600b"
                    }
                ]
            }
        }
    }
    

    good:

    {
        "LedgerEntryChanges": [
            {
                "type": "LEDGER_ENTRY_STATE",
                "state": {
                    "lastModifiedLedgerSeq": 1850574,
                    "data": {
                        "type": "ACCOUNT",
                        "account": {
                            "accountID": "GDFVUKYAUWPLYJPX3ARBX3OTJ7QTAKPDBTN4ZOM6XN73TKZBGBAXKUKI",
                            "balance": 477031939487,
                            "seqNum": 7231384896670556,
                            "numSubEntries": 2,
                            "inflationDest": null,
                            "flags": 0,
                            "homeDomain": "",
                            "thresholds": "00020202",
                            "signers": [
                                {
                                    "key": {
                                        "type": "SIGNER_KEY_TYPE_ED25519",
                                        "ed25519": "ad6e00ffbf1eb579339cc99266b07e390377f8ebebab9f5fa8c8653956dc3d4b"
                                    },
                                    "weight": 1
                                },
                                {
                                    "key": {
                                        "type": "SIGNER_KEY_TYPE_ED25519",
                                        "ed25519": "ea303ba4bb598ccb4d94e1fd26a2ba8319ae6c4446162875b7d1adda5c9e0b2a"
                                    },
                                    "weight": 1
                                }
                            ],
                            "ext": {
                                "v": 1,
                                "v1": {
                                    "liabilities": {
                                        "buying": 0,
                                        "selling": 0
                                    },
                                    "ext": {
                                        "v": 2,
                                        "v2": {
                                            "numSponsored": 0,
                                            "numSponsoring": 0,
                                            "signerSponsoringIDs": [
                                                null,
                                                null
                                            ],
                                            "ext": {
                                                "v": 3,
                                                "v3": {
                                                    "ext": {
                                                        "v": 0
                                                    },
                                                    "seqLedger": 1850574,
                                                    "seqTime": 1696462217
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "ext": {
                        "v": 0
                    }
                }
            },
            {
                "type": "LEDGER_ENTRY_UPDATED",
                "updated": {
                    "lastModifiedLedgerSeq": 1850632,
                    "data": {
                        "type": "ACCOUNT",
                        "account": {
                            "accountID": "GDFVUKYAUWPLYJPX3ARBX3OTJ7QTAKPDBTN4ZOM6XN73TKZBGBAXKUKI",
                            "balance": 477030901117,
                            "seqNum": 7231384896670556,
                            "numSubEntries": 2,
                            "inflationDest": null,
                            "flags": 0,
                            "homeDomain": "",
                            "thresholds": "00020202",
                            "signers": [
                                {
                                    "key": {
                                        "type": "SIGNER_KEY_TYPE_ED25519",
                                        "ed25519": "ad6e00ffbf1eb579339cc99266b07e390377f8ebebab9f5fa8c8653956dc3d4b"
                                    },
                                    "weight": 1
                                },
                                {
                                    "key": {
                                        "type": "SIGNER_KEY_TYPE_ED25519",
                                        "ed25519": "ea303ba4bb598ccb4d94e1fd26a2ba8319ae6c4446162875b7d1adda5c9e0b2a"
                                    },
                                    "weight": 1
                                }
                            ],
                            "ext": {
                                "v": 1,
                                "v1": {
                                    "liabilities": {
                                        "buying": 0,
                                        "selling": 0
                                    },
                                    "ext": {
                                        "v": 2,
                                        "v2": {
                                            "numSponsored": 0,
                                            "numSponsoring": 0,
                                            "signerSponsoringIDs": [
                                                null,
                                                null
                                            ],
                                            "ext": {
                                                "v": 3,
                                                "v3": {
                                                    "ext": {
                                                        "v": 0
                                                    },
                                                    "seqLedger": 1850574,
                                                    "seqTime": 1696462217
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "ext": {
                        "v": 0
                    }
                }
            }
        ]
    }
    

    bad:

    {
        "LedgerEntryChanges": [
            {
                "type": "LEDGER_ENTRY_STATE",
                "state": {
                    "lastModifiedLedgerSeq": 1850574,
                    "data": {
                        "type": "ACCOUNT",
                        "account": {
                            "accountID": "GDFVUKYAUWPLYJPX3ARBX3OTJ7QTAKPDBTN4ZOM6XN73TKZBGBAXKUKI",
                            "balance": 477031939487,
                            "seqNum": 7231384896670556,
                            "numSubEntries": 2,
                            "inflationDest": null,
                            "flags": 0,
                            "homeDomain": "",
                            "thresholds": "00020202",
                            "signers": [
                                {
                                    "key": {
                                        "type": "SIGNER_KEY_TYPE_ED25519",
                                        "ed25519": "ad6e00ffbf1eb579339cc99266b07e390377f8ebebab9f5fa8c8653956dc3d4b"
                                    },
                                    "weight": 1
                                },
                                {
                                    "key": {
                                        "type": "SIGNER_KEY_TYPE_ED25519",
                                        "ed25519": "ea303ba4bb598ccb4d94e1fd26a2ba8319ae6c4446162875b7d1adda5c9e0b2a"
                                    },
                                    "weight": 1
                                }
                            ],
                            "ext": {
                                "v": 1,
                                "v1": {
                                    "liabilities": {
                                        "buying": 0,
                                        "selling": 0
                                    },
                                    "ext": {
                                        "v": 2,
                                        "v2": {
                                            "numSponsored": 0,
                                            "numSponsoring": 0,
                                            "signerSponsoringIDs": [
                                                null,
                                                null
                                            ],
                                            "ext": {
                                                "v": 3,
                                                "v3": {
                                                    "ext": {
                                                        "v": 0
                                                    },
                                                    "seqLedger": 1850574,
                                                    "seqTime": 1696462217
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "ext": {
                        "v": 0
                    }
                }
            },
            {
                "type": "LEDGER_ENTRY_UPDATED",
                "updated": {
                    "lastModifiedLedgerSeq": 1850632,
                    "data": {
                        "type": "ACCOUNT",
                        "account": {
                            "accountID": "GDFVUKYAUWPLYJPX3ARBX3OTJ7QTAKPDBTN4ZOM6XN73TKZBGBAXKUKI",
                            "balance": 477031802644,
                            "seqNum": 7231384896670556,
                            "numSubEntries": 2,
                            "inflationDest": null,
                            "flags": 0,
                            "homeDomain": "",
                            "thresholds": "00020202",
                            "signers": [
                                {
                                    "key": {
                                        "type": "SIGNER_KEY_TYPE_ED25519",
                                        "ed25519": "ad6e00ffbf1eb579339cc99266b07e390377f8ebebab9f5fa8c8653956dc3d4b"
                                    },
                                    "weight": 1
                                },
                                {
                                    "key": {
                                        "type": "SIGNER_KEY_TYPE_ED25519",
                                        "ed25519": "ea303ba4bb598ccb4d94e1fd26a2ba8319ae6c4446162875b7d1adda5c9e0b2a"
                                    },
                                    "weight": 1
                                }
                            ],
                            "ext": {
                                "v": 1,
                                "v1": {
                                    "liabilities": {
                                        "buying": 0,
                                        "selling": 0
                                    },
                                    "ext": {
                                        "v": 2,
                                        "v2": {
                                            "numSponsored": 0,
                                            "numSponsoring": 0,
                                            "signerSponsoringIDs": [
                                                null,
                                                null
                                            ],
                                            "ext": {
                                                "v": 3,
                                                "v3": {
                                                    "ext": {
                                                        "v": 0
                                                    },
                                                    "seqLedger": 1850574,
                                                    "seqTime": 1696462217
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "ext": {
                        "v": 0
                    }
                }
            }
        ]
    }
    

    only difference is that the account went from 477031939487 :

    • "good" went to 477030901117 (-1038370)
    • "bad" went to 477031802644 (-136843)

    This probably points to an issue with the way the effective fee is calculated for Soroban transactions.

    Here is the full meta of that ledger (which includes the full txset) from the "good" replay:
    good-meta.txt (github.com)

     
  • Anonymous

    Anonymous - 2023-10-05

    Originally posted by: dmkozh

    This probably points to an issue with the way the effective fee is calculated for Soroban transactions.

    That's really concerning, especially given that the difference is pretty high. Unless there is some weird non-determinism in how we pass the tx resources to fee computations, it would point at some config-induced non-determinism, e.g. due to using the stale cached value after the config upgrade or bucket list size change.

     
  • Anonymous

    Anonymous - 2023-10-05

    Originally posted by: MonsieurNicolas

    That's really concerning, especially given that the difference is pretty high. Unless there is some weird non-determinism in how we pass the tx resources to fee computations, it would point at some config-induced non-determinism, e.g. due to using the stale cached value after the config upgrade or bucket list size change.

    configs should not have any impact on the fee charged before applying the transaction, right (only on validity/refunds)?

     
  • Anonymous

    Anonymous - 2023-10-05

    Originally posted by: MonsieurNicolas

    oh I see it's possible that if we have the wrong settings (like if they're very low), we end up overestimating the inclusion fee, that ends up being 0 (as there is no contention)

     
  • Anonymous

    Anonymous - 2023-10-05

    Originally posted by: dmkozh

    configs should not have any impact on the fee charged before applying the transaction, right (only on validity/refunds)?

    No, we charge the resource_fee + discounted_inclusion_fee pre-apply. resource_fee is a function of configuration and BL size.

     
  • Anonymous

    Anonymous - 2023-10-05
     
  • Anonymous

    Anonymous - 2023-10-05

    Originally posted by: msteiner96

    Had the same issues today

     
  • Anonymous

    Anonymous - 2023-10-05

    Originally posted by: MonsieurNicolas

    So would the bug be an issue with mSorobanResourceFee or with the base fee cached improperly in TxSetFrame?

     
  • Anonymous

    Anonymous - 2023-10-05

    Originally posted by: dmkozh

    So would the bug be an issue with mSorobanResourceFee or with the base fee cached improperly in TxSetFrame?

    Could be either - hard to tell without knowing what's the TxSetFrame was. I'm more suspicious of config (because it's new/used in a lot of places), but who knows.

     
  • Anonymous

    Anonymous - 2023-10-06

    Originally posted by: dmkozh

    With some help from @marta-lokhova we've identified at least one issue that could cause the catchup issues: during catchup we build the transaction set objects (which includes fee computation) for the incoming tx sets using the current ledger state (which can be arbitrarily old), which might result in using a stale config. I'm not 100% sure that's the cause for the initial issue (ledger 1619071 seems a bit too far back?), but it's definitely an issue.

     
  • Anonymous

    Anonymous - 2023-10-11

    Originally posted by: MonsieurNicolas

    as we're going to have rc1/rc2 running on testnet for still some time.

    The workaround here is:

    1. new-db your instance (start from fresh)
    2. let it apply buckets (as needed) & let catchup replay parts of history
    3. before it completes catchup (where it would apply "buffered ledgers"), restart the node
    4. on restart, the node will replay from history and buffered ledgers
    5. with some luck, the bucket list and network settings will be stable -> node will be "in sync"
    6. if not lucky ("bad hash" error) retry from 1
     

Log in to post a comment.