Skip to content

Commit

Permalink
refactor!: Remove remote-proxy-machine-proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
vfusco committed Oct 11, 2023
1 parent 38241be commit 670e3f4
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 1,026 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Build device tree automatically into machine's ROM, eliminating the need for a ROM image
- Enabled rollup by default
- Updated libboost version to 1.81
- Removed remote-cartesi-machine-proxy

## [0.15.2] - 2023-08-21
### Changed
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG SANITIZE=no
RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install --no-install-recommends -y \
build-essential vim wget git clang-tidy-15 clang-format-15 lcov \
libreadline-dev libboost-coroutine1.81-dev libboost-context1.81-dev \
libreadline-dev libboost-context1.81-dev \
libboost-filesystem1.81-dev libssl-dev libc-ares-dev zlib1g-dev \
ca-certificates automake libtool patchelf cmake pkg-config lua5.4 liblua5.4-dev \
libgrpc++-dev libprotobuf-dev protobuf-compiler-grpc \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ CHMOD_EXEC= chmod 0755
CHMOD_DATA= chmod 0644
STRIP_EXEC= strip -x

EMU_TO_BIN= jsonrpc-remote-cartesi-machine remote-cartesi-machine remote-cartesi-machine-proxy merkle-tree-hash
EMU_TO_BIN= jsonrpc-remote-cartesi-machine remote-cartesi-machine merkle-tree-hash
EMU_TO_LIB= $(LIBCARTESI_SO_$(UNAME)) $(LIBCARTESI_SO_GRPC_$(UNAME))
EMU_LUA_TO_BIN= cartesi-machine.lua cartesi-machine-stored-hash.lua rollup-memory-range.lua
EMU_LUA_TEST_TO_BIN= cartesi-machine-tests.lua uarch-riscv-tests.lua
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Obs: Please note that Apple Clang Version number does not follow upstream LLVM/C

```
apt-get install build-essential wget git clang-tidy-15 clang-format-15 \
libreadline-dev libboost-coroutine1.81-dev libboost-context1.81-dev \
libreadline-dev libboost-context1.81-dev \
libboost-filesystem1.81-dev libssl-dev libc-ares-dev zlib1g-dev \
ca-certificates automake libtool patchelf cmake pkg-config lua5.4 liblua5.4-dev \
libgrpc++-dev libprotobuf-dev protobuf-compiler-grpc \
Expand Down
20 changes: 4 additions & 16 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ PROTOBUF_LIB_Darwin:=-L/opt/local/lib -lprotobuf -lpthread
endif
endif

BOOST_CORO_LIB_Darwin:=$(BOOST_LIB_DIR_Darwin) -lboost_coroutine-mt -lboost_context-mt
BOOST_FILESYSTEM_LIB_Darwin:=$(BOOST_LIB_DIR_Darwin) -lboost_system-mt -lboost_filesystem-mt
BOOST_PROCESS_LIB_Darwin:=-lpthread
LIBCARTESI_Darwin=libcartesi-$(EMULATOR_VERSION_MAJOR).$(EMULATOR_VERSION_MINOR).dylib
Expand All @@ -106,7 +105,6 @@ CC_Linux=gcc
CXX_Linux=g++
INCS_Linux=
FS_LIB_Linux=-lstdc++fs
BOOST_CORO_LIB_Linux:=-lboost_coroutine -lboost_context
BOOST_FILESYSTEM_LIB_Linux:=-lboost_system -lboost_filesystem
BOOST_PROCESS_LIB_Linux:=-lpthread
BOOST_INC_Linux=
Expand All @@ -132,7 +130,6 @@ PROFILE_DATA_Linux=
CC=$(CC_$(UNAME))
CXX=$(CXX_$(UNAME))
SOLDFLAGS:=$(SOLDFLAGS_$(UNAME)) $(GCLDFLAGS)
BOOST_CORO_LIB=$(BOOST_CORO_LIB_$(UNAME))
BOOST_PROCESS_LIB=$(BOOST_PROCESS_LIB_$(UNAME))
BOOST_FILESYSTEM_LIB=$(BOOST_FILESYSTEM_LIB_$(UNAME))
BOOST_INC=$(BOOST_INC_$(UNAME))
Expand Down Expand Up @@ -163,7 +160,6 @@ LUACARTESI_GRPC_LIBS:=$(LIBCARTESI_LIB) $(CRYPTOPP_LIB) $(LIBCARTESI_GRPC_LIB)
LUACARTESI_JSONRPC_LIBS:=$(LIBCARTESI_LIB) $(CRYPTOPP_LIB) $(B64_LIB)
REMOTE_CARTESI_MACHINE_LIBS:=$(CRYPTOPP_LIB) $(GRPC_LIB) $(PROTOBUF_LIB) $(B64_LIB)
JSONRPC_REMOTE_CARTESI_MACHINE_LIBS:=$(CRYPTOPP_LIB) $(B64_LIB)
REMOTE_CARTESI_MACHINE_PROXY_LIBS:=$(CRYPTOPP_LIB) $(GRPC_LIB) $(PROTOBUF_LIB) $(BOOST_CORO_LIB) -ldl
TEST_MACHINE_C_API_LIBS:=$(LIBCARTESI_LIB) $(CRYPTOPP_LIB) $(LIBCARTESI_GRPC_LIB) $(BOOST_PROCESS_LIB) $(BOOST_FILESYSTEM_LIB) $(B64_LIB)
HASH_LIBS:=$(CRYPTOPP_LIB)

Expand Down Expand Up @@ -523,7 +519,7 @@ luacartesi-pgo:
$(MAKE) --no-print-directory use
$(MAKE) clean-profile

grpc: cartesi/jsonrpc.so cartesi/grpc.so remote-cartesi-machine remote-cartesi-machine-proxy
grpc: cartesi/jsonrpc.so cartesi/grpc.so remote-cartesi-machine

jsonrpc: cartesi/jsonrpc.so jsonrpc-remote-cartesi-machine

Expand Down Expand Up @@ -556,11 +552,6 @@ $(PROTO_OBJS): CXXFLAGS += -Wno-zero-length-array -Wno-unused-parameter -Wno-de

PROTO_SOURCES:=$(PROTO_OBJS:.o=.cc)

REMOTE_CARTESI_MACHINE_PROXY_OBJS:= \
$(GRPC_GEN_OBJS) \
$(PROTOBUF_GEN_OBJS) \
remote-machine-proxy.o

REMOTE_CARTESI_MACHINE_OBJS:= \
$(GRPC_GEN_OBJS) \
$(PROTOBUF_GEN_OBJS) \
Expand Down Expand Up @@ -699,10 +690,7 @@ $(BUILDDIR)/lib/mongoose.o: CFLAGS := $(patsubst %-std=c99,%,$(CFLAGS))
jsonrpc-remote-cartesi-machine: $(JSONRPC_REMOTE_CARTESI_MACHINE_OBJS)
$(CXX) $(LDFLAGS) $(CARTESI_EXECUTABLE_LDFLAGS) -o $@ $(JSONRPC_REMOTE_CARTESI_MACHINE_OBJS) $(JSONRPC_REMOTE_CARTESI_MACHINE_LIBS)

remote-cartesi-machine-proxy: $(REMOTE_CARTESI_MACHINE_PROXY_OBJS)
$(CXX) $(LDFLAGS) $(CARTESI_EXECUTABLE_LDFLAGS) -o $@ $(REMOTE_CARTESI_MACHINE_PROXY_OBJS) $(REMOTE_CARTESI_MACHINE_PROXY_LIBS)

remote-cartesi-machine remote-cartesi-machine-proxy: CXXFLAGS := $(GRPC_INC) $(CXXFLAGS)
remote-cartesi-machine: CXXFLAGS := $(GRPC_INC) $(CXXFLAGS)

tests/test-machine-c-api: $(TEST_MACHINE_C_API_OBJS) $(LIBCARTESI) $(LIBCARTESI_GRPC)
$(CXX) $(LDFLAGS) $(CARTESI_EXECUTABLE_LDFLAGS) -o $@ $(TEST_MACHINE_C_API_OBJS) $(TEST_MACHINE_C_API_LIBS)
Expand All @@ -717,7 +705,7 @@ tests/test-machine-c-api: $(TEST_MACHINE_C_API_OBJS) $(LIBCARTESI) $(LIBCARTESI_

protobuf-util.o: $(PROTOBUF_GEN_OBJS)

grpc-virtual-machine.o grpc-machine-c-api.o remote-machine.o proxy.o: $(GRPC_GEN_OBJS) $(PROTOBUF_GEN_OBJS)
grpc-virtual-machine.o grpc-machine-c-api.o remote-machine.o: $(GRPC_GEN_OBJS) $(PROTOBUF_GEN_OBJS)

machine-c-version.h: ../tools/template/machine-c-version.h.template
sed "s|EMULATOR_MARCHID|$(EMULATOR_MARCHID)|g;s|EMULATOR_VERSION_MAJOR|$(EMULATOR_VERSION_MAJOR)|g;s|EMULATOR_VERSION_MINOR|$(EMULATOR_VERSION_MINOR)|g;s|EMULATOR_VERSION_PATCH|$(EMULATOR_VERSION_PATCH)|g;s|EMULATOR_VERSION_LABEL|$(EMULATOR_VERSION_LABEL)|g" $< > $@
Expand Down Expand Up @@ -767,7 +755,7 @@ clean-libcartesi: clean-objs
@rm -f $(LIBCARTESI) $(LIBCARTESI_GRPC) cartesi.so cartesi/grpc.so cartesi/jsonrpc.so

clean-executables:
@rm -f jsonrpc-remote-cartesi-machine remote-cartesi-machine remote-cartesi-machine-proxy merkle-tree-hash
@rm -f jsonrpc-remote-cartesi-machine remote-cartesi-machine merkle-tree-hash

clean-tests:
@rm -f tests/test-merkle-tree-hash tests/test-machine-c-api
Expand Down
Loading

0 comments on commit 670e3f4

Please sign in to comment.