Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Commit

Permalink
fix: move to fhevm to stay compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
immortal-tofu committed Mar 5, 2024
1 parent 42c283d commit 214dc8f
Show file tree
Hide file tree
Showing 37 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build: build-tfhe-rs-capi

.PHONY: test
test: build-tfhe-rs-capi
cd pkg && go test -v ./...
cd fhevm && go test -v ./...

.PHONY: build-tfhe-rs-capi
build-tfhe-rs-capi:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/fhevm/contracts_test.go → fhevm/contracts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/crypto"
"github.com/holiman/uint256"
"github.com/zama-ai/fhevm-go/pkg/tfhe"
"github.com/zama-ai/fhevm-go/fhevm/tfhe"
)

// generate keys if not present
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/fhevm/evm.go → fhevm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/holiman/uint256"
fhevm_crypto "github.com/zama-ai/fhevm-go/pkg/crypto"
"github.com/zama-ai/fhevm-go/pkg/tfhe"
fhevm_crypto "github.com/zama-ai/fhevm-go/fhevm/crypto"
"github.com/zama-ai/fhevm-go/fhevm/tfhe"
)

var protectedStorageAddrCallerAddr common.Address
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/fhevm/instructions.go → fhevm/instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/ethereum/go-ethereum/common"
crypto "github.com/ethereum/go-ethereum/crypto"
"github.com/holiman/uint256"
fhevm_crypto "github.com/zama-ai/fhevm-go/pkg/crypto"
"github.com/zama-ai/fhevm-go/pkg/tfhe"
fhevm_crypto "github.com/zama-ai/fhevm-go/fhevm/crypto"
"github.com/zama-ai/fhevm-go/fhevm/tfhe"
"go.opentelemetry.io/otel"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/fhevm/instructions_test.go → fhevm/instructions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/crypto"
"github.com/holiman/uint256"
fhevm_crypto "github.com/zama-ai/fhevm-go/pkg/crypto"
"github.com/zama-ai/fhevm-go/pkg/tfhe"
fhevm_crypto "github.com/zama-ai/fhevm-go/fhevm/crypto"
"github.com/zama-ai/fhevm-go/fhevm/tfhe"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/fhevm/interface.go → fhevm/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/ethereum/go-ethereum/common"
"github.com/holiman/uint256"
"github.com/zama-ai/fhevm-go/pkg/tfhe"
"github.com/zama-ai/fhevm-go/fhevm/tfhe"
)

type EVMEnvironment interface {
Expand Down
2 changes: 1 addition & 1 deletion pkg/fhevm/interpreter.go → fhevm/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package fhevm

import (
"github.com/ethereum/go-ethereum/common"
"github.com/zama-ai/fhevm-go/pkg/tfhe"
"github.com/zama-ai/fhevm-go/fhevm/tfhe"
)

type ScopeContext interface {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"

"github.com/ethereum/go-ethereum/common"
"github.com/zama-ai/fhevm-go/pkg/tfhe"
"github.com/zama-ai/fhevm-go/fhevm/tfhe"
"go.opentelemetry.io/otel/trace"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package fhevm
import (
"encoding/hex"

"github.com/zama-ai/fhevm-go/pkg/tfhe"
"github.com/zama-ai/fhevm-go/fhevm/tfhe"
)

func fheLeRequiredGas(environment EVMEnvironment, input []byte) uint64 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/fhevm/operators_crypto.go → fhevm/operators_crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"time"

"github.com/ethereum/go-ethereum/common"
"github.com/zama-ai/fhevm-go/pkg/kms"
"github.com/zama-ai/fhevm-go/pkg/tfhe"
"github.com/zama-ai/fhevm-go/fhevm/kms"
"github.com/zama-ai/fhevm-go/fhevm/tfhe"
"go.opentelemetry.io/otel/trace"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/hex"

"github.com/ethereum/go-ethereum/common"
"github.com/zama-ai/fhevm-go/pkg/tfhe"
"github.com/zama-ai/fhevm-go/fhevm/tfhe"
)

func verifyCiphertextRequiredGas(environment EVMEnvironment, input []byte) uint64 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/fhevm/operators_rand.go → fhevm/operators_rand.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/holiman/uint256"
fhevm_crypto "github.com/zama-ai/fhevm-go/pkg/crypto"
"github.com/zama-ai/fhevm-go/pkg/tfhe"
fhevm_crypto "github.com/zama-ai/fhevm-go/fhevm/crypto"
"github.com/zama-ai/fhevm-go/fhevm/tfhe"
"go.opentelemetry.io/otel/trace"
"golang.org/x/crypto/chacha20"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"math/bits"

"github.com/holiman/uint256"
"github.com/zama-ai/fhevm-go/pkg/tfhe"
"github.com/zama-ai/fhevm-go/fhevm/tfhe"
)

func fheRandRequiredGas(environment EVMEnvironment, input []byte) uint64 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/fhevm/otel.go → fhevm/otel.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package fhevm
import (
"math/big"

"github.com/zama-ai/fhevm-go/pkg/tfhe"
"github.com/zama-ai/fhevm-go/fhevm/tfhe"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/fhevm/params.go → fhevm/params.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fhevm

import "github.com/zama-ai/fhevm-go/pkg/tfhe"
import "github.com/zama-ai/fhevm-go/fhevm/tfhe"

// This file contains default gas costs of fhEVM-related operations.
// Users can change the values based on specific requirements in their blockchain.
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/fhevm/protected_storage.go → fhevm/protected_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/ethereum/go-ethereum/common"
crypto "github.com/ethereum/go-ethereum/crypto"
"github.com/holiman/uint256"
fhevm_crypto "github.com/zama-ai/fhevm-go/pkg/crypto"
"github.com/zama-ai/fhevm-go/pkg/tfhe"
fhevm_crypto "github.com/zama-ai/fhevm-go/fhevm/crypto"
"github.com/zama-ai/fhevm-go/fhevm/tfhe"
)

// An arbitrary constant value to flag locations in protected storage.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion proto/kms.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";
package kms;
option go_package = "github.com/zama-ai/fhevm-go/pkg/kms";
option go_package = "github.com/zama-ai/fhevm-go/fhevm/kms";

service KmsEndpoint {
rpc Validate_and_decrypt(DecryptionRequest) returns (DecryptionResponse);
Expand Down

0 comments on commit 214dc8f

Please sign in to comment.