Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion system-tests/lib/cre/workflow/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func compileGoWorkflow(ctx context.Context, workflowFilePath, workflowName strin
return "", errors.Wrapf(err, "failed to run go mod tidy: %s", string(output))
}

compileCmd := exec.CommandContext(ctx, "go", "build", "-o", workflowWasmPath, filepath.Base(workflowFilePath)) // #nosec G204 -- we control the value of the cmd so the lint/sec error is a false positive
compileCmd := exec.CommandContext(ctx, "go", "build", "-o", workflowWasmPath, ".") // #nosec G204 -- we control the value of the cmd so the lint/sec error is a false positive
compileCmd.Dir = filepath.Dir(workflowFilePath)
compileCmd.Env = append(os.Environ(), "CGO_ENABLED=0", "GOOS=wasip1", "GOARCH=wasm")
if output, err := compileCmd.CombinedOutput(); err != nil {
Expand Down
3 changes: 3 additions & 0 deletions system-tests/tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ replace github.com/smartcontractkit/chainlink/system-tests/tests/regression/cre/

replace github.com/smartcontractkit/chainlink/system-tests/tests/smoke/cre/solana/solwrite => ./smoke/cre/solana/solwrite

replace github.com/smartcontractkit/chainlink/system-tests/tests/smoke/cre/maxlimits => ./smoke/cre/maxlimits

require (
github.com/Masterminds/semver/v3 v3.4.0
github.com/avast/retry-go/v4 v4.6.1
Expand Down Expand Up @@ -82,6 +84,7 @@ require (
github.com/smartcontractkit/chainlink/system-tests/tests/smoke/cre/evm/logtrigger v0.0.0-00010101000000-000000000000
github.com/smartcontractkit/chainlink/system-tests/tests/smoke/cre/evmread v0.0.0-20250917232237-c4ecf802c6f8
github.com/smartcontractkit/chainlink/system-tests/tests/smoke/cre/solana/solwrite v0.0.0-00010101000000-000000000000
github.com/smartcontractkit/chainlink/system-tests/tests/smoke/cre/maxlimits v0.0.0-00010101000000-000000000000
github.com/smartcontractkit/libocr v0.0.0-20260130195252-6e18e2a30acc
github.com/stretchr/testify v1.11.1
golang.org/x/sync v0.19.0
Expand Down
5 changes: 5 additions & 0 deletions system-tests/tests/smoke/cre/cre_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ func runV2SuiteScenario(t *testing.T, topology string, scenario v2suite_config.S
testEnv := t_helpers.SetupTestEnvironmentWithConfig(t, t_helpers.GetDefaultTestConfig(t))
ExecuteConsensusTest(t, testEnv)
})
case v2suite_config.SuiteScenarioMaxLimits:
t.Run("[v2] Max Limits - "+topology, func(t *testing.T) {
testEnv := t_helpers.SetupTestEnvironmentWithConfig(t, t_helpers.GetDefaultTestConfig(t))
ExecuteMaxLimitsTest(t, testEnv)
})
default:
require.Failf(t, "unsupported V2 suite scenario", "scenario %q is not supported by the runner", scenario.String())
}
Expand Down
1 change: 1 addition & 0 deletions system-tests/tests/smoke/cre/maxlimits/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ballast.dat
24 changes: 24 additions & 0 deletions system-tests/tests/smoke/cre/maxlimits/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.PHONY: build build-max clean

export GOOS := wasip1
export GOARCH := wasm
export CGO_ENABLED := 0

LDFLAGS := -buildid= -w -s
# 14 MB of random data pushes compressed binary to ~18 MB (under 20 MB limit)
BALLAST_MAX_KB := 14336

# Standard build — uses a minimal 1 KB ballast placeholder.
build: ballast.dat
go build -o workflow.wasm -trimpath -ldflags="$(LDFLAGS)" .

# Max-binary build — generates a large ballast to push WASMCompressedBinarySizeLimit.
build-max:
dd if=/dev/urandom of=ballast.dat bs=1024 count=$(BALLAST_MAX_KB)
go build -o workflow.wasm -trimpath -ldflags="$(LDFLAGS)" .

ballast.dat:
dd if=/dev/urandom of=$@ bs=1024 count=1

clean:
rm -f workflow.wasm ballast.dat
20 changes: 20 additions & 0 deletions system-tests/tests/smoke/cre/maxlimits/ballast.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//go:build wasip1

package main

import (
_ "embed"
"fmt"
)

// ballast.dat must exist before building. Use `make build` for a minimal
// placeholder or `make build-max` for a ~14 MB file that pushes the
// compressed WASM binary toward the 20 MB limit.
//
//go:embed ballast.dat
var ballastData []byte

func init() {
// Reference ballastData so the linker retains it.
_ = fmt.Sprintf("ballast: %d bytes", len(ballastData))
}
100 changes: 100 additions & 0 deletions system-tests/tests/smoke/cre/maxlimits/config/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
package config

// LogTriggerConfig defines an EVM log trigger subscription.
type LogTriggerConfig struct {
ChainSelector uint64 `yaml:"chainSelector"`
Addresses []string `yaml:"addresses"`
TopicSlots []TopicSlotConfig `yaml:"topicSlots"`
Confidence int32 `yaml:"confidence"`
}

// TopicSlotConfig represents topic values for a single slot.
type TopicSlotConfig struct {
Values []string `yaml:"values"`
}

// AuthorizedKeyConfig holds an authorized key for the HTTP trigger.
type AuthorizedKeyConfig struct {
Type string `yaml:"type"`
PublicKey string `yaml:"publicKey"`
}

// ChainReadCallConfig describes a single EVM read call.
type ChainReadCallConfig struct {
Method string `yaml:"method"` // BalanceAt, CallContract, FilterLogs, HeaderByNumber, GetTxReceipt, GetTxByHash, EstimateGas
ChainSelector uint64 `yaml:"chainSelector"`
AccountAddress []byte `yaml:"accountAddress,omitempty"`
ContractAddress []byte `yaml:"contractAddress,omitempty"`
CallData []byte `yaml:"callData,omitempty"`
TxHash []byte `yaml:"txHash,omitempty"`
FromBlock int64 `yaml:"fromBlock,omitempty"`
ToBlock int64 `yaml:"toBlock,omitempty"`
BlockNumber int64 `yaml:"blockNumber,omitempty"`
}

// ChainWriteTargetConfig describes a single EVM write target.
type ChainWriteTargetConfig struct {
ChainSelector uint64 `yaml:"chainSelector"`
Receiver []byte `yaml:"receiver"`
GasLimit uint64 `yaml:"gasLimit"`
}

// HTTPEndpointConfig describes an HTTP endpoint to call.
type HTTPEndpointConfig struct {
URL string `yaml:"url"`
Method string `yaml:"method"`
Body string `yaml:"body,omitempty"`
}

// ConfHTTPEndpointConfig describes a confidential HTTP endpoint to call.
type ConfHTTPEndpointConfig struct {
URL string `yaml:"url"`
Method string `yaml:"method"`
Body string `yaml:"body,omitempty"`
SecretKey string `yaml:"secretKey"`
}

// SecretConfig describes a secret to fetch.
type SecretConfig struct {
ID string `yaml:"id"`
Namespace string `yaml:"namespace"`
}

// Config is the top-level workflow configuration.
// All arrays are sized to match CRE per-execution call limits.
type Config struct {
// Trigger configuration
CronSchedule string `yaml:"cronSchedule"`
HTTPAuthorizedKeys []AuthorizedKeyConfig `yaml:"httpAuthorizedKeys"`
LogTriggers []LogTriggerConfig `yaml:"logTriggers"`

// Chain read configuration (15 calls max)
ChainReads []ChainReadCallConfig `yaml:"chainReads"`

// Chain write configuration (10 targets max)
ChainWrites []ChainWriteTargetConfig `yaml:"chainWrites"`

// HTTP action configuration (5 calls max)
HTTPEndpoints []HTTPEndpointConfig `yaml:"httpEndpoints"`

// Confidential HTTP configuration (5 calls max)
ConfHTTPEndpoints []ConfHTTPEndpointConfig `yaml:"confHttpEndpoints"`

// Secrets configuration (5 calls max)
Secrets []SecretConfig `yaml:"secrets"`

// Consensus observation payload size target in bytes (up to 100 KB)
ConsensusPayloadSize int `yaml:"consensusPayloadSize"`

// Number of consensus rounds (up to 20)
ConsensusRounds int `yaml:"consensusRounds"`

// Number of log lines to emit (up to 999)
LogEventCount int `yaml:"logEventCount"`

// Report payload for chain writes (up to ~5 KB)
ReportPayload []byte `yaml:"reportPayload"`

// Metadata is a large key-value map used to approach the 1 MB config limit.
Metadata map[string]string `yaml:"metadata"`
}
27 changes: 27 additions & 0 deletions system-tests/tests/smoke/cre/maxlimits/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module github.com/smartcontractkit/chainlink/system-tests/tests/smoke/cre/maxlimits

go 1.25.7

require (
github.com/ethereum/go-ethereum v1.17.0
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260211172625-dff40e83b3c9
github.com/smartcontractkit/cre-sdk-go v1.1.0
github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v0.9.0
github.com/smartcontractkit/cre-sdk-go/capabilities/networking/confidentialhttp v0.0.0-20260211203328-1f3721436119
github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http v0.10.0
github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v0.9.0
google.golang.org/protobuf v1.36.11
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20251001021608-1fe7b43fc4d6 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/holiman/uint256 v1.3.2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/stretchr/testify v1.11.1 // indirect
golang.org/x/sys v0.39.0 // indirect
)
44 changes: 44 additions & 0 deletions system-tests/tests/smoke/cre/maxlimits/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20251001021608-1fe7b43fc4d6 h1:1zYrtlhrZ6/b6SAjLSfKzWtdgqK0U+HtH/VcBWh1BaU=
github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20251001021608-1fe7b43fc4d6/go.mod h1:ioLG6R+5bUSO1oeGSDxOV3FADARuMoytZCSX6MEMQkI=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0=
github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc=
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs=
github.com/ethereum/go-ethereum v1.17.0 h1:2D+1Fe23CwZ5tQoAS5DfwKFNI1HGcTwi65/kRlAVxes=
github.com/ethereum/go-ethereum v1.17.0/go.mod h1:2W3msvdosS/MCWytpqTcqgFiRYbTH59FxDJzqah120o=
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA=
github.com/holiman/uint256 v1.3.2/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260211172625-dff40e83b3c9 h1:tp3AN+zX8dboiugE005O3rY/HBWKmSdN9LhNbZGhNWY=
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260211172625-dff40e83b3c9/go.mod h1:Jqt53s27Tr0jDl8mdBXg1xhu6F8Fci8JOuq43tgHOM8=
github.com/smartcontractkit/cre-sdk-go v1.1.0 h1:7tcN/uDty2ex39xw8sDnvLaEh6swQJBYRsrBVDpGSrw=
github.com/smartcontractkit/cre-sdk-go v1.1.0/go.mod h1:sgiRyHUiPcxp1e/EMnaJ+ddMFL4MbE3UMZ2MORAAS9U=
github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v0.9.0 h1:0ddtacyL1aAFxIolQnbysYlJKP9FOLJc1YRFS/Z9OJA=
github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v0.9.0/go.mod h1:VVJ4mvA7wOU1Ic5b/vTaBMHEUysyxd0gdPPXkAu8CmY=
github.com/smartcontractkit/cre-sdk-go/capabilities/networking/confidentialhttp v0.0.0-20260211203328-1f3721436119 h1:P69M59tBeLevOldspLxedrYNyAu+vtaD6wnpWwhstxM=
github.com/smartcontractkit/cre-sdk-go/capabilities/networking/confidentialhttp v0.0.0-20260211203328-1f3721436119/go.mod h1:KOn3NK4AbtvuMs2oKlNRxL2fACSuuGI114xPqO5igtQ=
github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http v0.10.0 h1:nP6PVWrrTIICvjwQuFitsQecQWbqpPaYzaTEjx92eTQ=
github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http v0.10.0/go.mod h1:M83m3FsM1uqVu06OO58mKUSZJjjH8OGJsmvFpFlRDxI=
github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v0.9.0 h1:BWqX7Cnd6VnhHEpjfrQGEajPtAwqH4MH0D7o3iEPvvU=
github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v0.9.0/go.mod h1:PWyrIw16It4TSyq6mDXqmSR0jF2evZRKuBxu7pK1yDw=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Loading