diff --git a/fhevm/contracts_test.go b/fhevm/contracts_test.go index fa0e20f..1d61c64 100644 --- a/fhevm/contracts_test.go +++ b/fhevm/contracts_test.go @@ -1,19 +1,3 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - package fhevm import ( diff --git a/fhevm/instructions.go b/fhevm/instructions.go index f2a08a1..b655207 100644 --- a/fhevm/instructions.go +++ b/fhevm/instructions.go @@ -184,6 +184,7 @@ func verifyIfCiphertextHandle(handle common.Hash, env EVMEnvironment, contractAd return nil } +// This function is a modified copy from https://github.com/ethereum/go-ethereum func OpSload(pc *uint64, env EVMEnvironment, scope ScopeContext) ([]byte, error) { loc := scope.GetStack().Peek() hash := common.Hash(loc.Bytes32()) @@ -265,6 +266,7 @@ func persistIfVerifiedCiphertext(flagHandleLocation common.Hash, handle common.H } func OpSstore(pc *uint64, env EVMEnvironment, scope ScopeContext) ([]byte, error) { + // This function is a modified copy from https://github.com/ethereum/go-ethereum if env.IsReadOnly() { return nil, ErrWriteProtection } @@ -348,6 +350,7 @@ func RemoveVerifiedCipherextsAtCurrentDepth(env EVMEnvironment) { } func OpReturn(pc *uint64, env EVMEnvironment, scope ScopeContext) []byte { + // This function is a modified copy from https://github.com/ethereum/go-ethereum offset, size := scope.GetStack().Pop(), scope.GetStack().Pop() ret := scope.GetMemory().GetPtr(int64(offset.Uint64()), int64(size.Uint64())) delegateCiphertextHandlesToCaller(env, ret) @@ -355,6 +358,7 @@ func OpReturn(pc *uint64, env EVMEnvironment, scope ScopeContext) []byte { } func OpSelfdestruct(pc *uint64, env EVMEnvironment, scope ScopeContext) (beneficiary uint256.Int, balance *big.Int) { + // This function is a modified copy from https://github.com/ethereum/go-ethereum beneficiary = scope.GetStack().Pop() protectedStorage := fhevm_crypto.CreateProtectedStorageContractAddress(scope.GetContract().Address()) balance = env.GetBalance(scope.GetContract().Address()) diff --git a/fhevm/instructions_test.go b/fhevm/instructions_test.go index 8f8ad7c..aeff3ff 100644 --- a/fhevm/instructions_test.go +++ b/fhevm/instructions_test.go @@ -1,19 +1,3 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - package fhevm import ( diff --git a/fhevm/memory.go b/fhevm/memory.go index a263e78..3eb205b 100644 --- a/fhevm/memory.go +++ b/fhevm/memory.go @@ -1,24 +1,3 @@ -// BSD 3-Clause Clear License - -// Copyright © 2023 ZAMA. -// All rights reserved. - -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - package fhevm import "github.com/holiman/uint256" diff --git a/fhevm/params.go b/fhevm/params.go index af9bdc5..577d205 100644 --- a/fhevm/params.go +++ b/fhevm/params.go @@ -1,23 +1,3 @@ -// BSD 3-Clause Clear License - -// Copyright © 2023 ZAMA. -// All rights reserved. - -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . package fhevm // This file contains default gas costs of fhEVM-related operations. diff --git a/fhevm/tfhe_test.go b/fhevm/tfhe_test.go index 96e7911..8c6b715 100644 --- a/fhevm/tfhe_test.go +++ b/fhevm/tfhe_test.go @@ -1,19 +1,3 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - package fhevm import ( diff --git a/fhevm/tfhe_wrappers.go b/fhevm/tfhe_wrappers.go index 2633684..d14adf8 100644 --- a/fhevm/tfhe_wrappers.go +++ b/fhevm/tfhe_wrappers.go @@ -1,19 +1,3 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - package fhevm /*