diff --git a/.dockerignore b/.dockerignore index 0c013d18b..790d4de74 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,3 +3,4 @@ build/_workspace build/_bin tests/testdata +./.git/lfs diff --git a/fhevm-go-coproc b/fhevm-go-coproc index a5a43651c..dc93955cc 160000 --- a/fhevm-go-coproc +++ b/fhevm-go-coproc @@ -1 +1 @@ -Subproject commit a5a43651c8f7c1a2024affd5d6fbced8cc8c5eda +Subproject commit dc93955cc27a2bd9c170de9e2a891bac7e614122 diff --git a/local-testnet/Makefile b/local-testnet/Makefile index 3a8209a3a..9bac5a891 100644 --- a/local-testnet/Makefile +++ b/local-testnet/Makefile @@ -1,8 +1,8 @@ -KMS_DEV_TAG = v0.3.3-pre-13 +KMS_DEV_TAG = 9b94bec PRYSM_VERSION = v5.0.3 ROOT_DIR = $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) TEST_KEYS_PATH = ${ROOT_DIR}/fhevm-keys -TEMP_KEY_GEN = ./.temp_keygen +TEMP_KEY_GEN = .temp_keygen ifeq ($(shell uname),Darwin) HOST_OS = darwin else @@ -16,23 +16,22 @@ endif PRYSM_SUFFIX = $(HOST_OS)-$(HOST_ARCH) -${TEST_KEYS_PATH}/cks ${TEST_KEYS_PATH}/pks ${TEST_KEYS_PATH}/sks ${TEST_KEYS_PATH}/default-software-keys.bin: +.PHONY: gen-keys +gen-keys: # make sure to have a fresh dir for keys rm -rf ${TEMP_KEY_GEN} mkdir ${TEMP_KEY_GEN} # start a kms that will generate keys - docker run --rm -v ${ROOT_DIR}/${TEMP_KEY_GEN}:/keys ghcr.io/zama-ai/kms-dev:${KMS_DEV_TAG} /app/kms/bin/kms-gen /keys/ + docker run --entrypoint=/bin/sh --rm -v $(shell pwd)/${TEMP_KEY_GEN}:/keys ghcr.io/zama-ai/kms-service-dev:${KMS_DEV_TAG} \ + -c 'cd / && /app/kms/core/service/bin/kms-gen-keys centralized --param-path /app/kms/core/service/parameters/default_params.json --write-privkey' # move keys mkdir -p ${TEST_KEYS_PATH} - cp ${TEMP_KEY_GEN}/default-software-keys.bin ${TEST_KEYS_PATH} - cp ${TEMP_KEY_GEN}/cks.bin ${TEST_KEYS_PATH}/cks - cp ${TEMP_KEY_GEN}/cks.bin ${TEST_KEYS_PATH}/cks.bin - cp ${TEMP_KEY_GEN}/sks.bin ${TEST_KEYS_PATH}/sks - cp ${TEMP_KEY_GEN}/pks.bin ${TEST_KEYS_PATH}/pks - # clean + mv -f ${TEMP_KEY_GEN}/PRIV/FhePrivateKey/04a1aa8ba5e95fb4dc42e06add00b0c2ce3ea424 ${TEST_KEYS_PATH}/cks + mv -f ${TEMP_KEY_GEN}/PUB/ServerKey/04a1aa8ba5e95fb4dc42e06add00b0c2ce3ea424 ${TEST_KEYS_PATH}/sks + mv -f ${TEMP_KEY_GEN}/PUB/PublicKey/04a1aa8ba5e95fb4dc42e06add00b0c2ce3ea424 ${TEST_KEYS_PATH}/pks + # cleanup rm -rf ${TEMP_KEY_GEN} -# TODO: download different executables for linux prysm-beacon: curl -L https://github.com/prysmaticlabs/prysm/releases/download/$(PRYSM_VERSION)/beacon-chain-$(PRYSM_VERSION)-$(PRYSM_SUFFIX) > prysm-beacon.tmp chmod +x prysm-beacon.tmp @@ -43,9 +42,6 @@ prysm-validator: chmod +x prysm-validator.tmp mv -f prysm-validator.tmp prysm-validator -.PHONY: gen-keys -gen-keys: ${TEST_KEYS_PATH}/cks ${TEST_KEYS_PATH}/pks ${TEST_KEYS_PATH}/sks ${TEST_KEYS_PATH}/default-software-keys.bin - .PHONY: clean clean: rm -rf node* diff --git a/local-testnet/fhevm-keys/cks b/local-testnet/fhevm-keys/cks index 57585a757..1cf2d3eb0 100644 Binary files a/local-testnet/fhevm-keys/cks and b/local-testnet/fhevm-keys/cks differ diff --git a/local-testnet/fhevm-keys/cks.bin b/local-testnet/fhevm-keys/cks.bin deleted file mode 100644 index 45e046711..000000000 Binary files a/local-testnet/fhevm-keys/cks.bin and /dev/null differ diff --git a/local-testnet/fhevm-keys/default-software-keys.bin b/local-testnet/fhevm-keys/default-software-keys.bin deleted file mode 100644 index 5d17f3ea4..000000000 --- a/local-testnet/fhevm-keys/default-software-keys.bin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b08d442113081b56b30684dab492b008b2553470621acc2a7242dca504d1ca74 -size 738403334 diff --git a/local-testnet/fhevm-keys/pks b/local-testnet/fhevm-keys/pks index ac368c95d..dc7c4c300 100644 Binary files a/local-testnet/fhevm-keys/pks and b/local-testnet/fhevm-keys/pks differ diff --git a/local-testnet/fhevm-keys/sks b/local-testnet/fhevm-keys/sks index 961275cc5..789fd90be 100644 --- a/local-testnet/fhevm-keys/sks +++ b/local-testnet/fhevm-keys/sks @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:67536363e7c5b9f75fc2e93be39355d3a106a9465325560cec81eadbdfc4158e -size 112320465 +oid sha256:a20529c50c7669922c8db6fd60a0c4937dcf6ae16d229d1a26a6cc50081fede2 +size 117522609 diff --git a/local-testnet/prep/consensus/genesis.ssz b/local-testnet/prep/consensus/genesis.ssz deleted file mode 100644 index 227767aa2..000000000 Binary files a/local-testnet/prep/consensus/genesis.ssz and /dev/null differ diff --git a/local-testnet/setup.sh b/local-testnet/setup.sh index 724050b4d..07b214463 100755 --- a/local-testnet/setup.sh +++ b/local-testnet/setup.sh @@ -15,7 +15,7 @@ make geth go build ./cmd/bootnode popd -make gen-keys +#make gen-keys # build with 'make geth' in root directory GETH=../build/bin/geth @@ -107,7 +107,7 @@ RPC_PARAMS="FORCE_TRANSIENT_STORAGE=true FHEVM_GO_INIT_CKS=1 FHEVM_GO_KEYS_DIR=f # rpc node tmux new -s exec-rpc1 -d "$RPC_PARAMS $GETH $STATE_SCHEME --datadir $NODE_DIR --port 30308 --http --http.port 8745 \ - --gcmode archive --vmdebug --http.api \"eth,net,web3,debug\" \ + --gcmode archive --vmdebug --http.corsdomain='*' --http.api \"eth,net,web3,debug\" \ --bootnodes 'enode://0b7b41ca480f0ef4e1b9fa7323c3ece8ed42cb161eef5bf580c737fe2f33787de25a0c212c0ac7fdb429216baa3342c9b5493bd03122527ffb4c8c114d87f0a6@127.0.0.1:0?discport=30305' \ --authrpc.port 8553 2>&1 | tee $NODE_DIR/exec.log" diff --git a/scripts/run-single-node-devnet.sh b/scripts/run-single-node-devnet.sh index 340fd2b84..4c9e28013 100755 --- a/scripts/run-single-node-devnet.sh +++ b/scripts/run-single-node-devnet.sh @@ -108,6 +108,6 @@ FHEVM_GO_INIT_CKS=1 \ FHEVM_CONTRACT_ADDRESS=$COPROCESSOR_CONTRACT_ADDRESS \ FHEVM_COPROCESSOR_PRIVATE_KEY_FILE=$NODE_DIR/coprocessor.key \ FORCE_TRANSIENT_STORAGE=true \ - geth --datadir $NODE_DIR --port 30308 --http --http.addr 0.0.0.0 --http.port 8545 \ + geth --datadir $NODE_DIR --port 30308 --http --http.corsdomain='*' --http.addr 0.0.0.0 --http.port 8545 \ --bootnodes 'enode://0b7b41ca480f0ef4e1b9fa7323c3ece8ed42cb161eef5bf580c737fe2f33787de25a0c212c0ac7fdb429216baa3342c9b5493bd03122527ffb4c8c114d87f0a6@127.0.0.1:0?discport=30305' \ --authrpc.port 8553