Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

batch_simulate_bundle_with_config in RpcClient returning different number of accounts between pre-simulation and post-simulation for same config #314

Open
prideoil opened this issue Jun 29, 2023 · 1 comment

Comments

@prideoil
Copy link

prideoil commented Jun 29, 2023

Problem

I am using v1.14.16-jito branch for the sdk and the validator software

Example Tx

Signature - 47zGU9TNVmbu6ZT1RUgFrXvoewBqPkLMKXaRrk5wKVK4rVgc2KNZiF9SqMnnyYNfqa3gS1eAZ33TtNaccCn5DVMQ

Config

There are 17 accounts I want the before and after for.

RpcSimulateTransactionAccountsConfig {
    encoding: Some(
        Base64,
    ),
    addresses: [
        "2AEWSvUds1wsufnsDPCXjFsJCMJH5SNNm7fSF4kxys9a",
        "E2BcoCeJLTa27mAXDA4xwEq3pBUcyH6XXEHYk4KvKYTv",
        "4d35yC7C8zhCDec7JbPptL9SEb4NUddKHxURgmvD8hfo",
        "2QdhepnKRTLjjSqPL1PtKNwqrUkoLee5Gqs8bvZhRdMv",
        "4K4ayZdgL4RrY863WaBMCQcvjwogteAJRmr134mnUPop",
        "7gz9KepoX1NeD4KeUdpSL2rC4Mjvb4C4voBT4q7M29qd",
        "2cuyPh4GeWgC7prQwD4hmAsvA97uUY9dxVApx66tH4sS",
        "D3CDPQLoa9jY1LXCkpUqd3JQDWz8DX1LDE1dhmJt9fq4",
        "dwxR9YF7WwnJJu7bPC4UNcWFpcSsooH6fxbpoa3fTbJ",
        "83v8iPyZihDEjDdY8RdZddyZNyUtXngz69Lgo9Kt5d6d",
        "3yCQySKJ4gnvnPcHR62S8dHkEw55qGdzBBhFqPCxn7Ky",
        "8QubQgwwkWXzmK9k83UUFngRaXqWzZPaXFdFUx1fWw1n",
        "Bga4BYZEcpJMNNzeCxgALJ596MbZAPVPZM99PSyEzarB",
        "DdigEybG2begUfkpSUP63o5CKF2Q9yGCWktZ6Hnb1RxN",
        "AqFSS3hGnwPNZD7ZT2Tuyfp5CtPY9cj5BtjD3N8X5Dif",
        "2hSMtnF5Sxq4kuBkqf2gmWjcgJjKfWZP4daiN8p8sccM",
        "4KR1SCoQCbZgeQQv8awEwd6rTYKPd25PG5AZjbE2uoWi",
    ],
}

Simulation Response

The account in first position is 2AEWSvUds1wsufnsDPCXjFsJCMJH5SNNm7fSF4kxys9a and relates to a stSOL/SOL whirlpool swap pool. In the pre-execution accounts we can the data for this account whilst in the post-execution accounts this is skipped.

Note in the transaction this account is mutable and should update with every swap.

RpcSimulateBundleTransactionResult {
    err: None,
    logs: //EXCLUDED
    pre_execution_accounts: Some(
        [
            UiAccount {
                lamports: 5435781,
                data: Binary(
                    "P5XRDOGAYwkT5EH4ORPKaLBjT7Al/eqohzfoQRDRJV41ezN33e4czfwBAAEAZAAsAe/gitwZVBQEAAAAAAAAAACjJhxYq4Ks8gAAAAAAAAAA0vv//3BOAQAAAAAAzEIAAAAAAAAGm4hX/quBhPtof2NGGMA12sQ53BrrO1WYoPAAAAAAATcupyMWhev/jm806YQiUQh8olPQsaooX014ecIG/rQR0A6Yp+IFIgAAAAAAAAAAAGJxy3EZR2udzgDYFcj/MV/Iv30oSGM9NJQq39U18t7+WULT4sVshXcKatT1WLCJwf7YCp3vT7uUhMV9AJbAktHQqPV5k5wiAAAAAAAAAAAAaPKdZAAAAAAMANCv64YU2n8Zq6AtQPGMaSWF9lAg387T1eX5qcDE4VpjYnO1vcTu8y2sTj9U19V2NnAXBJuZXsd5J+U8dKZKvR0xrxfe/zwmhIFgCsr+SxQJjA/hQbf0oc34STRkRAMAAAAAAAAAAAAAAAAAAAAAdsktOmaAlAAAAAAAAAAAAPYI8k64mwlNiLNwXlpvLKkXSDwYXBGDByAn53lg2R4hFr3OQ+s1QQGZBdfww7X7wy1UOCikuo7DdyjIFrnkKPm9HTGvF97/PCaEgWAKyv5LFAmMD+FBt/ShzfhJNGREAwAAAAAAAAAAd6EAAAAAAABwgCqWs8t7SAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACOIlhm57zD46/6nljbIbVKuvxkxzkq8QZ/LwuyXPhySAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
                    Base64,
                ),
                owner: "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",
                executable: false,
                rent_epoch: 361,
            },
           **...//TRUNCATED, 16 more accounts**
        ],
    ),
    post_execution_accounts: Some(
        [
            UiAccount {
                lamports: 30202988673470,
                data: Binary(
                    "BpuIV/6rgYT7aH9jRhjANdrEOdwa6ztVmKDwAAAAAAEU6YsaioAZz4hj3MC2cFsMjjcO1PbUr6r0SxlB/b8TTc4bSi54GwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAADwHR8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                    Base64,
                ),
                owner: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
                executable: false,
                rent_epoch: 0,
            },
            **//TRUNCATED, 15 more accounts**
        ],
    ),
    units_consumed: Some(
        605339,
    ),
    return_data: None,
}

Proposed Solution

Not sure

@prideoil
Copy link
Author

prideoil commented Jun 29, 2023

Raw transaction is here

VersionedTransaction {
            signatures: [
                47zGU9TNVmbu6ZT1RUgFrXvoewBqPkLMKXaRrk5wKVK4rVgc2KNZiF9SqMnnyYNfqa3gS1eAZ33TtNaccCn5DVMQ,
            ],
            message: V0(
                Message {
                    header: MessageHeader {
                        num_required_signatures: 1,
                        num_readonly_signed_accounts: 0,
                        num_readonly_unsigned_accounts: 6,
                    },
                    account_keys: [
                        2bhkQ6uVn32ddiG4Fe3DVbLsrExdb3ubaY6i1G4szEmq,
                        9x7VmVUs272SeWHybBuWesYiRpYTeHMZdh9A9VDdiSf,
                        2VhJLvbzNswzh8S79UxQ2uLyVW6dLdrSqHpLonkB3m3y,
                        2cuyPh4GeWgC7prQwD4hmAsvA97uUY9dxVApx66tH4sS,
                        2hSMtnF5Sxq4kuBkqf2gmWjcgJjKfWZP4daiN8p8sccM,
                        46gUHWCuimSMgue7Q5prNQXYSqfb8uDe5jznDyokWVr3,
                        4K4ayZdgL4RrY863WaBMCQcvjwogteAJRmr134mnUPop,
                        52RZRxs1mVhXA6NLPsdba8ZTjGLDtuuUhgCRQeH6wa49,
                        5hZh89uwqNtu1Dz4DhzTmEse4xkqDwt9p2b8384C6aaE,
                        7gz9KepoX1NeD4KeUdpSL2rC4Mjvb4C4voBT4q7M29qd,
                        ABioBzuBLRog8dUW2DURBir2Hm8cRyu6MXsajCETfG5E,
                        BuTvwdmqAwZbYTsPMzMtEURfhnSSdkqEYyG51dWbTf9K,
                        ByXB4xCxVhmUEmQj3Ut7byZ1Hbva1zhKjaVcv3jBMN7E,
                        GK7ifiw8wPJPSZQ1hgcUJcB4fADAAp9u9dnNYCqXkUDW,
                        ComputeBudget111111111111111111111111111111,
                        JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB,
                        2AEWSvUds1wsufnsDPCXjFsJCMJH5SNNm7fSF4kxys9a,
                        3NJYftD5sjVfxSnUdZ1wVML8f3aC6mp1CXCL6L7TnU8C,
                        3v6ootgJJZbSWEDfZMA1scfh7wcsVVfeocExRxPqCyWH,
                        6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc,
                    ],
                    recent_blockhash: D5PxcqDzpjnqdnLeEwYMVditWCFiE1YaMaMsBmxM7g1u,
                    instructions: [
                        CompiledInstruction {
                            program_id_index: 14,
                            accounts: [],
                            data: [
                                2,
                                192,
                                92,
                                21,
                                0,
                            ],
                        },
                        CompiledInstruction {
                            program_id_index: 14,
                            accounts: [],
                            data: [
                                3,
                                7,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                            ],
                        },
                        CompiledInstruction {
                            program_id_index: 15,
                            accounts: [
                                39,
                                0,
                                5,
                                43,
                                0,
                                45,
                                22,
                                11,
                                5,
                                23,
                                25,
                                24,
                                39,
                                9,
                                6,
                                3,
                                15,
                            ],
                            data: [
                                229,
                                23,
                                203,
                                151,
                                122,
                                227,
                                173,
                                42,
                                0,
                                1,
                                0,
                                0,
                                0,
                                2,
                                26,
                                192,
                                221,
                                24,
                                0,
                                0,
                                0,
                                0,
                                0,
                                44,
                                186,
                                139,
                                5,
                                0,
                                0,
                                0,
                                0,
                                5,
                                0,
                                0,
                            ],
                        },
                        CompiledInstruction {
                            program_id_index: 15,
                            accounts: [
                                39,
                                0,
                                7,
                                40,
                                39,
                                0,
                                28,
                                5,
                                29,
                                11,
                                26,
                                27,
                                27,
                                27,
                                46,
                                43,
                                0,
                                47,
                                34,
                                5,
                                7,
                                31,
                                33,
                                35,
                                39,
                                4,
                                32,
                                30,
                                15,
                            ],
                            data: [
                                229,
                                23,
                                203,
                                151,
                                122,
                                227,
                                173,
                                42,
                                0,
                                2,
                                0,
                                0,
                                0,
                                2,
                                17,
                                0,
                                2,
                                26,
                                193,
                                221,
                                24,
                                0,
                                0,
                                0,
                                0,
                                0,
                                12,
                                148,
                                251,
                                4,
                                0,
                                0,
                                0,
                                0,
                                5,
                                0,
                                0,
                            ],
                        },
                        CompiledInstruction {
                            program_id_index: 19,
                            accounts: [
                                0,
                                12,
                                44,
                                16,
                                8,
                                2,
                                10,
                                1,
                                20,
                                21,
                                41,
                                37,
                                42,
                                5,
                                7,
                                13,
                                17,
                                18,
                                36,
                                39,
                                38,
                            ],
                            data: [
                                92,
                                41,
                                172,
                                30,
                                190,
                                65,
                                174,
                                90,
                                121,
                                251,
                                72,
                                5,
                                0,
                                0,
                                0,
                                0,
                                63,
                                202,
                                191,
                                4,
                                0,
                                0,
                                0,
                                0,
                                3,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                14,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                            ],
                        },
                    ],
                    address_table_lookups: [
                        MessageAddressTableLookup {
                            account_key: AX89b97qJvqvjcFV8fs5kemijnsWTthuKANAmJRkLoe1,
                            writable_indexes: [
                                28,
                                32,
                            ],
                            readonly_indexes: [
                                7,
                                14,
                                12,
                                8,
                                3,
                                42,
                                15,
                                4,
                                2,
                            ],
                        },
                        MessageAddressTableLookup {
                            account_key: 68v15j58AWpYWAFo9yErqpYCi1aMv49KVeJwsr31pnXG,
                            writable_indexes: [
                                95,
                                97,
                                98,
                                96,
                            ],
                            readonly_indexes: [
                                94,
                            ],
                        },
                        MessageAddressTableLookup {
                            account_key: 6hMWuL5gm8H8Ec1ZCtwJxutyUxSMTpX48qU3q3FZbe52,
                            writable_indexes: [
                                161,
                                162,
                                159,
                                160,
                            ],
                            readonly_indexes: [
                                165,
                            ],
                        },
                        MessageAddressTableLookup {
                            account_key: 8dMmEUBYfotgQf5KwK2HmDBEEFcP6nYfX9Y4TVpqcxTL,
                            writable_indexes: [
                                92,
                                87,
                                91,
                                88,
                                86,
                                89,
                            ],
                            readonly_indexes: [
                                85,
                            ],
                        },
                    ],
                },
            ),
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant