diff --git a/cmd/soroban-rpc/internal/preflight/preflight_test.go b/cmd/soroban-rpc/internal/preflight/preflight_test.go index 4b164212..d6c14ca9 100644 --- a/cmd/soroban-rpc/internal/preflight/preflight_test.go +++ b/cmd/soroban-rpc/internal/preflight/preflight_test.go @@ -173,8 +173,7 @@ var mockLedgerEntriesWithoutTTLs = []xdr.LedgerEntry{ Data: xdr.LedgerEntryData{ Type: xdr.LedgerEntryTypeConfigSetting, ConfigSetting: &xdr.ConfigSettingEntry{ - ConfigSettingId: xdr.ConfigSettingIdConfigSettingContractCostParamsCpuInstructions, - // Obtained with TestGetLedgerEntryConfigSettings + ConfigSettingId: xdr.ConfigSettingIdConfigSettingContractCostParamsCpuInstructions, ContractCostParamsCpuInsns: contractCostParams, }, }, @@ -184,8 +183,7 @@ var mockLedgerEntriesWithoutTTLs = []xdr.LedgerEntry{ Data: xdr.LedgerEntryData{ Type: xdr.LedgerEntryTypeConfigSetting, ConfigSetting: &xdr.ConfigSettingEntry{ - ConfigSettingId: xdr.ConfigSettingIdConfigSettingContractCostParamsMemoryBytes, - // Obtained with TestGetLedgerEntryConfigSettings + ConfigSettingId: xdr.ConfigSettingIdConfigSettingContractCostParamsMemoryBytes, ContractCostParamsMemBytes: contractCostParams, }, }, diff --git a/cmd/soroban-rpc/internal/test/simulate_transaction_test.go b/cmd/soroban-rpc/internal/test/simulate_transaction_test.go index d414f315..f5d68b5e 100644 --- a/cmd/soroban-rpc/internal/test/simulate_transaction_test.go +++ b/cmd/soroban-rpc/internal/test/simulate_transaction_test.go @@ -240,7 +240,7 @@ func TestSimulateTransactionSucceeds(t *testing.T) { // for test purposes, the most deterministic way to assert the resulting fee is expected value in test scope, is to capture // the resulting fee from current preflight output and re-plug it in here, rather than try to re-implement the cost-model algo // in the test. - ResourceFee: 118357, + ResourceFee: 149755, } // First, decode and compare the transaction data so we get a decent diff if it fails. @@ -560,7 +560,7 @@ func TestSimulateInvokeContractTransactionSucceeds(t *testing.T) { require.Contains(t, metrics, "soroban_rpc_json_rpc_request_duration_seconds_count{endpoint=\"simulateTransaction\",status=\"ok\"} 3") require.Contains(t, metrics, "soroban_rpc_preflight_pool_request_ledger_get_duration_seconds_count{status=\"ok\",type=\"db\"} 3") require.Contains(t, metrics, "soroban_rpc_preflight_pool_request_ledger_get_duration_seconds_count{status=\"ok\",type=\"all\"} 3") - require.Contains(t, metrics, "soroban_rpc_preflight_pool_request_ledger_entries_fetched_sum 60") + require.Contains(t, metrics, "soroban_rpc_preflight_pool_request_ledger_entries_fetched_sum 65") } func TestSimulateTransactionError(t *testing.T) { @@ -1144,7 +1144,7 @@ func TestSimulateSystemEvent(t *testing.T) { // for test purposes, the most deterministic way to assert the resulting fee is expected value in test scope, is to capture // the resulting fee from current preflight output and re-plug it in here, rather than try to re-implement the cost-model algo // in the test. - assert.InDelta(t, 85360, int64(transactionData.ResourceFee), 5000) + assert.InDelta(t, 70668, int64(transactionData.ResourceFee), 5000) assert.InDelta(t, 104, uint32(transactionData.Resources.WriteBytes), 15) require.GreaterOrEqual(t, len(response.Events), 3) }