Skip to content

Latest commit

 

History

History
744 lines (652 loc) · 40.1 KB

File metadata and controls

744 lines (652 loc) · 40.1 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Added

  • Added a user manual under doc/, generated from a template by a docgen pipeline that executes and verifies every code snippet against the locally built emulator
  • Added --nvram command line option and nvram machine configuration for UIO-backed memory ranges, exposed to the guest as /dev/uio* via generic-uio
  • Added a label field to memory range configurations, exposed to the guest through a standard DTB /aliases node (flashdriveN, nvramN, and any user label)
  • Added recording of a revert root hash as a logged input of send_cmio_response, with read_revert_root_hash/write_revert_root_hash accessors across all API layers
  • Added reversion to the recorded revert root hash for rollup inputs that end rejected, when logging steps, logging uarch resets, verifying, and collecting root hashes
  • Added emission of per-output proofs from --cmio-advance-state
  • Added an optional user schema dictionary argument to cartesi.tojson/cartesi.fromjson to name binary and compound fields of caller-defined message types
  • Added a cartesi.hash-tree Lua module for hash-tree slice/splice verification and building the output-hashes frontier behind the output proofs
  • Added get_address_name to resolve a physical address to a descriptive name, across the C, Lua, and JSON-RPC APIs
  • Added the ability for --initial-hash and --final-hash to write the hash to a file
  • Added an optional directory argument to --dump-memory-ranges to support read-only install locations
  • Added decoding of RISC-V Zcb compressed instructions (required by kernels built with GCC 14)
  • Added fallback to read_reg in the GDB stub so monitor reg <name> works for any named register
  • Added --bash-completion to print a bash completion script for cartesi-machine
  • Added public C API constants CM_FLASH_DRIVE_MAX, CM_NVRAM_MAX, CM_MEMORY_RANGE_LABEL_MAX, CM_RTC_FREQ_DIV, and CM_CMIO_LOG2_MAX_OUTPUT_COUNT
  • Added the peripheral CM_AR_* address range constants, the CM_PMA_*_DID driver id constants, the HTIF device, command, shift, and mask constants, and the CM_DTB_BOOTARGS_* macros to the public C API
  • Added LuaCov-based coverage tracking for Lua code, integrated with the gcov report pipeline
  • Added a JSON-RPC C API coverage suite and converted test-cm-cli and test-evmu to the lester spec format
  • Added spec-cm-cli.lua covering every command-line option of cartesi-machine.lua

Fixed

  • Fixed leaf size in cartesi-hash-tree-hash, which was 8 instead of 32
  • Fixed read-only flash drives not being mounted with -o ro, which trapped guest writes and panicked init
  • Fixed missing #address-cells on the per-CPU interrupt-controller node in the DTB, silencing a dtc interrupt-provider lint warning
  • Fixed firmware reserved region in the DTB being too small for OpenSBI built with GCC 14
  • Fixed missing validation of memory range labels and of replace_memory_range arguments
  • Fixed boolean merging in merge_memory_range_opts so options can be explicitly overridden to false
  • Fixed --no-root-flash-drive bootargs substitution pattern
  • Fixed dump_pmas() still calling the removed get_memory_ranges() method
  • Fixed unanchored patterns matching --quiet and --assert-rolling-template
  • Fixed help() internally calling os.exit()
  • Fixed a typo in the cartesi-machine.lua cmio handling

Changed

  • Renamed the yield constants in cm.h and the Lua API from CM_CMIO_YIELD_* to CM_HTIF_YIELD_* (and the command suffix from COMMAND to CMD)
  • Renamed the PMA "device id" to "driver id" across the public API (CM_PMA_*_DID constants, driver_id in get_address_ranges)
  • Changed get_address_ranges to report per-range attributes (is_memory, is_device, is_readable, is_writeable, is_executable, is_read_idempotent, is_write_idempotent, and driver_id)
  • Replaced the --store-json-config/--load-json-config options with a format:<lua|json> sub-option on --store-config/--load-config, defaulting to the format inferred from the filename extension
  • Changed --initial-proof/--final-proof to default to Lua tables and accept format:<lua|json> and label: sub-options, where before they were dumped only as JSON
  • Reworked command-line option parsing so compound options such as --volume and --port-forward take key:value sub-options, and short options take a space-separated value (-u <name> instead of -u=<name>)
  • Changed memory ranges with an unset start to be placed past the end of RAM, rounded up to a power of two and aligned to their length, with flash drives and nvrams drawn from a shared pool
  • Changed log_send_cmio_response and verify_send_cmio_response to treat invalid responses and advance-state responses delivered outside an rx-accepted manual yield as no-ops, while the live send_cmio_response still rejects them as errors
  • Changed the uarch state-access layer to align misaligned accesses down to their natural size instead of rejecting them
  • Changed JSON-RPC error logs to omit the Boost source_location suffix at non-debug levels
  • Renamed all C++ headers from .h to .hpp, and renamed machine-c-api.{h,cpp} to cm.{h,cpp}
  • Bumped machine configuration archive version from 6 to 7 (for the new nvram and label fields)
  • Moved the /run/cartesi/memoryranges/ sysfs setup from the DTB init script into cartesi-init
  • Updated guest bootargs to bind uio_pdrv_genirq to generic-uio nodes
  • Bumped test linux.bin and rootfs.ext2 images

Removed

  • Removed the --store-json-config and --load-json-config options (folded into the format: sub-option of --store-config/--load-config)
  • Removed the --replace-flash-drive option, subsumed by --replace-memory-range
  • Removed CM_ERROR_REGEX_ERROR (covered by CM_ERROR_RUNTIME_ERROR) and CM_ERROR_SYSTEM_ERROR, and renumbered the error enum
  • Removed machine_reg_get_name in favor of get_address_name
  • Removed mark_dirty_page from the uarch and state-access interfaces

0.20.0 - 2026-04-09

Added

  • Added RISC0 zkVM integration for fraud proof verification, with C++, Rust, and Solidity implementations
  • Added cm_collect_mcycle_root_hashes and cm_collect_uarch_cycle_root_hashes C API functions for bulk hash collection with subtree bundling support
  • Added cm_get_version C API function to retrieve emulator semantic version at runtime
  • Added cm_write_word C API function to write a word by physical address
  • Added cm_get_node_hash C API function to get hash of a specific node in the hash tree
  • Added cm_clone_stored and cm_remove_stored C API functions to clone and remove stored machines
  • Added cm_read_console_output and cm_write_console_input C API functions for buffered console I/O
  • Added cm_get_hash and cm_get_concat_hash C API functions for general-purpose hashing
  • Added cm_get_hash_tree_stats C API function to retrieve hash tree statistics
  • Added cm_sharing_mode enum (CM_SHARING_NONE, CM_SHARING_CONFIG, CM_SHARING_ALL) to control on-disk vs in-memory machine state
  • Added cm_hash_function enum (CM_HASH_KECCAK256, CM_HASH_SHA256) to select the hash function used in the hash tree
  • Added CM_BREAK_REASON_CONSOLE_OUTPUT and CM_BREAK_REASON_CONSOLE_INPUT break reasons
  • Added CM_UARCH_BREAK_REASON_CYCLE_OVERFLOW break reason and CM_UARCH_CYCLE_MAX constant
  • Added CM_AR_SHADOW_STATE_START, CM_AR_SHADOW_STATE_LENGTH, CM_AR_SHADOW_REVERT_ROOT_HASH_START, CM_AR_SHADOW_TLB_START, CM_AR_SHADOW_TLB_LENGTH, CM_AR_PMAS_START, and CM_AR_PMAS_LENGTH address range constants
  • Added --no-reserve command line option to skip reserving swap memory for flash drives
  • Added --assert-version command line option to verify emulator version on startup
  • Added --create=<directory> command line option to create machines with fully on-disk state
  • Added --console-io=<key>:<value> command line option for console input/output redirection (to/from null, stdout, stderr, file descriptor, file, or buffer)
  • Added --dense-uarch-hashes command line option to print root hash at every uarch cycle
  • Added --processor, --ram, --dtb, --pmas, --uarch-ram, and --uarch-processor command line options with backing store configuration
  • Added --hash-tree command line option to configure hash function (keccak256 or sha256), sparse hash-tree and page hash-tree cache backing files
  • Added sharing mode support (none, config, all) to --load and --store command line options
  • Added clone option to --load for efficient machine cloning using reflinks/hardlinks
  • Added mke2fs option to --flash-drive for automatic ext2 filesystem formatting on init (defaults to true when no backing file is provided)
  • Added read_only option to --flash-drive to mark flash drives as read-only to host and guest
  • Added vectorized SIMD Keccak-256 and SHA-256 hashers with AVX2, AVX-512, and ARM NEON support
  • Added on-disk persistence for hash tree state via sparse hash-tree and page hash-tree cache files
  • Added backing store support for processor, DTB, and CMIO address ranges (previously only RAM and flash drives)
  • Added revert root hash to the shadow address range
  • Added lazy verification of TLB slots, hardening against attacker-crafted TLB state
  • Added computation of coverage for code run inside uarch
  • Added Cartesi EVM utility Lua API (evmu.lua) for encoding EVM call data
  • Added fuzzing infrastructure with LLVM libFuzzer, including fuzzers for machine config, shadow-state, and step verification
  • Added ankerl::unordered_dense third-party library for high-performance hash maps
  • Added bundled third-party pure Lua libraries: BINT big integer and Lester testing framework

Fixed

  • Fixed linting errors and compiler warnings with recent Clang
  • Fixed cm_jsonrpc_spawn_server not respecting the specific bind address
  • Fixed zombie processes left behind by Lua tests
  • Fixed interpreter PC alignment invariant not enforced at startup
  • Fixed interpreter fetch cache not being properly invalidated in some edge cases
  • Fixed iunrep coupled to mutable shadow state
  • Fixed assert_no_brk incorrectly asserting no pending interrupts when higher-privilege interrupts are expected
  • Fixed errno code not shown on fork() errors
  • Fixed issues with likely/unlikely macros by replacing them with C++20 [[likely]]/[[unlikely]] attributes

Changed

  • Bumped C++ standard from C++20 to C++23
  • Bumped base Docker image from Debian 12 (Bookworm) to Debian 13 (Trixie)
  • Bumped MARCHID version to 20
  • Bumped GCC RISC-V cross-compiler from 12 to 14
  • Bumped Boost library to 1.87 on macOS for compatibility
  • Bumped test rootfs to guest tools 0.17.2
  • Renamed cartesi-merkle-tree-hash binary to cartesi-hash-tree-hash
  • Renamed libcartesi_merkle_tree library to libcartesi_hash_tree (both static and shared)
  • Renamed --flash-drive option key filename to data_filename
  • Renamed image_filename to data_filename across all configs and CLI options
  • Renamed update_merkle_tree concurrency key to update_hash_tree
  • Renamed CM_TREE_LOG2_* constants to CM_HASH_TREE_LOG2_*
  • Renamed CM_PMA_* constants to CM_AR_* and enum from cm_pma_constant to cm_pmas_constant
  • Renamed cm_verify_merkle_tree to cm_verify_hash_tree
  • Renamed cm_get_memory_ranges to cm_get_address_ranges
  • Changed cm_create / cm_create_new signatures to accept a dir parameter for on-disk machine creation
  • Changed cm_load / cm_load_new signatures to accept a cm_sharing_mode parameter
  • Changed cm_store signature to accept a cm_sharing_mode parameter
  • Changed cm_replace_memory_range to accept a JSON config string instead of individual parameters
  • Changed cm_read_memory to allow reading across the entire address space (previously restricted to a single memory range)
  • Changed cm_get_proof signature to accept a log2_root_size parameter for proof slicing
  • Changed cm_verify_step to no longer require a machine pointer (now a static function)
  • Changed processor JSON config to nest register fields under processor.registers sub-object
  • Changed stored machine directory layout: new .dht, .dpt files per address range, new hash_tree.sht and hash_tree.phtc global files, and hash file is no longer generated
  • Changed cartesi-machine-stored-hash to compute hash by loading the full machine instead of reading the hash file
  • Changed flash drive label from mandatory to optional (defaults to driveX)
  • Changed step log format to include root hashes and mcycle count in the header for self-contained verification
  • Changed CSR registers to enforce WARL (Write Any Read Legal) semantics through a centralized legalization layer on reads and writes
  • Changed WFI instruction to clamp wait time to mcycle_end, preventing cycle overshooting
  • Replaced the Merkle tree implementation with a new hash tree supporting configurable hash functions
  • Replaced image_filename / shared fields with unified backing_store_config structure (data_filename, dht_filename, dpt_filename, shared, create, truncate)
  • Replaced htif_runtime_config with console_runtime_config supporting full I/O redirection
  • Replaced PMA naming throughout the codebase by "address range" / AR
  • Optimized SQRT instruction using digit-by-digit calculation
  • Optimized hash tree computation using OpenMP for threading and vectorized hashing
  • Optimized shadow register access in replay step by using caches

Removed

  • Removed hash file from stored machine snapshot directories (root hash is now computed on demand from the hash tree)
  • Removed default_ram_image and default_rootfs_image fields from --version-json output
  • Removed --htif-no-console-putchar command line option (replaced by --console-io=output_destination:to_null)
  • Removed --skip-root-hash-check and --skip-root-hash-store command line options
  • Removed cm_verify_dirty_page_maps C API function
  • Removed tlb_config, clint_config, plic_config, and htif_config from machine configuration
  • Removed tiny_sha3 third-party library (replaced by built-in Keccak-256 hasher)
  • Removed proof.lua Lua module
  • Removed circular_buffer implementation in favor of standard containers
  • Removed old Merkle tree implementation (complete-merkle-tree, full-merkle-tree, machine-merkle-tree, pristine-merkle-tree)

0.19.0 - 2024-05-27

Added

  • Added libluacartesi.a and libluacartesi_jsonrpc.a static libraries when installing to allow packaging statically linked Lua programs
  • Added --remote-spawn command line option to spawn remote machines
  • Added --remote-health-check command line option to check availability of remote machines
  • Added --store-json-config command line option to store machine configs to JSON files
  • Added --load-json-config command line option to load machine configs from JSON files
  • Added --server-fd command line option to JSON-RPC remote machine
  • Added --setpgid command line option to JSON-RPC remote machine
  • Added cartesi.tobase64, cartesi.frombase64, cartesi.tojson, and cartesi.fromjson Lua functions
  • Added various new methods to JSON-RPC remote machine interface to allow more precise management of remote machine processes
  • Added timeout support to JSON-RPC remote machine requests
  • Added capability to retrieve PID of spawned remote machines
  • Added support for VirtIO devices in JSON configs
  • Added the --log-step command line option to log multiple machine cycles
  • Added the cm_log_step and cm_verify_step methods to log multiple machine cycles and verify with ZK VMs
  • Added the cm_receive_cmio_request method, the counterpart of cm_send_cmio_response method
  • Added timeout support for jsonrpc requests

Fixed

  • Fixed various linting errors with the latest Clang static analyzer
  • Fixed broken link when running make bundle-boost
  • Fixed many broken links in the README and markdown files
  • Fixed issues when using --network option in Alpine guests
  • Fixed issue when using --assert-rolling-template
  • Fixed --skip-root-hash-store not skipping root hash computation
  • Fixed kernel panic bug when feeding 100k stdin inputs into VirtIO console
  • Fixed bug when trying to advance multiple inputs through the cartesi-machine CLI
  • Fixed compile errors when targeting Windows, Alpine Linux, and WebAssembly
  • Fixed conflicting symbols between libcartesi and libcartesi_jsonrpc
  • Fixed --sync-init-date and --virtio-console command line options
  • Fixed various issues when forking jsonrpc machines inside a Go environment
  • Fixed potential data races in multi-threaded environments

Changed

  • Optimized RISC-V instruction decoder to use token threading, computed goto, and big jump tables
  • Optimized RISC-V instruction fetcher to cache latest accessed pages
  • Refactored the code to use C++20 standard, which is now a minimum requirement
  • Refactored the public C API to be simpler and easier to use with other programming languages
  • Refactored the Lua API to make remote and local use the same API interface
  • Refactored and simplified many portions of the code, improving maintainability of the project
  • Changed default GCC compiler flags to better optimize the RISC-V interpreter
  • Changed flash drive start address configuration to be non-mandatory (it will be automatically chosen)
  • Changed sibling hashes ordering in JSON logs to match the expected ordering in Lua test suite
  • Changed rebind method of remote machines to support binding on port 0 and return the bound address
  • Changed to Debian RISC-V toolchain when compiling microarchitecture
  • Changed --remote-fork command line option to accept an address
  • Changed add-generated-files.diff to be applied with patch -Np1 to make packaging easier
  • Changed default machine config to include bootargs
  • Changed machine configs and access logs to be represented as JSON strings in the C API
  • Renamed --log-uarch-step command line option to --log-step-uarch
  • Renamed --log-uarch-reset command line option to --log-reset-uarch
  • Renamed --auto-uarch-reset command line option to --auto-reset-uarch
  • Renamed various C API functions, structs, and enumerations
  • Renamed jsonrpc-remote-cartesi-machine to cartesi-jsonrpc-machine
  • Renamed merkle-tree-hash to cartesi-merkle-tree-hash
  • Removed cartesi- prefix and versioning suffix from CI artifacts names
  • Revamped project README with more up-to-date explanations and simplified instructions
  • Changed help and configs to be printed to stdout instead of stderr
  • Changed the public C API to require less manual memory management
  • Improved documentation in the public C API header
  • Improved CI to use more parallel jobs when testing
  • Improved send_cmio_response bounds checking
  • Split iflags CSR into multiple CSRs
  • Bumped MARCHID version to 19
  • Updated test rootfs to guest tools 0.17.1

Removed

  • Removed publishing of Debian package artifacts in favor of official Linux package repositories
  • Removed use of cartesi/toolchain image
  • Removed automatic strip of binaries when performing make install (stripping should now be done when packaging)
  • Removed no4lvl from bootargs (Sv57 address translation is now disabled at interpreter level to fix NodeJS JIT issues)
  • Removed rootfstype=ext2 from bootargs, allowing use of root filesystems in other formats, such as Ext4 and SquashFS
  • Removed all *-defines.h headers
  • Removed all specific read/write of machine registers from the public API
  • Removed various C API functions
  • Removed dkjson Lua library (not needed since we have our own JSON encoding functions now)
  • Removed GDB documentation from the repository (moved to the wiki)
  • Removed internal development documentation from the README (moved to the wiki)
  • Removed many dead code segments after the refactoring

0.18.1 - 2024-08-12

Changed

  • Updated test rootfs to 0.16.1

0.18.0 - 2024-08-08

Added

  • Makefile target create-generated-files-patch to generate add-generated-files.diff patch
  • CI now creates and uploads add-generated-files.diff as artifact on tagged releases
  • Added unversioned symlinks to shared libraries in src directory

Changed

  • Updated test rootfs to 0.16.0
  • Updated outputs merkle height (for output unification v2)
  • Updated makefile to make it compatible with a homebrew formulae
  • Changed listening port to close immediately in JSONRPC shutdown
  • Bundled nlohmann JSON into third party directory
  • Rewritten jsonrpc-remote-machine using Boost ASIO
  • Updated test data due to input contract prev_randao field
  • Bumped MARCHID version to 18
  • Changed compile to release mode with debug info by default
  • Changed layout of uarch json logs

Fixed

  • Fixed regression saving snapshots on first machine yield
  • Fixed TIME_WAIT connections accumulation on Linux
  • Fixed Homebrew build
  • Ensured make clean target works with no submodules
  • Fixed TLB reads while computing hash with uarch
  • Fixed rollback remote machine for rejected advance state via the cli
  • Fixed prefix when brew is present in the system
  • Fixed system error when loading or saving snapshots

0.17.0 - 2024-04-23

Added

  • Added --no-rollback and --remote-fork options
  • Added rebind() API to JSONRPC
  • Added commit() API for discarding machine snapshots
  • Added send_cmio_response function
  • Added integration tests
  • Added C API to translate virtual address
  • Added optimizations for fdiv and fsqrt instructions for uarch
  • Added --env, --workdir, and --hostname command line options
  • Added new runtime option to skip storing machine root hash
  • Introduced the --user command line option
  • Used Sv39 address spacing by default to support nodejs and improve performance
  • Decoded uarch ECALL and EBREAK
  • Added support for VirtIO
  • Added VirtIO command line options
  • Added support for binding different host addresses in VirtIO net device
  • Added iunrep CSR for unreproducible machines, VirtIO configs to C/Lua APIs, VirtIO net device, VirtIO 9P device, VirtIO console device, and PLIC device
  • Made --volume create guest directory before mounting

Changed

  • Simplified solidity step generation
  • Split reasons for manual and auto yields
  • Reworked rollup and renamed it to cmio
  • Optimized out state accessor initialization in uarch interpret
  • Replaced uarch mmio with ecall
  • Included uarch-reset log in catalog.json
  • Combined uarch state accessors

Removed

  • Removed gRPC features
  • Removed unmaintained and broken benchmarks script

Fixed

  • Fixed ilog2 function which was always returning 0
  • Aligned output merkle tree depth with solidity
  • Corrected compile error with slirp=no on Linux
  • Allowed using --network in read-only filesystems
  • Resolved compile errors with WASI toolchain
  • Corrected reset_uarch documentation
  • Removed trailing comma in jsonrpc-discover.json
  • Fixed Homebrew libslirp options
  • Resolved build issue on macOS with macports lua-luarocks
  • Set yield_data typo
  • Fixed EADDRNOTAVAIL on rapid successive requests

Continuous Integration

  • Sped up uarch testing in CI.
  • Implemented vm.mmap_rnd_bits workaround for the ubuntu-22.04 runner.

0.16.1 - 2024-03-28

Fixed

  • Fixed amd64 debian package build in release mode

Changed

  • Made uarch compilation independent of release/debug build settings

0.16.0 - 2024-02-09

Added

  • Implemented the UARCH reset feature
  • Added soft yield runtime configuration using hints of the SRAIW instruction
  • Added shadow uarch state
  • Embedded the uarch RAM binary
  • Added instructions on how to build libcartesi.a in standalone
  • Supported compiling libcartesi_jsonrpc.a static library
  • Added file mapping and terminal support for Windows
  • Added the possibility to compile libcartesi without mmap()
  • Supported compiling libcartesi as a static library
  • Added memory range introspection
  • Introduced -it option for colored and bigger interactive terminal
  • Replaced MTD drives with PMEM drives
  • Initialized random entropy from the device tree
  • Added root hashes to catalog.json
  • Replaced proof with sibling_hashes

Changed

  • Built device tree automatically into the machine's ROM, eliminating the need for a ROM image
  • Enabled rollup by default
  • Updated libboost version to 1.81
  • Changed stored machine configs from protobuf to JSON
  • Removed remote-cartesi-machine-proxy
  • Moved uarch generated files to the uarch source directory
  • Organized all tests under the tests directory
  • Added emulator major and minor versions to the device tree
  • Used new rootfs provided by the tools repository
  • Used static libraries when compiling executables
  • Made it possible to compile libcartesi without threading support
  • Reimplemented a portable OS time function
  • Allowed compiling libcartesi without GRPC or Lua installed
  • Didn't expose internal symbols in the public C API
  • Added support for cross-compiling libcartesi
  • Removed std::filesystem use from libcartesi (unsupported by WASI)
  • Made termios non-mandatory in libcartesi (unsupported by WASI)
  • Improved makefile for packaging
  • Adjusted bootargs and renamed bootargs command line option
  • Introduced machine init and entrypoint config and options
  • Removed dump_pmas method
  • Removed Lua md5 dependency by using keccak instead
  • Simplified machine hash computation in tests
  • Replaced ROM with DTB
  • Bumped kernel and rootfs versions
  • Replaced crypto++ with tiny sha3 to compute Keccak hash
  • Replaced boost filesystem with std filesystem
  • Updated mongoose to 7.12 and refactored how it's bundled
  • Bundled nlohmann-json into third-party
  • Replaced libb64 with a custom base64 implementation
  • Removed the unused --json-steps option
  • Added support for compiling libcartesi to WebAssembly

Fixed

  • Made append options work when empty
  • Included missing climits in json-util.cpp
  • Correctly counted optional arguments
  • Fixed protoc compile errors on Ubuntu
  • Fixed the build on MacOS with Homebrew
  • Reserved memory for firmware M-mode code in FDT
  • Fixed lint errors and warnings

0.15.3 - 2024-01-25

Fixed

  • Fixed missing lua modules in docker image
  • Fixed upload and download of artifacts on CI
  • Fixed protoc compile errors on Ubuntu
  • Fixed build on MacOS with homebrew

0.15.2 - 2023-08-21

Changed

  • Made emulator patch version not impact machine root hash
  • Enabled line buffering for machine stdout in non-interactive mode

0.15.1 - 2023-08-17

Fixed

  • Fixed the list of files on the strip and patch installation step

0.15.0 - 2023-08-16

Fixed

  • Fixed compile errors with GCC 13.1
  • Fixed Lua path being mixed with different Lua version path
  • Fixed bug in get_proto_access_log()
  • Fixed lint warnings with CLANG 15
  • Introduced a workaround for high memory usage when running on QEMU ARM64
  • Added deb to release process
  • Fixed SIGTTOU handling on jsonrpc remote cartesi machine
  • Improved signal handling on remote cartesi machines

Added

  • Added fork support on the jsonrpc remote cartesi machine
  • Added log level control on the jsonrpc remote cartesi machine
  • Added static analysis for Lua code
  • Added code formatter for Lua code
  • Added support for to-be-closed variables for machine Lua API
  • Added --version and --version-json command-line options in cartesi-machine
  • Added --skip-root-hash-check command line option to speed up machine loading in tests
  • Added --skip-version-check command line option to allow testing old machine snapshots
  • Added --htif-no-console-putchar command line option
  • Added support for ARM64 docker images with depot.dev
  • Added support for publishing docker images on ghcr.io
  • Added tlb_get_entry_hot/cold_rel_addr
  • Added titles to jsonrpc components in jsonrpc-discover.json
  • Added proofs to uarch-riscv-tests json logs
  • Added support for Debian packages on the release
  • Added uarch-ram.bin to the release

Changed

  • Updated Lua version to 5.4
  • Use Lua path environment variables specific for version 5.4
  • Move uarch halt from assembler to C++
  • Ensure that uarch does not advance to the next micro instruction when iflags.H or iflags.Y is set
  • Made flash drive length and ROM image filename optional in machine config
  • Updated license/copyright notice in all source code
  • Changed docker base image from Ubuntu 22.04 to Debian Bookworm
  • Started using system provided protobuf and grpc libraries
  • Updated gprc-interfaces
  • Updated machine-emulator-defines
  • Refactored continuous integration workflow
  • Updated ROM, kernel, rootfs and tests versions on CI
  • Removed Boost Log dependency
  • Renamed concurrecy_config to concurrency_runtime_config
  • Optimized the use of machine::get_proof in uarch_record_state_access
  • Reverted iflags fixed point test in uarch-step

0.14.0 - 2023-05-03

Added

  • Added uarch halt flag
  • Added reset_uarch_state
  • Added and improved uarch tests
  • Added get_uarch_x_address
  • Added new jsonrpc-remote-cartesi-machine server
  • Added client support for new jsonrpc-remote-cartesi-machine server
  • Added command-line support for new jsonrpc-remote-cartesi-machine server in cartesi-machine

Changed

  • Optimized interpreter instruction fetch
  • Optimized interpreter hot loop to commit pc/mcycle only when necessary
  • Renamed voucher field: address -> destination
  • Removed uarch ROM
  • Improved uarch support on cartesi-machine.lua
  • Refactored uarch interpreter making it easier to port to Solidity
  • Changed return type of run_uarch from void to break reason
  • Renamed uarch related method names on machine class
  • Removed Alpine image generation from CI
  • Removed crypto++ library from third-party. Using system-installed library instead.
  • Changed --step command-line option to --step-uarch in cartesi-machine.lua, for consistency
  • Removed server-manager implementation from the emulator repository
  • Changed marchid to 0xf

0.13.0 - 2023-02-16

Added

  • Added support for RISC-V compressed instructions
  • Added support for debugging emulator with GDB
  • Added return to machine run API informing the reason for breaking the interpreter loop
  • Added many new tests to improve testing and coverage of the RISC-V interpreter and the C APIs
  • Added coverage workflow with summary reports to the CI
  • Added sanitize workflow to the CI, for catching leaks and undefined behavior
  • Added support for running RISC-V tests in parallel to the CI
  • Added support for passing NULL err_msg in all C APIs, meaning the error message won't be received

Fixed

  • Fixed interrupts servicing priority, to honor the same priority as in the RISC-V specification
  • Fixed some leaks and undefined behaviors caught by the new sanitize workflow
  • Fixed invalid SLLW, DIVW, REMW and REMUW instructions not raising illegal instruction exception
  • Fixed crash from inside the machine while trying to read shadow PMAs
  • Fixed off by one error in X registers when saving machine Lua configs
  • Fixed F registers not being handled in Lua configs
  • Fixed time advancing incorrectly while in interactive terminals

Changed

  • Optimized and refactored interpreter hot loop
  • Removed some dead code and simplified some portions of the code
  • Removed brkflag CSR
  • Changed marchid to 0xe
  • Changed RTC_FREQ_DIV from 100 to 8192
  • Changed RTC_CLOCK_FREQ from 100MHz to 128MHz
  • Replaced minstret by icycleinstret CSR
  • Reworked all int128 operations to use new portable int128 implementation
  • Converted all runtime error messages to lowercase
  • Improved CI to run faster using GitHub large runners

0.12.0 - 2022-11-25

Added

  • Added support for RISC-V floating-point instructions
  • Added read/write virtual memory methods
  • Added --quiet flag to cartesi-machine.lua
  • Added --assert-rolling-template flag to cartesi-machine.lua
  • Added the microarchitecture (RV64I) implementation
  • Added new optimizations build options on the Makefile
  • Added log messages to remote-cartesi-machine
  • Added check-in deadline and retry on remote-cartesi-machine
  • Added check-in deadline timeout on the server-manager

Changed

  • Updated emulator implementation with respect to latest RISC-V specification
  • Optimized Lua API to avoid allocating a uservalue for error messages for every API call
  • Lowered PMA addressable ranges from 64-bit to 56-bit
  • Changed marchid to 0xd
  • Improved error messages relating to PMAs
  • Removed DHD device
  • Refactored the shadow
  • Exposed TLB in the shadow
  • Optimized TLB implementation
  • Improved server-manager log messages

Fixed

  • Fixed many instruction inconsistencies with respect to the RISC-V specification.
  • Fixed overflow in page table entries due to using large physical address ranges.
  • Fixed crash when trying to use too many flash drives.

0.11.2 - 2022-10-28

Changed

  • Changed grpc lib version to v1.50

0.11.1 - 2022-09-28

Fixed

  • Fixed merkle-tree-hash linking on MacOSX
  • Changed the deadline used on GetProof and GetRootHash

0.11.0 - 2022-09-02

Added

  • Added method to get existing remote machine
  • Added no-remote-create and no-remote-destroy options to cartesi-machine.lua
  • Prevent linux from reserving 64Mi of memory when ram-length >= 128Mi
  • Added GRPC Health Check service on the server-manager
  • Added grpc-health-probe to the server-manager docker image

Fixed

  • Fixed MacOSX build

Changed

  • Enabled emulator TLB
  • Improved read_memory method to read all PMA types
  • Changed marchid to 0xc
  • Bumped server-manager server version
  • Bumped remote-machine server version

[0.10.1] - 2022-07-14

Fixed

  • Fix Lua bind of static methods for remote machines
  • Fix rollup-memory-range decoding of empty payloads at end of file
  • Fix server-manager version string

Changed

  • Improve server-manager concurrency violation messages

0.10.0 - 2022-07-04

Added

  • Added option to encode/decode exceptions to rollup-memory-range.lua
  • Added new tests/log-with-mtime-transition.lua

Fixed

  • Fixed HTIF iconsole read from machine state
  • Fixed cartesi/grpc.so so it can be loaded without cartesi.so
  • Fix mcycle display when printing final hash after step in cartesi-machine.lua
  • Fix cartesi.proof.word_splice_assert to check for old word value
  • Remove derived mtime and msip from CLINT peek returns so they are not reflected in Merkle tree
  • Fix clua_check_cm_merkle_tree_proof garbage in Lua stack after return
  • Fix clua_check_cm_access_log to save log_type
  • Fix dump_pmas() to write pristine pages to PMA files
  • Fix verify workflow on CI
  • Fixed link warning on MacOSX

Changed

  • Make sure HTIF calls to console getchar is only honored when it is enabled in iconsole
  • Simplified Lua bind
  • Simplified StartSession logic in server manager
  • Make HTIF console getchar react faster to input when enabled
  • Remove busy wait in interactive mode
  • Updated server-manager GRPC interface due to improvements on input exception handling
  • Updated docker images based on Ubuntu to version 22.04
  • Updated clang-format version to 14
  • Updated clang-tidy version to 14
  • Updated libboost version to 1.74
  • Improved clua_dumpstack to limit size of displayed string data and to escape unprintable chars
  • Improved machine_merkle_tree::dump_merkle_tree() to indent and print base address of each node
  • Removed active epoch index parameter from server-manager InspectRequest GRPC interface
  • Test rollup-init error handling in server-manager tests

0.9.0 - 2022-04-20

Added

  • Added rollup-exception handling to cartesi-machine.lua and tests
  • Added rollup-exception handling to server-manager

Fixed

  • Fixed machine store/load to include rollup memory ranges
  • Fixed make env to append to Lua paths rather than replace them
  • Fixed checkin behavior in remote-cartesi-machine-proxy

Changed

  • Changed cartesi-machine.lua to fail with exit code 1 when rollup exception is detected
  • Changed machine serialization to use protobuf instead of boost
  • Changed cartesi-machine.lua to save voucher and notice hashes on revert
  • Changed rollup-memory-range.lua to input/output JSON objects
  • Changed to LuaRocks for Lua dependencies
  • Changed grpc lib version to v1.45
  • Changed dhd and rollup fields in config to optional
  • Changed server-manager not to advance until first yield
  • Changed server-manager so NewSession accepts only stored machine directories (rather than machine configs)
  • Changed server-manager version from v0.1.0 to v0.2.0

0.8.0 - 2021-12-28

Added

  • Added control of concurrency to emulator runtime config
  • Added new remote-cartesi-machine-proxy
  • Added several new Merkle tree implementations with different flavors
  • Added new --log2-word-size option to merkle-tree-hash
  • Added new cartesi-server-manager to support input/output with rollups
  • Added coverage tests with gcc and clang
  • Added new --load-config and --store-config options to cartesi-machine.lua
  • Added new rollup device in emulator to support Cartesi Servers
  • Added rollup-memory-range.lua utility to encode/decode rollup inputs/outputs
  • Added more and better tests
  • Added new C API to machine class, exposed by libcartesi.so
  • Added support for simulating rollups advance/inspect state to cartesi-machine.lua

Fixed

  • Fixed missing method to get CSR addresses in Lua bind
  • Fixed missing DHD CSRs in Lua bind
  • Fixed potential mcycle overflow in emulator
  • Fixed machine::step by moving RTC interrupt handling from machine::run to interpret
  • Fixed gRPC threading by stopping/restarting server before/after fork in remote-cartesi-machine
  • Fixed terminal configuration in remote-cartesi-machine

Changed

  • Changed marchid to 9
  • Changed machine::run to only return on yield, halt, or when max_mcycle is reached
  • Changed WFI to noop to simplify code, thus eliminating flag I from iflags CSR
  • Changed cartesi-machine-server to remote-cartesi-machine
  • Changed Merkle tree proof structures to be more general
  • Changed code with improvements suggested by clang-tidy
  • Changed code with clang-format
  • Changed Lua bind to use C API, cartesi.so links to libcartesi.so
  • Changed from luapp to stock Lua interpreter
  • Changed remote-cartesi-machine to check-in with client when starting/rollback/snapshot
  • Changed machine::replace_flash_drive to machine::replace_memory_range
  • Changed dependency from system provided gRPC libraries to a specific version added to third-party dependencies

[Previous Versions]