diff --git a/Dockerfile b/Dockerfile index 75f413847..e8d954354 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,12 @@ # syntax=docker.io/docker/dockerfile:1 -ARG EMULATOR_VERSION=0.19.0 +ARG EMULATOR_VERSION=0.20.0 # Build directories. ARG GO_BUILD_PATH=/build/cartesi/go -FROM debian:bookworm-20250407 AS common-env +FROM debian:trixie-20250811 AS common-env USER root @@ -22,13 +22,13 @@ RUN <= 2 { // args[1] is mandatory if `template-hash` was absent - request.TemplateHash, err = readHash(args[1]) + request.TemplateHash, err = emulator.ReadHash(args[1]) } else { err = fmt.Errorf("missing argument. One of `template-path` or `template-hash` is required") } @@ -435,7 +435,7 @@ func buildApplicationOnlyDeployment( if !cmd.Flags().Changed("template-hash") { if len(args) >= 2 { // args[1] is mandatory if `template-hash` was absent - request.TemplateHash, err = readHash(args[1]) + request.TemplateHash, err = emulator.ReadHash(args[1]) } else { err = fmt.Errorf("missing argument. One of `template-path` or `template-hash` is required") } @@ -515,7 +515,7 @@ func buildPrtApplicationDeployment( if !cmd.Flags().Changed("template-hash") { if len(args) >= 2 { // args[1] is mandatory if `template-hash` was absent - request.TemplateHash, err = readHash(args[1]) + request.TemplateHash, err = emulator.ReadHash(args[1]) } else { err = fmt.Errorf("missing argument. One of `template-path` or `template-hash` is required") } @@ -535,23 +535,6 @@ func buildPrtApplicationDeployment( return request, nil } -// read the hash value from the cartesi machine hash file -func readHash(machineDir string) (common.Hash, error) { - zero := common.Hash{} - path := path.Join(machineDir, "hash") - hash, err := os.ReadFile(path) - if err != nil { - return zero, fmt.Errorf("read hash: %w", err) - } else if len(hash) != common.HashLength { - return zero, fmt.Errorf( - "read hash: wrong size; expected %v bytes but read %v", - common.HashLength, - len(hash), - ) - } - return common.BytesToHash(hash), nil -} - func parseHexHash(hash string) (common.Hash, error) { out := common.Hash{} return out, out.UnmarshalText([]byte(hash)) diff --git a/control.template b/control.template index 820590886..7834fe080 100644 --- a/control.template +++ b/control.template @@ -5,7 +5,7 @@ Homepage: https://docs.cartesi.io/cartesi-rollups/ Architecture: ARG_ARCH Maintainer: Node Reference Unit Provides: cartesi-rollups-node -Depends: cartesi-machine-emulator (>= 0.19.0), cartesi-machine-emulator (<< 0.20.0) +Depends: cartesi-machine-emulator (>= 0.20.0), cartesi-machine-emulator (<< 0.21.0) Section: net Priority: optional Multi-Arch: no diff --git a/internal/advancer/advancer.go b/internal/advancer/advancer.go index 68a6b639c..71dafa770 100644 --- a/internal/advancer/advancer.go +++ b/internal/advancer/advancer.go @@ -289,7 +289,7 @@ func (s *Service) processInputs(ctx context.Context, app *Application, inputs [] "outputs", len(result.Outputs), "reports", len(result.Reports), "hashes", len(result.Hashes), - "remaining_cycles", result.RemainingMetaCycles, + "remaining_cycles", result.TotalMetaCycles, ) // Store the result in the database diff --git a/internal/manager/instance.go b/internal/manager/instance.go index 56274e8a1..0f6cfadda 100644 --- a/internal/manager/instance.go +++ b/internal/manager/instance.go @@ -316,14 +316,14 @@ func (m *MachineInstanceImpl) Advance(ctx context.Context, input []byte, epochIn // Create the result result := &AdvanceResult{ - EpochIndex: epochIndex, - InputIndex: index, - Status: status, - Outputs: advanceResp.Outputs, - Reports: advanceResp.Reports, - Hashes: advanceResp.Hashes, - RemainingMetaCycles: advanceResp.RemainingCycles, - IsDaveConsensus: computeHashes, + EpochIndex: epochIndex, + InputIndex: index, + Status: status, + Outputs: advanceResp.Outputs, + Reports: advanceResp.Reports, + Hashes: advanceResp.Hashes, + TotalMetaCycles: advanceResp.RemainingCycles, + IsDaveConsensus: computeHashes, } // If the input was accepted, update the machine state @@ -354,6 +354,7 @@ func (m *MachineInstanceImpl) Advance(ctx context.Context, input []byte, epochIn result.MachineHash = prevMachineHash result.OutputsHash = prevOutputsHash result.OutputsHashProof = prevOutputsHashProof + result.Hashes[len(result.Hashes)-1] = prevMachineHash // Close the fork since we're not using it if err := fork.Close(); err != nil { diff --git a/internal/model/models.go b/internal/model/models.go index bb20e3cfb..dd709795d 100644 --- a/internal/model/models.go +++ b/internal/model/models.go @@ -1032,14 +1032,14 @@ type OutputsProof struct { type AdvanceResult struct { OutputsProof - EpochIndex uint64 - InputIndex uint64 - Status InputCompletionStatus - Outputs [][]byte - Reports [][]byte - Hashes [][32]byte - RemainingMetaCycles uint64 - IsDaveConsensus bool + EpochIndex uint64 + InputIndex uint64 + Status InputCompletionStatus + Outputs [][]byte + Reports [][]byte + Hashes [][32]byte + TotalMetaCycles uint64 + IsDaveConsensus bool } type InspectResult struct { diff --git a/internal/repository/postgres/bulk.go b/internal/repository/postgres/bulk.go index e3596d7bd..4d9f85c11 100644 --- a/internal/repository/postgres/bulk.go +++ b/internal/repository/postgres/bulk.go @@ -199,10 +199,9 @@ func insertStateHashes( epochIndex uint64, inputIndex uint64, hashes [][32]byte, - machineHash common.Hash, - remainingMetaCycles uint64, + totalMetaCycles uint64, ) error { - + usedMetaCycles := uint64(0) nextIndex, err := getStateHashNextIndex(ctx, tx, appID, epochIndex) if err != nil { return err @@ -217,24 +216,26 @@ func insertStateHashes( table.StateHashes.Repetitions, ) - for i, h := range hashes { + for i := range len(hashes) - 1 { + usedMetaCycles += 1 stmt = stmt.VALUES( appID, epochIndex, inputIndex, nextIndex+uint64(i), - h[:], + hashes[i][:], 1, ) } + // the remaining meta cycles go to the fixed-point stmt = stmt.VALUES( appID, epochIndex, inputIndex, - nextIndex+uint64(len(hashes)), - machineHash[:], - remainingMetaCycles, + nextIndex+uint64(len(hashes)-1), + hashes[len(hashes)-1][:], + totalMetaCycles-usedMetaCycles, ) sqlStr, args := stmt.Sql() @@ -373,7 +374,7 @@ func (r *PostgresRepository) StoreAdvanceResult( } if res.IsDaveConsensus { - err = insertStateHashes(ctx, tx, appID, res.EpochIndex, res.InputIndex, res.Hashes, res.MachineHash, res.RemainingMetaCycles) + err = insertStateHashes(ctx, tx, appID, res.EpochIndex, res.InputIndex, res.Hashes, res.TotalMetaCycles) if err != nil { return err } diff --git a/internal/repository/repotest/bulk_test_cases.go b/internal/repository/repotest/bulk_test_cases.go index 05e57afdf..d289dadde 100644 --- a/internal/repository/repotest/bulk_test_cases.go +++ b/internal/repository/repotest/bulk_test_cases.go @@ -170,13 +170,13 @@ func (s *BulkOperationsSuite) TestStoreAdvanceResult() { hash3 := [32]byte(crypto.Keccak256Hash([]byte("state-3"))) result := &AdvanceResult{ - EpochIndex: 0, - InputIndex: 0, - Status: InputCompletionStatus_Accepted, - Outputs: [][]byte{[]byte("dave-output")}, - Hashes: [][32]byte{hash1, hash2, hash3}, - RemainingMetaCycles: 42, - IsDaveConsensus: true, + EpochIndex: 0, + InputIndex: 0, + Status: InputCompletionStatus_Accepted, + Outputs: [][]byte{[]byte("dave-output")}, + Hashes: [][32]byte{hash1, hash2, hash3}, + TotalMetaCycles: 42, + IsDaveConsensus: true, OutputsProof: OutputsProof{ OutputsHash: outputsHash, MachineHash: machineHash, @@ -318,13 +318,13 @@ func (s *BulkOperationsSuite) TestStoreAdvanceResultRollback() { seed := Seed(s.Ctx, s.T(), s.Repo) result := &AdvanceResult{ - EpochIndex: 99, // non-existent epoch - InputIndex: 0, - Status: InputCompletionStatus_Accepted, - Outputs: [][]byte{[]byte("should-be-rolled-back")}, - Hashes: [][32]byte{{1}, {2}}, - RemainingMetaCycles: 10, - IsDaveConsensus: true, + EpochIndex: 99, // non-existent epoch + InputIndex: 0, + Status: InputCompletionStatus_Accepted, + Outputs: [][]byte{[]byte("should-be-rolled-back")}, + Hashes: [][32]byte{{1}, {2}}, + TotalMetaCycles: 10, + IsDaveConsensus: true, OutputsProof: OutputsProof{ OutputsHash: UniqueHash(), MachineHash: UniqueHash(), diff --git a/internal/repository/repotest/state_hash_test_cases.go b/internal/repository/repotest/state_hash_test_cases.go index 1f9df2b1c..68d9b6a21 100644 --- a/internal/repository/repotest/state_hash_test_cases.go +++ b/internal/repository/repotest/state_hash_test_cases.go @@ -51,12 +51,12 @@ func (s *StateHashSuite) TestListStateHashes() { hash2 := [32]byte(crypto.Keccak256Hash([]byte("list-state-2"))) result := &AdvanceResult{ - EpochIndex: 0, - InputIndex: 0, - Status: InputCompletionStatus_Accepted, - Hashes: [][32]byte{hash1, hash2}, - RemainingMetaCycles: 10, - IsDaveConsensus: true, + EpochIndex: 0, + InputIndex: 0, + Status: InputCompletionStatus_Accepted, + Hashes: [][32]byte{hash1, hash2}, + TotalMetaCycles: 10, + IsDaveConsensus: true, OutputsProof: OutputsProof{ OutputsHash: outputsHash, MachineHash: machineHash, diff --git a/pkg/emulator/emulator.go b/pkg/emulator/emulator.go index 82893b3dc..cc3e634fb 100644 --- a/pkg/emulator/emulator.go +++ b/pkg/emulator/emulator.go @@ -48,8 +48,8 @@ func SpawnServer(address string, timeout time.Duration) (*RemoteMachine, string, return &RemoteMachine{Machine: Machine{ptr: cm}}, C.GoString(boundAddr), uint32(pid), nil } -func CreateMachine(config, runtimeConfig string) (*Machine, error) { +func CreateMachine(config, runtimeConfig, dir string) (*Machine, error) { machine := &Machine{} - err := machine.Create(config, runtimeConfig) + err := machine.Create(config, runtimeConfig, dir) return machine, err } diff --git a/pkg/emulator/machine.go b/pkg/emulator/machine.go index 7fb624d43..938db280a 100644 --- a/pkg/emulator/machine.go +++ b/pkg/emulator/machine.go @@ -19,6 +19,14 @@ import ( const HashSize = C.sizeof_cm_hash +type SharingMode = C.cm_sharing_mode + +const ( + SharingNone SharingMode = iota + SharingConfig + SharingAll +) + // Common type aliases type Hash = [HashSize]byte @@ -58,11 +66,12 @@ func (m *Machine) Delete() { } // create -func (m *Machine) Create(config, runtimeConfig string) error { +func (m *Machine) Create(config, runtimeConfig, dir string) error { var err error m.callCAPI(func() { var cConfig *C.char var cRuntime *C.char + var cDir *C.char if config != "" { cConfig = C.CString(config) defer C.free(unsafe.Pointer(cConfig)) @@ -71,7 +80,11 @@ func (m *Machine) Create(config, runtimeConfig string) error { cRuntime = C.CString(runtimeConfig) defer C.free(unsafe.Pointer(cRuntime)) } - err = newError(C.cm_create_new(cConfig, cRuntime, &m.ptr)) + if dir != "" { + cDir = C.CString(dir) + defer C.free(unsafe.Pointer(cDir)) + } + err = newError(C.cm_create_new(cConfig, cRuntime, cDir, &m.ptr)) }) return err } @@ -119,27 +132,6 @@ func (m *Machine) GetInitialConfig() (string, error) { return res, nil } -// get_memory_ranges -func (m *Machine) GetMemoryRanges() (string, error) { - var ranges *C.char - var err error - var res string - - m.callCAPI(func() { - err = newError(C.cm_get_memory_ranges(m.ptr, &ranges)) - if err != nil || ranges == nil { - return - } - res = C.GoString(ranges) - // no need to free 'ranges' here, as it is a static string - }) - - if err != nil { - return "", err - } - return res, nil -} - // get_proof func (m *Machine) GetProof(address uint64, log2size int32) (string, error) { var proof *C.char @@ -147,7 +139,7 @@ func (m *Machine) GetProof(address uint64, log2size int32) (string, error) { var res string m.callCAPI(func() { - err = newError(C.cm_get_proof(m.ptr, C.uint64_t(address), C.int32_t(log2size), &proof)) + err = newError(C.cm_get_proof(m.ptr, C.uint64_t(address), C.int32_t(log2size), C.int32_t(HashTreeLog2RootSize), &proof)) if err != nil || proof == nil { return } @@ -241,7 +233,7 @@ func (m *Machine) Load(dir string, runtimeConfig string) error { cRuntime = C.CString(runtimeConfig) defer C.free(unsafe.Pointer(cRuntime)) } - err = newError(C.cm_load(m.ptr, cDir, cRuntime)) + err = newError(C.cm_load(m.ptr, cDir, cRuntime, SharingNone)) }) return err @@ -369,6 +361,52 @@ func (m *Machine) Run(mcycleEnd uint64) (BreakReason, error) { return BreakReason(br), nil } +// collect_mcycle_root_hashes +func (m *Machine) CollectMCycleRootHashes(mcycleEnd, mcyclePeriod, mcyclePhase uint64, log2BundleMcycleCount int32, previousBackTree string) ([]byte, error) { + var err error + var result *C.char + + m.callCAPI(func() { + var previousBackTreeC *C.char + if previousBackTree != "" { + previousBackTreeC = C.CString(previousBackTree) + defer C.free(unsafe.Pointer(previousBackTreeC)) + } + err = newError(C.cm_collect_mcycle_root_hashes( + m.ptr, + C.uint64_t(mcycleEnd), + C.uint64_t(mcyclePeriod), + C.uint64_t(mcyclePhase), + C.int32_t(log2BundleMcycleCount), + previousBackTreeC, + &result)) + }) + + if err != nil { + return []byte{}, err + } + return []byte(C.GoString(result)), nil +} + +// collect_uarch_cycle_root_hashes +func (m *Machine) CollectUarchCycleRootHashes(mcycleEnd uint64, log2BundleMcycleCount int32) ([]byte, error) { + var err error + var result *C.char + + m.callCAPI(func() { + err = newError(C.cm_collect_uarch_cycle_root_hashes( + m.ptr, + C.uint64_t(mcycleEnd), + C.int32_t(log2BundleMcycleCount), + &result)) + }) + + if err != nil { + return []byte{}, err + } + return []byte(C.GoString(result)), nil +} + // send_cmio_response func (m *Machine) SendCmioResponse(reason uint16, data []byte) error { var err error @@ -414,7 +452,7 @@ func (m *Machine) Store(directory string) error { m.callCAPI(func() { cDir := C.CString(directory) defer C.free(unsafe.Pointer(cDir)) - err = newError(C.cm_store(m.ptr, cDir)) + err = newError(C.cm_store(m.ptr, cDir, SharingAll)) }) return err diff --git a/pkg/emulator/read_hash.go b/pkg/emulator/read_hash.go new file mode 100644 index 000000000..6ed66af59 --- /dev/null +++ b/pkg/emulator/read_hash.go @@ -0,0 +1,56 @@ +// (c) Cartesi and individual authors (see AUTHORS) +// SPDX-License-Identifier: Apache-2.0 (see LICENSE) + +package emulator + +import ( + "fmt" + "io" + "os" + "path" + + "github.com/ethereum/go-ethereum/common" +) + +// Reads the Cartesi Machine hash from machineDir. Returns it as a hex string or +// an error +func ReadHashHex(machineDir string) (string, error) { + path := path.Join(machineDir, "hash_tree.sht") + f, err := os.Open(path) + if err != nil { + return "", err + } + defer f.Close() + + // root hash is located at this offset (0x60). Double check its value + // with the cartesi-machine-stored-hash tool. + _, err = f.Seek(0x60, io.SeekStart) + if err != nil { + return "", err + } + + // read only 0x20 bytes from it, there are more hash values after it + rawHash := make([]byte, 0x20) + n, err := f.Read(rawHash) + if err != nil { + return "", err + } + if n != common.HashLength { + return "", fmt.Errorf( + "read hash: wrong size; expected %v bytes but read %v", + common.HashLength, + n, + ) + } + return common.Bytes2Hex(rawHash), nil +} + +// Reads the Cartesi Machine hash from machineDir. Returns it as a commonHash +// or an error +func ReadHash(machineDir string) (common.Hash, error) { + s, err := ReadHashHex(machineDir) + if err != nil { + return common.Hash{}, err + } + return common.HexToHash(s), nil +} diff --git a/pkg/emulator/types.go b/pkg/emulator/types.go index f57fe9d1f..31623cd89 100644 --- a/pkg/emulator/types.go +++ b/pkg/emulator/types.go @@ -297,11 +297,11 @@ const ( ) const ( - CmioRxBufferStart uint64 = C.CM_PMA_CMIO_RX_BUFFER_START - CmioRxBufferLog2Size uint64 = C.CM_PMA_CMIO_RX_BUFFER_LOG2_SIZE + CmioRxBufferStart uint64 = C.CM_AR_CMIO_RX_BUFFER_START + CmioRxBufferLog2Size uint64 = C.CM_AR_CMIO_RX_BUFFER_LOG2_SIZE - CmioTxBufferStart uint64 = C.CM_PMA_CMIO_TX_BUFFER_START - CmioTxBufferLog2Size uint64 = C.CM_PMA_CMIO_TX_BUFFER_LOG2_SIZE + CmioTxBufferStart uint64 = C.CM_AR_CMIO_TX_BUFFER_START + CmioTxBufferLog2Size uint64 = C.CM_AR_CMIO_TX_BUFFER_LOG2_SIZE ) type MachineRuntimeConfig struct { @@ -335,3 +335,7 @@ func NewMachineRuntimeConfig() *MachineRuntimeConfig { SoftYield: false, } } + +const ( + HashTreeLog2RootSize uint32 = C.CM_HASH_TREE_LOG2_ROOT_SIZE +) diff --git a/pkg/machine/implementation.go b/pkg/machine/implementation.go index 7e4748db6..8d11a09d6 100644 --- a/pkg/machine/implementation.go +++ b/pkg/machine/implementation.go @@ -50,7 +50,7 @@ const ( const maxOutputs = 65536 // 2^16 const maxReports = 65536 // 2^16 -const CheckpointAddress uint64 = 0x7ffff000 +const CheckpointAddress uint64 = 0xfe0 // TODO: use emulator constant: CM_AR_SHADOW_REVERT_ROOT_HASH_START const TxBufferAddress uint64 = 0x60800000 const HashLog2Size = 5 // 32 bytes @@ -415,9 +415,9 @@ func (m *machineImpl) run(ctx context.Context, reqType requestType, computeHashe } return []Hash{} } - remainingMetaCycles := func() uint64 { + totalMetaCycles := func() uint64 { if computeHashes { - return StrideCountInInput - uint64(len(hashCollectorState.Hashes)) + return StrideCountInInput } return 0 } @@ -429,38 +429,38 @@ func (m *machineImpl) run(ctx context.Context, reqType requestType, computeHashe // Steps the machine as many times as needed until it manually/automatically yields. for yt == nil { if err := checkContext(ctx); err != nil { - return outputs, reports, hashes(), remainingMetaCycles(), err + return outputs, reports, hashes(), totalMetaCycles(), err } if time.Since(startTime) > runTimeout { werr := fmt.Errorf("run operation timed out: %w", ErrDeadlineExceeded) - return outputs, reports, hashes(), remainingMetaCycles(), werr + return outputs, reports, hashes(), totalMetaCycles(), werr } yt, currentCycle, err = m.runIncrementInterval(ctx, currentCycle, limitCycle, hashCollectorState, stepTimeout) if err != nil && err != ErrReachedTargetMcycle { - return outputs, reports, hashes(), remainingMetaCycles(), err + return outputs, reports, hashes(), totalMetaCycles(), err } } // Returns with the responses when the machine manually yields. if *yt == ManualYield { - return outputs, reports, hashes(), remainingMetaCycles(), nil + return outputs, reports, hashes(), totalMetaCycles(), nil } // Asserts the machine yielded automatically. if *yt != AutomaticYield { err := fmt.Errorf("invalid yield type: %d: %w", *yt, ErrMachineInternal) - return outputs, reports, hashes(), remainingMetaCycles(), err + return outputs, reports, hashes(), totalMetaCycles(), err } yt = nil if err := checkContext(ctx); err != nil { - return outputs, reports, hashes(), remainingMetaCycles(), err + return outputs, reports, hashes(), totalMetaCycles(), err } _, yieldReason, data, err := m.backend.ReceiveCmioRequest(m.params.FastDeadline) if err != nil { werr := fmt.Errorf("could not read output/report: %w", err) - return outputs, reports, hashes(), remainingMetaCycles(), werr + return outputs, reports, hashes(), totalMetaCycles(), werr } switch automaticYieldReason(yieldReason) { @@ -469,17 +469,17 @@ func (m *machineImpl) run(ctx context.Context, reqType requestType, computeHashe case AutomaticYieldReasonOutput: // TODO: should we remove this? if len(outputs) == maxOutputs { - return outputs, reports, hashes(), remainingMetaCycles(), ErrOutputsLimitExceeded + return outputs, reports, hashes(), totalMetaCycles(), ErrOutputsLimitExceeded } outputs = append(outputs, data) case AutomaticYieldReasonReport: if len(reports) == maxReports { - return outputs, reports, hashes(), remainingMetaCycles(), ErrReportsLimitExceeded + return outputs, reports, hashes(), totalMetaCycles(), ErrReportsLimitExceeded } reports = append(reports, data) default: err := fmt.Errorf("invalid automatic yield reason: %d: %w", yieldReason, ErrMachineInternal) - return outputs, reports, hashes(), remainingMetaCycles(), err + return outputs, reports, hashes(), totalMetaCycles(), err } } } diff --git a/pkg/machine/libcartesi.go b/pkg/machine/libcartesi.go index 7d396f1de..5db27e065 100644 --- a/pkg/machine/libcartesi.go +++ b/pkg/machine/libcartesi.go @@ -39,6 +39,16 @@ type proofJson struct { TargetHash Hash `json:"target_hash"` } +// Struct for the decoded `result` field of cm_collect_mcycle_root_hashes (originally returned as json). +// The value comes back as a json string, that needs to be decoded to this struct below. +// BackTree may or may not be present, check cm_collect_mcycle_root_hashes documentation for details. +type CollectMCycleRootHashesState struct { + RootHashes [][]byte `json:"hashes"` + MCyclePhase uint64 `json:"mcycle_phase"` + BreakReason string `json:"break_reason"` + BackTree json.RawMessage `json:"back_tree,omitempty"` +} + func decodeB64To32(dst *Hash, s string) error { // accepts Std (with '=') and Raw (without '=') n, err := base64.StdEncoding.Decode(dst[:], []byte(s)) @@ -315,10 +325,11 @@ func (e *LibCartesiBackend) RunAndCollectRootHashes( state.Phase = (state.Phase + advanced) % state.Period cur = pos - // Only collect hash if we reached the exact boundary (pos == nextHashCycle) + // Collect hash if we reached the exact boundary (pos == nextHashCycle) or + // we reached a fixed-point. // This ensures "hash after each complete period", matching the C API behavior // and avoiding duplicate collections if the machine stops early due to yields - if pos == nextHashCycle { + if pos == nextHashCycle || br == YieldedManually || br == Halted { if err := checkDeadline(); err != nil { return Failed, err } diff --git a/test/dependencies b/test/dependencies index 557d9b45d..092280d4b 100644 --- a/test/dependencies +++ b/test/dependencies @@ -1,2 +1,2 @@ https://github.com/cartesi/image-kernel/releases/download/v0.20.0/linux-6.5.13-ctsi-1-v0.20.0.bin -https://github.com/cartesi/machine-guest-tools/releases/download/v0.17.0/rootfs-tools.ext2 +https://github.com/cartesi/machine-guest-tools/releases/download/v0.17.2/rootfs-tools.ext2 diff --git a/test/dependencies.sha256 b/test/dependencies.sha256 index 5674cb2ce..92e988b1e 100644 --- a/test/dependencies.sha256 +++ b/test/dependencies.sha256 @@ -1,2 +1,2 @@ 65dd100ff6204346ac2f50f772721358b5c1451450ceb39a154542ee27b4c947 test/downloads/linux-6.5.13-ctsi-1-v0.20.0.bin -8eb9d03b2653fc6090caf4ae3fb49b44fe1ccd57d9903dd696c0a3024ea1a031 test/downloads/rootfs-tools.ext2 +675a49e3c9bada29f25d5b559707b34553b94280c03f44ccb8203c2cf453b541 test/downloads/rootfs-tools.ext2 diff --git a/test/tooling/snapshot/snapshot.go b/test/tooling/snapshot/snapshot.go index ae1bf073a..d8cf2cc77 100644 --- a/test/tooling/snapshot/snapshot.go +++ b/test/tooling/snapshot/snapshot.go @@ -98,7 +98,7 @@ func (snapshot *Snapshot) createTempDir() error { } func (snapshot *Snapshot) createRunAndStore(config string, cycles uint64) error { - machine, err := emulator.CreateMachine(config, "") + machine, err := emulator.CreateMachine(config, "", "") if err != nil { return errors.Join(err, snapshot.Close()) }