Skip to content

Commit e0498aa

Browse files
committed
feat: implement root hashes context
1 parent c748e6d commit e0498aa

File tree

154 files changed

+2079
-2012
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+2079
-2012
lines changed

.clang-tidy

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
Checks: >-
22
boost*,
3-
-boost-use-ranges,
43
bugprone*,
54
-bugprone-easily-swappable-parameters,
6-
-bugprone-crtp-constructor-accessibility,
75
cert*,
86
-cert-int09-c,
97
clang-analyzer*,
10-
-clang-analyzer-optin.cplusplus.VirtualCall,
118
cppcoreguidelines*,
129
-cppcoreguidelines-avoid-magic-numbers,
1310
-cppcoreguidelines-owning-memory,
@@ -33,8 +30,6 @@ Checks: >-
3330
-modernize-use-nodiscard,
3431
-modernize-use-trailing-return-type,
3532
-modernize-avoid-c-arrays,
36-
-modernize-use-ranges,
37-
-modernize-use-integer-sign-comparison,
3833
performance*,
3934
-performance-enum-size,
4035
portability*,
@@ -43,6 +38,5 @@ Checks: >-
4338
-readability-identifier-length,
4439
-readability-magic-numbers,
4540
-readability-enum-initial-value,
46-
-readability-static-accessed-through-instance,
4741
WarningsAsErrors: >-
4842
*

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
build
1414
third-party/downloads
1515
src/cartesi-jsonrpc-machine
16-
src/cartesi-merkle-tree-hash
16+
src/cartesi-hash-tree-hash
1717

1818
doc/html
1919
doc/api.md

.github/workflows/build.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,6 @@ jobs:
209209
run: |
210210
docker run --rm -t -v cmio-templates:/tmp/cartesi-machine/tests/data cartesi/machine-emulator:tests /usr/share/cartesi-machine/tests/scripts/test-cmio.sh cartesi-jsonrpc-machine cartesi-machine lua
211211
212-
- name: Run Merkle tree tests
213-
run: |
214-
docker run --rm -t ${{ github.repository_owner }}/machine-emulator:tests test-merkle-tree-hash --log2-root-size=30 --log2-leaf-size=12 --input=/usr/bin/test-merkle-tree-hash --hash-function=keccak256
215-
docker run --rm -t ${{ github.repository_owner }}/machine-emulator:tests test-merkle-tree-hash --log2-root-size=30 --log2-leaf-size=12 --input=/usr/bin/test-merkle-tree-hash --hash-function=sha256
216-
217212
- name: Run C API tests
218213
run: |
219214
docker run --rm -t ${{ github.repository_owner }}/machine-emulator:tests test-machine-c-api
@@ -378,11 +373,6 @@ jobs:
378373
run: |
379374
docker run --platform linux/arm64 --rm -t -v cmio-templates:/tmp/cartesi-machine/tests/data cartesi/machine-emulator:tests /usr/share/cartesi-machine/tests/scripts/test-cmio.sh cartesi-jsonrpc-machine cartesi-machine lua
380375
381-
- name: Run Merkle tree tests
382-
run: |
383-
docker run --platform linux/arm64 --rm -t ${{ github.repository_owner }}/machine-emulator:tests test-merkle-tree-hash --log2-root-size=30 --log2-leaf-size=12 --input=/usr/bin/test-merkle-tree-hash --hash-function=keccak256
384-
docker run --platform linux/arm64 --rm -t ${{ github.repository_owner }}/machine-emulator:tests test-merkle-tree-hash --log2-root-size=30 --log2-leaf-size=12 --input=/usr/bin/test-merkle-tree-hash --hash-function=sha256
385-
386376
- name: Run C API tests
387377
run: |
388378
docker run --platform linux/arm64 --rm -t ${{ github.repository_owner }}/machine-emulator:tests test-machine-c-api
@@ -554,7 +544,7 @@ jobs:
554544
555545
- name: Run coverage
556546
run: |
557-
docker run --name coverage-report -t ${{ github.repository_owner }}/machine-emulator:coverage make -j1 test-save-and-load test-machine test-hash test-lua test-jsonrpc test-c-api coverage-machine test-uarch-rv64ui test-uarch-interpreter coverage-uarch coverage-report coverage=yes
547+
docker run --name coverage-report -t ${{ github.repository_owner }}/machine-emulator:coverage make -j1 test-save-and-load test-machine test-lua test-jsonrpc test-c-api coverage-machine test-uarch-rv64ui test-uarch-interpreter coverage-uarch coverage-report coverage=yes
558548
docker cp coverage-report:/usr/src/emulator/tests/build/coverage .
559549
docker rm coverage-report
560550

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ build
1313
pkg
1414
third-party/downloads
1515
src/cartesi-jsonrpc-machine
16-
src/cartesi-merkle-tree-hash
16+
src/cartesi-hash-tree-hash
1717
src/tests/test-machine-c-api
18-
src/tests/test-merkle-tree-hash
1918

2019
doc/html
2120
doc/api.md

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ INSTALL_DIR= cp -RP
7373
SYMLINK= ln -sf
7474
CHMOD_EXEC= chmod 0755
7575

76-
EMU_TO_BIN= src/cartesi-jsonrpc-machine src/cartesi-merkle-tree-hash
76+
EMU_TO_BIN= src/cartesi-jsonrpc-machine src/cartesi-hash-tree-hash
7777
EMU_TO_LIB= src/$(LIBCARTESI_SO) src/$(LIBCARTESI_SO_JSONRPC)
7878
EMU_TO_LIB_A= src/libcartesi.a src/libcartesi_jsonrpc.a src/libluacartesi.a src/libluacartesi_jsonrpc.a
7979
EMU_LUA_TO_BIN= src/cartesi-machine.lua src/cartesi-machine-stored-hash.lua
@@ -83,7 +83,7 @@ EMU_TO_LUA_CARTESI_CPATH= src/cartesi/jsonrpc.so
8383
EMU_TO_INC= $(addprefix src/,jsonrpc-machine-c-api.h machine-c-api.h machine-c-version.h)
8484
UARCH_TO_SHARE= uarch-ram.bin
8585

86-
TESTS_TO_BIN= tests/build/misc/test-merkle-tree-hash tests/build/misc/test-machine-c-api
86+
TESTS_TO_BIN= tests/build/misc/test-machine-c-api
8787
TESTS_LUA_TO_LUA_PATH=tests/lua/cartesi
8888
TESTS_LUA_TO_TEST_LUA_PATH=$(wildcard tests/lua/*.lua)
8989
TESTS_SCRIPTS_TO_TEST_SCRIPTS_PATH=$(wildcard tests/scripts/*.sh)

src/Makefile

Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ endif
9797

9898
SO_EXT=dylib
9999
LIBCARTESI_LDFLAGS=-install_name '@rpath/$(LIBCARTESI)'
100-
LIBCARTESI_MERKLE_TREE_LDFLAGS=-install_name '@rpath/$(LIBCARTESI_MERKLE_TREE)'
100+
LIBCARTESI_HASH_TREE_LDFLAGS=-install_name '@rpath/$(LIBCARTESI_HASH_TREE)'
101101
LIBCARTESI_JSONRPC_LDFLAGS=-install_name '@rpath/$(LIBCARTESI_JSONRPC)' -Wl,-rpath,@loader_path
102102
LUACARTESI_LDFLAGS=-install_name '@rpath/cartesi.so'
103103
LUACARTESI_JSONRPC_LDFLAGS=-install_name '@rpath/cartesi/jsonrpc.so' -Wl,-rpath,@loader_path/..
@@ -123,7 +123,7 @@ SLIRP_INC=
123123
SLIRP_LIB=-lslirp
124124
SO_EXT=so
125125
LIBCARTESI_LDFLAGS=
126-
LIBCARTESI_MERKLE_TREE_LDFLAGS=
126+
LIBCARTESI_HASH_TREE_LDFLAGS=
127127
LIBCARTESI_JSONRPC_LDFLAGS=-Wl,-rpath,'$$ORIGIN'
128128
LUACARTESI_LDFLAGS=
129129
LUACARTESI_JSONRPC_LDFLAGS=-Wl,-rpath,'$$ORIGIN/..'
@@ -132,7 +132,7 @@ PROFILE_DATA=
132132
endif
133133

134134
LIBCARTESI=libcartesi-$(EMULATOR_VERSION_MAJOR).$(EMULATOR_VERSION_MINOR).$(SO_EXT)
135-
LIBCARTESI_MERKLE_TREE=libcartesi_merkle_tree-$(EMULATOR_VERSION_MAJOR).$(EMULATOR_VERSION_MINOR).$(SO_EXT)
135+
LIBCARTESI_HASH_TREE=libcartesi_hash_tree-$(EMULATOR_VERSION_MAJOR).$(EMULATOR_VERSION_MINOR).$(SO_EXT)
136136
LIBCARTESI_JSONRPC=libcartesi_jsonrpc-$(EMULATOR_VERSION_MAJOR).$(EMULATOR_VERSION_MINOR).$(SO_EXT)
137137

138138
ifeq ($(slirp),yes)
@@ -148,18 +148,18 @@ DEFS+=-DNO_SLIRP
148148
endif
149149

150150
LIBCARTESI_LIBS=$(LIBCARTESI_COMMON_LIBS)
151-
LIBCARTESI_MERKLE_TREE_LIBS=
151+
LIBCARTESI_HASH_TREE_LIBS=
152152
LIBCARTESI_JSONRPC_LIBS=
153153
LUACARTESI_LIBS=$(LIBCARTESI_COMMON_LIBS)
154154
LUACARTESI_JSONRPC_LIBS=
155155
CARTESI_JSONRPC_MACHINE_LIBS=$(LIBCARTESI_COMMON_LIBS)
156-
CARTESI_MERKLE_TREE_HASH_LIBS=
157-
158-
#DEFS+= -DMT_ALL_DIRTY
156+
CARTESI_HASH_TREE_HASH_LIBS=
159157

160158
C_WARNS=-Wall -Wextra -Wpedantic
161-
CXX_WARNS=$(C_WARNS) -Wno-missing-field-initializers
162-
CLANG_TIDY_WARNS=-Wthread-safety -Wglobal-constructors
159+
# C_WARNS+=-Wshadow -Wconversion -Wsign-conversion -Wsign-promo -Wuseless-cast -Wformat=2
160+
CXX_WARNS=$(C_WARNS)
161+
162+
CLANG_TIDY_WARNS=-Wthread-safety -Wglobal-constructors -Wundef -Wredundant-decls -Wextra-semi
163163

164164
# Place our include directories before the system's
165165
INCS+= \
@@ -285,9 +285,7 @@ PGO_WORKLOAD=\
285285
whetstone 25000
286286

287287
LINTER_IGNORE_SOURCES=
288-
LINTER_IGNORE_HEADERS=interpret-jump-table.h
289288
LINTER_SOURCES=$(filter-out $(LINTER_IGNORE_SOURCES),$(strip $(wildcard *.cpp) $(wildcard *.c)))
290-
LINTER_HEADERS=$(filter-out $(LINTER_IGNORE_HEADERS),$(strip $(wildcard *.hpp) $(wildcard *.h)))
291289

292290
CLANG_TIDY=clang-tidy
293291
CLANG_TIDY_TARGETS=$(patsubst %.cpp,%.clang-tidy,$(patsubst %.c,%.clang-tidy,$(LINTER_SOURCES)))
@@ -305,7 +303,6 @@ STYLUA_FLAGS=--indent-type Spaces --collapse-simple-statement Always --respect-i
305303

306304
EMPTY:=
307305
SPACE:=$(EMPTY) $(EMPTY)
308-
CLANG_TIDY_HEADER_FILTER=$(CURDIR)/($(subst $(SPACE),|,$(LINTER_HEADERS)))
309306

310307
ifeq ($(threads),yes)
311308
CFLAGS+=$(PTHREAD_CFLAGS)
@@ -344,15 +341,15 @@ SOLDFLAGS+=$(MYSOLDFLAGS)
344341
LIBLDFLAGS+=$(MYLIBLDFLAGS)
345342
EXELDFLAGS+=$(MYEXELDFLAGS)
346343

347-
all: libcartesi libcartesi_merkle_tree libcartesi_jsonrpc c-api luacartesi cartesi-jsonrpc-machine hash
344+
all: libcartesi libcartesi_hash_tree libcartesi_jsonrpc c-api luacartesi cartesi-jsonrpc-machine hash
348345

349346
luacartesi: libluacartesi.a cartesi.so libluacartesi_jsonrpc.a cartesi/jsonrpc.so
350347

351348
jsonrpc: cartesi/jsonrpc.so cartesi-jsonrpc-machine
352349

353-
hash: cartesi-merkle-tree-hash
350+
hash: cartesi-hash-tree-hash
354351

355-
c-api: $(LIBCARTESI) $(LIBCARTESI_MERKLE_TREE) $(LIBCARTESI_JSONRPC)
352+
c-api: $(LIBCARTESI) $(LIBCARTESI_HASH_TREE) $(LIBCARTESI_JSONRPC)
356353

357354
.PHONY: all generate use clean lint format format-lua check-format check-format-lua luacartesi hash c-api compile_flags.txt
358355

@@ -373,7 +370,7 @@ LIBCARTESI_OBJS:= \
373370
os-mmap.o \
374371
os-filesystem.o \
375372
plic-address-range.o \
376-
pristine-merkle-tree.o \
373+
back-merkle-tree.o \
377374
replay-step-state-access-interop.o \
378375
send-cmio-response.o \
379376
keccak-256-hasher.o \
@@ -404,17 +401,14 @@ LUACARTESI_OBJS:= \
404401
clua-cartesi.o \
405402
$(CARTESI_CLUA_OBJS)
406403

407-
LIBCARTESI_MERKLE_TREE_OBJS:= \
404+
LIBCARTESI_HASH_TREE_OBJS:= \
408405
keccak-256-hasher.o \
409406
sha-256-hasher.o \
410407
is-pristine.o \
411408
back-merkle-tree.o \
412-
pristine-merkle-tree.o \
413-
complete-merkle-tree.o \
414-
full-merkle-tree.o
415409

416-
CARTESI_MERKLE_TREE_HASH_OBJS:= \
417-
merkle-tree-hash.o
410+
CARTESI_HASH_TREE_HASH_OBJS:= \
411+
hash-tree-hash.o
418412

419413
LIBCARTESI_JSONRPC_OBJS:= \
420414
jsonrpc-machine.o \
@@ -435,7 +429,7 @@ CARTESI_JSONRPC_MACHINE_OBJS:= \
435429
ifeq ($(gperf),yes)
436430
DEFS+=-DGPERF
437431
LIBCARTESI_LIBS+=-lprofiler
438-
LIBCARTESI_MERKLE_TREE_LIBS+=-lprofiler
432+
LIBCARTESI_HASH_TREE_LIBS+=-lprofiler
439433
LIBCARTESI_JSONRPC_LIBS+=-lprofiler
440434
LUACARTESI_LIBS+=-lprofiler
441435
LUACARTESI_JSONRPC_LIBS+=-lprofiler
@@ -448,10 +442,10 @@ so-version:
448442
@echo $(EMULATOR_VERSION_MAJOR).$(EMULATOR_VERSION_MINOR)
449443

450444
libcartesi: libcartesi.a libcartesi.$(SO_EXT)
451-
libcartesi.$(SO_EXT): $(LIBCARTESI) $(LIBCARTESI_MERKLE_TREE)
445+
libcartesi.$(SO_EXT): $(LIBCARTESI) $(LIBCARTESI_HASH_TREE)
452446
ln -sf $< $@
453-
libcartesi_merkle_tree: libcartesi_merkle_tree.a libcartesi_merkle_tree.$(SO_EXT)
454-
libcartesi_merkle_tree.$(SO_EXT): $(LIBCARTESI_MERKLE_TREE)
447+
libcartesi_hash_tree: libcartesi_hash_tree.a libcartesi_hash_tree.$(SO_EXT)
448+
libcartesi_hash_tree.$(SO_EXT): $(LIBCARTESI_HASH_TREE)
455449
ln -sf $< $@
456450
libcartesi_jsonrpc: libcartesi_jsonrpc.a libcartesi_jsonrpc.$(SO_EXT)
457451
libcartesi_jsonrpc.$(SO_EXT): $(LIBCARTESI_JSONRPC)
@@ -460,7 +454,7 @@ libcartesi_jsonrpc.$(SO_EXT): $(LIBCARTESI_JSONRPC)
460454
libcartesi.a: $(LIBCARTESI_OBJS)
461455
$(AR) $@ $^
462456

463-
libcartesi_merkle_tree.a: $(LIBCARTESI_MERKLE_TREE_OBJS)
457+
libcartesi_hash_tree.a: $(LIBCARTESI_HASH_TREE_OBJS)
464458
$(AR) $@ $^
465459

466460
libcartesi_jsonrpc.a: $(LIBCARTESI_JSONRPC_OBJS)
@@ -472,8 +466,8 @@ libluacartesi.a: $(LUACARTESI_OBJS)
472466
libluacartesi_jsonrpc.a: $(LUACARTESI_JSONRPC_OBJS)
473467
$(AR) $@ $^
474468

475-
$(LIBCARTESI_MERKLE_TREE): $(LIBCARTESI_MERKLE_TREE_OBJS)
476-
$(CXX) -o $@ $^ $(LIBCARTESI_MERKLE_TREE_LIBS) $(LDFLAGS) $(LIBCARTESI_MERKLE_TREE_LDFLAGS) $(LIBLDFLAGS)
469+
$(LIBCARTESI_HASH_TREE): $(LIBCARTESI_HASH_TREE_OBJS)
470+
$(CXX) -o $@ $^ $(LIBCARTESI_HASH_TREE_LIBS) $(LDFLAGS) $(LIBCARTESI_HASH_TREE_LDFLAGS) $(LIBLDFLAGS)
477471

478472
$(LIBCARTESI): $(LIBCARTESI_OBJS)
479473
$(CXX) -o $@ $^ $(LIBCARTESI_LIBS) $(LDFLAGS) $(LIBCARTESI_LDFLAGS) $(LIBLDFLAGS)
@@ -536,8 +530,8 @@ $(PROFILE_DATA):
536530
llvm-profdata merge -output=default.profdata default*.profraw
537531
endif
538532

539-
cartesi-merkle-tree-hash: $(CARTESI_MERKLE_TREE_HASH_OBJS) libcartesi_merkle_tree.a
540-
$(CXX) -o $@ $^ $(CARTESI_MERKLE_TREE_HASH_LIBS) $(LDFLAGS) $(EXELDFLAGS)
533+
cartesi-hash-tree-hash: $(CARTESI_HASH_TREE_HASH_OBJS) libcartesi_hash_tree.a
534+
$(CXX) -o $@ $^ $(CARTESI_HASH_TREE_HASH_LIBS) $(LDFLAGS) $(EXELDFLAGS)
541535

542536
cartesi-jsonrpc-machine: $(CARTESI_JSONRPC_MACHINE_OBJS) libcartesi_jsonrpc.a libcartesi.a
543537
$(CXX) -o $@ $^ $(CARTESI_JSONRPC_MACHINE_LIBS) $(LDFLAGS) $(EXELDFLAGS)
@@ -556,12 +550,12 @@ jsonrpc-discover.cpp: jsonrpc-discover.json
556550
echo '} // namespace cartesi' >> jsonrpc-discover.cpp
557551

558552
%.clang-tidy: %.cpp machine-c-version.h interpret-jump-table.h
559-
@$(CLANG_TIDY) --header-filter='$(CLANG_TIDY_HEADER_FILTER)' $(CLANG_TIDY_FLAGS) $< -- $(CXXFLAGS) $(CLANG_TIDY_WARNS) $(LUA_INC) -DCLANG_TIDY_LINT 2>/dev/null
553+
@$(CLANG_TIDY) $(CLANG_TIDY_FLAGS) $< -- $(CXXFLAGS) $(CLANG_TIDY_WARNS) $(LUA_INC) -DCLANG_TIDY_LINT 2>/dev/null
560554
@$(CXX) $(CXXFLAGS) $(LUA_INC) $< -MM -MT $@ -MF $@.d > /dev/null 2>&1
561555
@touch $@
562556

563557
%.clang-tidy: %.c
564-
@$(CLANG_TIDY) --header-filter='$(CLANG_TIDY_HEADER_FILTER)' $(CLANG_TIDY_FLAGS) $< -- $(CFLAGS) $(CLANG_TIDY_WARNS) -DCLANG_TIDY_LINT 2>/dev/null
558+
@$(CLANG_TIDY) $(CLANG_TIDY_FLAGS) $< -- $(CFLAGS) $(CLANG_TIDY_WARNS) -DCLANG_TIDY_LINT 2>/dev/null
565559
@$(CC) $(CFLAGS) $< -MM -MT $@ -MF $@.d > /dev/null 2>&1
566560
@touch $@
567561

@@ -619,7 +613,7 @@ clean-libcartesi: clean-objs
619613
@rm -f *.so *.a cartesi/*.so *.dylib
620614

621615
clean-executables:
622-
@rm -f cartesi-jsonrpc-machine cartesi-merkle-tree-hash compute-uarch-pristine-hash
616+
@rm -f cartesi-jsonrpc-machine cartesi-hash-tree-hash compute-uarch-pristine-hash
623617

624618
clean-coverage:
625619
@rm -f *.profdata *.profraw *.gcda *.gcov coverage.info coverage.txt

src/access-log.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
/// \brief State access log implementation
2222

2323
#include <algorithm>
24-
#include <cassert>
2524
#include <cstdint>
26-
#include <cstring>
2725
#include <optional>
2826
#include <stdexcept>
2927
#include <string>
@@ -32,7 +30,9 @@
3230

3331
#include <boost/container/small_vector.hpp>
3432

33+
#include "assert-printf.h"
3534
#include "bracket-note.h"
35+
#include "hash-tree-constants.h"
3636
#include "hash-tree.h"
3737
#include "machine-c-api.h"
3838
#include "machine-hash.h"
@@ -173,10 +173,10 @@ class access {
173173
/// \param root_hash Hash to be used as the root of the proof.
174174
/// \return The corresponding proof
175175
proof_type make_proof(const machine_hash root_hash) const {
176-
// the access can be of data smaller than the merkle tree word size
177-
// however, the proof must be at least as big as the merkle tree word size
176+
// the access can be of data smaller than the hash tree word size
177+
// however, the proof must be at least as big as the hash tree word size
178178
const int proof_log2_size = std::max(m_log2_size, HASH_TREE_LOG2_WORD_SIZE);
179-
// the proof address is the access address aligned to the merkle tree word size
179+
// the proof address is the access address aligned to the hash tree word size
180180
const uint64_t proof_address = m_address & ~(HASH_TREE_WORD_SIZE - 1);
181181
if (!m_sibling_hashes.has_value()) {
182182
throw std::runtime_error("can't make proof if access doesn't have sibling hashes");

src/address-range-defines.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,6 @@
5656
#ifndef EXPAND_UINT64_C
5757
#define EXPAND_UINT64_C(a) UINT64_C(a)
5858
#endif
59+
5960
// NOLINTEND(cppcoreguidelines-macro-usage,cppcoreguidelines-macro-to-enum,modernize-macro-to-enum)
6061
#endif /* end of include guard: AR_DEFINES_H */

src/address-range.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,19 @@
1717
#ifndef ADDRESS_RANGE_H
1818
#define ADDRESS_RANGE_H
1919

20+
#include <algorithm>
2021
#include <array>
2122
#include <bit>
2223
#include <cinttypes>
2324
#include <cstdint>
2425
#include <tuple>
2526
#include <utility>
2627

28+
#include "address-range-constants.h"
2729
#include "assert-printf.h"
2830
#include "i-device-state-access.h"
2931
#include "interpret.h"
32+
#include "pmas-constants.h"
3033
#include "pmas.h"
3134

3235
#ifndef MICROARCHITECTURE
@@ -63,7 +66,7 @@ class address_range {
6366
}
6467

6568
// NOLINTNEXTLINE(hicpp-use-equals-default,modernize-use-equals-default)
66-
constexpr virtual ~address_range() {}; // = default; // doesn't work due to bug in gcc
69+
constexpr virtual ~address_range() {} // = default; // doesn't work due to bug in gcc
6770

6871
template <typename ABRT, size_t N, typename... ARGS>
6972
[[noreturn]]
@@ -399,4 +402,4 @@ static inline auto make_address_range(const char *description, uint64_t start, u
399402

400403
} // namespace cartesi
401404

402-
#endif // OCCUPIED_ADDRESS_RANGE_H
405+
#endif // ADDRESS_RANGE_H

0 commit comments

Comments
 (0)