From 3fbfdb8a38891ef452242e964b121c20ea8d4c31 Mon Sep 17 00:00:00 2001 From: Souhail <163328524+souhaillM@users.noreply.github.com> Date: Thu, 17 Apr 2025 10:11:03 +0100 Subject: [PATCH 1/2] =?UTF-8?q?core/vm:=20deep=E2=80=91copy=20input=20in?= =?UTF-8?q?=20dataCopy=20precompile=20to=20prevent=20consensus=20split?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/vm/contracts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/vm/contracts.go b/core/vm/contracts.go index 39aa605d74d..433b216418a 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -345,7 +345,7 @@ func (c *dataCopy) RequiredGas(input []byte) uint64 { return uint64(len(input)+31)/32*params.IdentityPerWordGas + params.IdentityBaseGas } func (c *dataCopy) Run(in []byte) ([]byte, error) { - return in, nil + return common.CopyBytes(in), nil } // bigModExp implements a native big integer exponential modular operation. From f4949543a1384eaaebedab4ec106929af8ba8b76 Mon Sep 17 00:00:00 2001 From: Souhail <163328524+souhaillM@users.noreply.github.com> Date: Thu, 17 Apr 2025 21:49:19 +0100 Subject: [PATCH 2/2] Update contracts.go --- core/vm/contracts.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/vm/contracts.go b/core/vm/contracts.go index 433b216418a..6c7eea3c784 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -345,7 +345,8 @@ func (c *dataCopy) RequiredGas(input []byte) uint64 { return uint64(len(input)+31)/32*params.IdentityPerWordGas + params.IdentityBaseGas } func (c *dataCopy) Run(in []byte) ([]byte, error) { - return common.CopyBytes(in), nil + + return libcommon.CopyBytes(in), nil } // bigModExp implements a native big integer exponential modular operation.