@@ -36,11 +36,12 @@ type CTFChainProviderConfig struct {
3636 Once * sync.Once
3737
3838 // Optional: A specification of the image to use for the CTF container.
39- // Default: mysten/sui-tools:devnet
39+ // Default: unset, which uses CTF blockchain defaults (blockchain.DefaultSuiImage /
40+ // blockchain.DefaultSuiImageARM64 from chainlink-testing-framework for the host GOARCH).
4041 Image * string
4142
42- // Optional: A specification of the platform to use for the CTF container .
43- // Default: linux/amd64
43+ // Optional: OCI platform for the CTF image (ImagePlatform) .
44+ // Default: unset; on arm64 hosts this provider sets linux/arm64, otherwise CTF defaults apply.
4445 Platform * string
4546}
4647
@@ -173,37 +174,24 @@ func (p *CTFChainProvider) startContainer(
173174 port := ports [0 ]
174175 faucetPort := ports [1 ]
175176
176- var image string
177- var platform string
178-
179- // by default, if image and platform are empty, they are set to amd64 by CTF
180- // to support running locally on macos arm64, we set the image and platform to ci-arm64 and linux/arm64 respectively
177+ // Image: when unset, blockchain.NewBlockchainNetwork applies CTF defaults
178+ // (DefaultSuiImage / DefaultSuiImageARM64) inside defaultSui.
179+ input := & blockchain.Input {
180+ Type : blockchain .TypeSui ,
181+ ChainID : chainID ,
182+ PublicKey : address ,
183+ Port : strconv .Itoa (port ),
184+ FaucetPort : strconv .Itoa (faucetPort ),
185+ }
181186 if p .config .Image != nil {
182- image = * p .config .Image
183- } else {
184- if runtime .GOARCH == "arm64" {
185- image = "mysten/sui-tools:ci-arm64"
186- } else {
187- image = "mysten/sui-tools:devnet-v1.61.0"
188- }
187+ input .Image = * p .config .Image
189188 }
190-
191189 if p .config .Platform != nil {
192- platform = * p .config .Platform
193- } else {
194- if runtime .GOARCH == "arm64" {
195- platform = "linux/arm64"
196- }
197- }
198-
199- input := & blockchain.Input {
200- Image : image ,
201- ImagePlatform : & platform ,
202- Type : blockchain .TypeSui ,
203- ChainID : chainID ,
204- PublicKey : address ,
205- Port : strconv .Itoa (port ),
206- FaucetPort : strconv .Itoa (faucetPort ),
190+ input .ImagePlatform = p .config .Platform
191+ } else if runtime .GOARCH == "arm64" {
192+ // Mysten arm64 images need an explicit platform; CTF only sets this when Image is empty.
193+ arm := "linux/arm64"
194+ input .ImagePlatform = & arm
207195 }
208196
209197 output , rerr := blockchain .NewBlockchainNetwork (input )
0 commit comments