You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we're using execution-spec-tests for testing EVM, we have successfully passed all tests with our own implementation, as it's represented in the PR mentioned. But near-host functions that were integrated to aurora-engine-sdk failed for execution-spec-tests.
We discovered, that input and output data for EIP-2537 should be unpadded for input data, and padded for output data using NEP-488 functions. According to NEP-488 we can use that function directly for EIP-2537, and it's misleading, as it's not true. As explained, the data should be prepared to pass as parameters. We managed it for Aurora Engine. But it's also about additional NEAR gas consumption.
Bug for BLS12-381 g1_add
We discovered running execution-spec-tests that points with coordinate 0<..<=2 produce incorrect results. We aligned only to execution-spec-tests tests. And it's possible same bug for other coordinates.
Contact Details
No response
Which network are you using?
mainnet
What happened?
Description
After implantation for Aurora Enigne EIP-2537: aurora-is-near/aurora-engine#990
tests based on
blst
crate, we decided to use NEAR host functions, that related to:https://github.com/near/nearcore/blob/master/runtime/near-vm-runner/src/logic/bls12381.rs
As we're using execution-spec-tests for testing EVM, we have successfully passed all tests with our own implementation, as it's represented in the PR mentioned. But near-host functions that were integrated to
aurora-engine-sdk
failed forexecution-spec-tests
.After research and investigations, with extending and runnging tests with: https://github.com/near/nearcore/blob/master/runtime/near-vm-runner/src/logic/tests/bls12381.rs for
execution-spec-tests
we discovered several issues.Incorrect input and output data for EIP-2537
We discovered, that input and output data for EIP-2537 should be unpadded for
input
data, and padded foroutput
data using NEP-488 functions. According to NEP-488 we can use that function directly for EIP-2537, and it's misleading, as it's not true. As explained, the data should be prepared to pass as parameters. We managed it for Aurora Engine. But it's also about additional NEAR gas consumption.Bug for BLS12-381 g1_add
We discovered running
execution-spec-tests
that points with coordinate0<..<=2
produce incorrect results. We aligned only toexecution-spec-tests
tests. And it's possible same bug for other coordinates.Input examples:
Gas exceeded issue BLS12-381 g1_mul
We have got host error
GasExceeded
for input:> 17000
Gas exceeded issue BLS12-381 g2_mul
We have got host error
GasExceeded
for input:> 14500
Memory violation for BLS12-381 pairing
We have got host error
MemoryAccessViolation
for test caseexecution-spec-tests
with input:384000
Relevant log output
The text was updated successfully, but these errors were encountered: