diff --git a/go.mod b/go.mod index c30985e125..71ea8a4118 100644 --- a/go.mod +++ b/go.mod @@ -43,7 +43,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.104 github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20261005132539-b7d63d5fd549 github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4 - github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260804191526-b7a850ae7648 + github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20261013212015-e622e8b83b6b github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b github.com/smartcontractkit/chainlink-protos/metering/go v0.0.0-20260710151514-27b5a126dabe github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260709145319-7782fb89eb16 diff --git a/go.sum b/go.sum index 9aa8e13089..428ef2957d 100644 --- a/go.sum +++ b/go.sum @@ -255,8 +255,8 @@ github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.202610051 github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.11-0.20261005132539-b7d63d5fd549/go.mod h1:Scyk7O80fde5rJF3Ty3fEE3xiS6j84eWbu8/2gl3pIY= github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4 h1:GCzrxDWn3b7jFfEA+WiYRi8CKoegsayiDoJBCjYkneE= github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4/go.mod h1:HHGeDUpAsPa0pmOx7wrByCitjQ0mbUxf0R9v+g67uCA= -github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260804191526-b7a850ae7648 h1:WEUMkKQPAgcNMRgES6CBWrRUiII+HKEWQjulKQBSuMA= -github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260804191526-b7a850ae7648/go.mod h1:/i8hjTPFdVWHiY+QjeSiVS2Z3GB3WAZznGgXHstC02E= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20261013212015-e622e8b83b6b h1:tlxPkVQ6ZpJIElqUWc4lU5VH4BB6OzhckG/gHwpaaa0= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20261013212015-e622e8b83b6b/go.mod h1:/i8hjTPFdVWHiY+QjeSiVS2Z3GB3WAZznGgXHstC02E= github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b h1:QuI6SmQFK/zyUlVWEf0GMkiUYBPY4lssn26nKSd/bOM= github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b/go.mod h1:qSTSwX3cBP3FKQwQacdjArqv0g6QnukjV4XuzO6UyoY= github.com/smartcontractkit/chainlink-protos/metering/go v0.0.0-20260710151514-27b5a126dabe h1:MDnY5wQbWTpFdDnMRicEnoMfSP5nM/KncARr4skP1ug= diff --git a/pkg/capabilities/v2/chain-capabilities/evm/client.pb.go b/pkg/capabilities/v2/chain-capabilities/evm/client.pb.go index c543dafdd2..6a970271f9 100644 --- a/pkg/capabilities/v2/chain-capabilities/evm/client.pb.go +++ b/pkg/capabilities/v2/chain-capabilities/evm/client.pb.go @@ -1792,7 +1792,7 @@ const file_capabilities_blockchain_evm_v1alpha_client_proto_rawDesc = "" + "\bTxStatus\x12\x13\n" + "\x0fTX_STATUS_FATAL\x10\x00\x12\x16\n" + "\x12TX_STATUS_REVERTED\x10\x01\x12\x15\n" + - "\x11TX_STATUS_SUCCESS\x10\x022\x82\x1a\n" + + "\x11TX_STATUS_SUCCESS\x10\x022\xe3\x1b\n" + "\x06Client\x12\x80\x01\n" + "\fCallContract\x128.capabilities.blockchain.evm.v1alpha.CallContractRequest\x1a6.capabilities.blockchain.evm.v1alpha.CallContractReply\x12z\n" + "\n" + @@ -1804,8 +1804,8 @@ const file_capabilities_blockchain_evm_v1alpha_client_proto_rawDesc = "" + "\x0eHeaderByNumber\x12:.capabilities.blockchain.evm.v1alpha.HeaderByNumberRequest\x1a8.capabilities.blockchain.evm.v1alpha.HeaderByNumberReply\x12v\n" + "\n" + "LogTrigger\x12<.capabilities.blockchain.evm.v1alpha.FilterLogTriggerRequest\x1a(.capabilities.blockchain.evm.v1alpha.Log0\x01\x12}\n" + - "\vWriteReport\x127.capabilities.blockchain.evm.v1alpha.WriteReportRequest\x1a5.capabilities.blockchain.evm.v1alpha.WriteReportReply\x1a\xc7\x10\x82\xb5\x18\xc2\x10\b\x01\x12\tevm@1.0.0\x1a\xb2\x10\n" + - "\rChainSelector\x12\xa0\x10\x12\x9d\x10\n" + + "\vWriteReport\x127.capabilities.blockchain.evm.v1alpha.WriteReportRequest\x1a5.capabilities.blockchain.evm.v1alpha.WriteReportReply\x1a\xa8\x12\x82\xb5\x18\xa3\x12\b\x01\x12\tevm@1.0.0\x1a\x93\x12\n" + + "\rChainSelector\x12\x81\x12\x12\xfe\x11\n" + "\x17\n" + "\vadi-mainnet\x10\xfc\xf0\xe6·\xe7ݪ8\n" + "\x18\n" + @@ -1854,6 +1854,8 @@ const file_capabilities_blockchain_evm_v1alpha_client_proto_rawDesc = "" + "\x19ethereum-mainnet-xlayer-1\x10\x96\xa5\xfc\x9c\xa6\xa8\xef\xed)\n" + "%\n" + "\x19ethereum-mainnet-zksync-1\x10\x94\xee\x97\xd9\xed\xb4\xb1\xd7\x15\n" + + "#\n" + + "\x16ethereum-testnet-hoodi\x10\x83\xa4\xaf\x89\xf2ڭ\x88\x90\x01\n" + "%\n" + "\x18ethereum-testnet-sepolia\x10ٵ\xe4\xce\xfc\xc9\xee\xa0\xde\x01\n" + "/\n" + @@ -1894,6 +1896,8 @@ const file_capabilities_blockchain_evm_v1alpha_client_proto_rawDesc = "" + "\x11megaeth-testnet-2\x10\xe3\x8dވ\xb1\x8f\xfd\x93\xfd\x01\n" + "\x19\n" + "\rmonad-mainnet\x10\xf9\xc0\xc9\xcc\xff\x8e\xe7\xdau\n" + + "\x19\n" + + "\rmonad-testnet\x10Аϑ\xa6\xf4\xe8\xa5\x1e\n" + "$\n" + "\x17pharos-atlantic-testnet\x10̙\xed\xe0μ\xaf\xb4\xdf\x01\n" + "\x1a\n" + @@ -1908,18 +1912,28 @@ const file_capabilities_blockchain_evm_v1alpha_client_proto_rawDesc = "" + "\x14polygon-testnet-amoy\x10͏\xd6\xdf\xf1ǐ\xfa\xe1\x01\n" + "$\n" + "\x18private-testnet-andesite\x10Ԧ\x98\xa5\xc1\x8f\xdc\xfc_\n" + + "#\n" + + "\x16private-testnet-basalt\x10\xff\xed\xe4\xe4軻\xe9\xfe\x01\n" + "\"\n" + "\x16private-testnet-pumice\x10\xf9\xc2Ķĥ\xc4\xdb\x15\n" + "%\n" + "\x19private-testnet-quartzite\x10\xf9\xf0\xa2ݬ݇\xfa9\n" + "$\n" + "\x18private-testnet-rhyolite\x10\x81\xfa\x89\xeb\xe1\xb4۱\b\n" + + "\x1d\n" + + "\x11robinhood-testnet\x10\xc8\xed\xfc\xbe\xa6\x91\xa8\x9b\x1c\n" + "\x19\n" + "\rsonic-mainnet\x10Ѳ\xe5\xed٠\xb2\x9d\x17\n" + "\x19\n" + "\rsonic-testnet\x10Ȉ\xfbԴ\xc6\xfa\xbc\x18\n" + + "\x1b\n" + + "\x0estable-testnet\x10\x9d\x91\x8b\xb3\xa5\xa0\xa5գ\x01\n" + + "\x1a\n" + + "\rt-rex-testnet\x10\xfd\xc0\xe3\xdc\xcb\xfd\x88\xb5\xf4\x01\n" + "\x18\n" + "\vtac-testnet\x10\xd5ۍ\xe3\xfb\x9f\x93׃\x01\n" + + "\"\n" + + "\x16tempo-testnet-moderato\x10\x93\x9b\xc0\xe9䄍\xb0u\n" + "\x1b\n" + "\x0exlayer-testnet\x10ɾ\xa1\xb4\xad̼ݍ\x01b\x06proto3" diff --git a/pkg/workflows/wasm/host/module.go b/pkg/workflows/wasm/host/module.go index e824448f5c..23373f1c8c 100644 --- a/pkg/workflows/wasm/host/module.go +++ b/pkg/workflows/wasm/host/module.go @@ -529,7 +529,12 @@ func (m *module) Execute(ctx context.Context, req *sdkpb.ExecuteRequest, executo case *sdkpb.ExecuteRequest_PreHook: timeout = *m.cfg.PrehookTimeout } - return runWasm(ctx, m, req, setMaxResponseSize, m.linkV2, executor, timeout) + start := time.Now() + result, err := runWasm(ctx, m, req, setMaxResponseSize, m.linkV2, executor, timeout) + if result != nil { + result.ComputeDurationMs = proto.Int64(time.Since(start).Milliseconds()) + } + return result, err } // callStart looks up and invokes the wasm module's _start function, but diff --git a/pkg/workflows/wasm/host/standard_test.go b/pkg/workflows/wasm/host/standard_test.go index dbb84632c7..2f4b5e06ca 100644 --- a/pkg/workflows/wasm/host/standard_test.go +++ b/pkg/workflows/wasm/host/standard_test.go @@ -59,6 +59,7 @@ func TestStandardConfig(t *testing.T) { return time.Now() }).Maybe() wrappedConfig := runWithBasicTrigger(t, mockExecutionHelper) + require.NotNil(t, wrappedConfig.ComputeDurationMs, "host reports the guest run duration") wrappedValue := wrappedConfig.GetValue() require.NotNil(t, wrappedValue, "Expected a value in the response") actualConfig := wrappedConfig.GetValue().GetBytesValue()