-
Notifications
You must be signed in to change notification settings - Fork 141
Constantine Integration #3587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Constantine Integration #3587
Conversation
Current issue eest_blockchain_test → processBlock → processTransactions
→ processTransaction → call_evm.txCallEvm → runComputation
→ interpreter_dispatch.executeOpcodes → precompiles.execPrecompile (line 842)
→ ecRecover
→ constantine/ethereum_evm_precompiles.nim(1360) ctt_eth_evm_ecrecover
→ …/signatures/ecdsa.nim recoverPubkeyImpl…
→ …/math/elliptic/ec_scalar_mul.nim(426) scalarMulGLV_m2w2 ⟵ hot loop
→ …/elliptic/ec_shortweierstrass_jacobian.nim(618) pluseq … So the test runner was executing a transaction that hit the ECRECOVER precompile; it was “stuck” (busy) inside Constantine’s secp256k1 scalar multiplication (GLV path), i.e., the inner loop that accumulates points for the pubkey recovery. NOTE: It is stuck for hours Exact input causing issue |
Issues found with TestName: tests/static/state_tests/stZeroKnowledge/ecpairing_inputsFiller.yml::ecpairing_inputs[fork_Cancun-blockchain_test_from_state_test-d1-g0-v0] RunTest error: A bug? good block rejected: gasUsed mismatch
TestName: tests/static/state_tests/stZeroKnowledge/ecpairing_inputsFiller.yml::ecpairing_inputs[fork_Cancun-blockchain_test_from_state_test-d3-g0-v0] RunTest error: A bug? good block rejected: gasUsed mismatch
TestName: tests/static/state_tests/stZeroKnowledge/ecpairing_inputsFiller.yml::ecpairing_inputs[fork_Prague-blockchain_test_from_state_test-d1-g0-v0] RunTest error: A bug? good block rejected: gasUsed mismatch
TestName: tests/static/state_tests/stZeroKnowledge/ecpairing_inputsFiller.yml::ecpairing_inputs[fork_Prague-blockchain_test_from_state_test-d3-g0-v0] RunTest error: A bug? good block rejected: gasUsed mismatch
TestName: tests/static/state_tests/stZeroKnowledge/ecpairing_two_points_with_one_g2_zeroFiller.json::ecpairing_two_points_with_one_g2_zero[fork_Cancun-blockchain_test_from_state_test-d0-g0-v0] RunTest error: A bug? good block rejected: gasUsed mismatch
TestName: tests/static/state_tests/stZeroKnowledge/ecpairing_two_points_with_one_g2_zeroFiller.json::ecpairing_two_points_with_one_g2_zero[fork_Cancun-blockchain_test_from_state_test-d0-g3-v0] RunTest error: A bug? good block rejected: gasUsed mismatch
TestName: tests/static/state_tests/stZeroKnowledge/ecpairing_two_points_with_one_g2_zeroFiller.json::ecpairing_two_points_with_one_g2_zero[fork_Prague-blockchain_test_from_state_test-d0-g0-v0] RunTest error: A bug? good block rejected: gasUsed mismatch
TestName: tests/static/state_tests/stZeroKnowledge/ecpairing_two_points_with_one_g2_zeroFiller.json::ecpairing_two_points_with_one_g2_zero[fork_Prague-blockchain_test_from_state_test-d0-g3-v0] RunTest error: A bug? good block rejected: gasUsed mismatch Exact implementation issue still not investigated UPDATE : Fixed 8th Sept |
Regarding constantine, my recommendation is that the initial branch integrates sha256 only as a start - once that is working (ie sha256 is confirmed to be fast, constantine subrepo is present and so on), separate branches can be used for each precompile - in particular, this allows measuring (in benchmarks) and rolling back precompiles on an individual basis. |
Linux arm and windows arm issues |
if defined(windows): | ||
# Constantine | ||
switch("passC", "-fomit-frame-pointer") | ||
switch("passL", "-fomit-frame-pointer") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constantine windows issue
Goal is to first integrate constantine and check performance metrics for all precompiles
Stats:-
Note
Need to create a error handler for constantine type errors