Skip to content
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

EVM: move KZG precompile #2811

Merged
merged 7 commits into from
Jun 22, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const BLS_MODULUS = BigInt(

const modulusBuffer = setLengthLeft(bigIntToBytes(BLS_MODULUS), 32)

export async function precompile14(opts: PrecompileInput): Promise<ExecResult> {
export async function precompile0a(opts: PrecompileInput): Promise<ExecResult> {
const gasUsed = opts._common.param('gasPrices', 'kzgPointEvaluationGasPrecompilePrice')
if (opts._debug !== undefined) {
opts._debug(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { BLS12_381_FromG1Point, BLS12_381_ToG1Point } from './util/bls12_381.js'
import type { ExecResult } from '../evm.js'
import type { PrecompileInput } from './types.js'

export async function precompile0a(opts: PrecompileInput): Promise<ExecResult> {
export async function precompile0c(opts: PrecompileInput): Promise<ExecResult> {
const mcl = (<any>opts._EVM)._mcl!

const inputData = opts.data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import type { ExecResult } from '../evm.js'
import type { PrecompileInput } from './types.js'

export async function precompile0b(opts: PrecompileInput): Promise<ExecResult> {
export async function precompile0d(opts: PrecompileInput): Promise<ExecResult> {
const mcl = (<any>opts._EVM)._mcl!

const inputData = opts.data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import type { ExecResult } from '../evm.js'
import type { PrecompileInput } from './types.js'

export async function precompile0c(opts: PrecompileInput): Promise<ExecResult> {
export async function precompile0e(opts: PrecompileInput): Promise<ExecResult> {
const mcl = (<any>opts._EVM)._mcl!

const inputData = opts.data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { BLS12_381_FromG2Point, BLS12_381_ToG2Point } from './util/bls12_381.js'
import type { ExecResult } from '../evm.js'
import type { PrecompileInput } from './types.js'

export async function precompile0d(opts: PrecompileInput): Promise<ExecResult> {
export async function precompile0f(opts: PrecompileInput): Promise<ExecResult> {
const mcl = (<any>opts._EVM)._mcl!

const inputData = opts.data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import type { ExecResult } from '../evm.js'
import type { PrecompileInput } from './types.js'

export async function precompile0e(opts: PrecompileInput): Promise<ExecResult> {
export async function precompile10(opts: PrecompileInput): Promise<ExecResult> {
const mcl = (<any>opts._EVM)._mcl!

const inputData = opts.data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
import type { ExecResult } from '../evm.js'
import type { PrecompileInput } from './types.js'

export async function precompile0f(opts: PrecompileInput): Promise<ExecResult> {
export async function precompile11(opts: PrecompileInput): Promise<ExecResult> {
const mcl = (<any>opts._EVM)._mcl!

const inputData = opts.data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type { PrecompileInput } from './types.js'
const zeroBuffer = new Uint8Array(32)
const oneBuffer = concatBytesNoTypeCheck(new Uint8Array(31), hexToBytes('01'))

export async function precompile10(opts: PrecompileInput): Promise<ExecResult> {
export async function precompile12(opts: PrecompileInput): Promise<ExecResult> {
const mcl = (<any>opts._EVM)._mcl!

const inputData = opts.data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { BLS12_381_FromG1Point, BLS12_381_ToFpPoint } from './util/bls12_381.js'
import type { ExecResult } from '../evm.js'
import type { PrecompileInput } from './types.js'

export async function precompile11(opts: PrecompileInput): Promise<ExecResult> {
export async function precompile13(opts: PrecompileInput): Promise<ExecResult> {
const mcl = (<any>opts._EVM)._mcl!

const inputData = opts.data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { BLS12_381_FromG2Point, BLS12_381_ToFp2Point } from './util/bls12_381.js
import type { ExecResult } from '../evm.js'
import type { PrecompileInput } from './types.js'

export async function precompile12(opts: PrecompileInput): Promise<ExecResult> {
export async function precompile14(opts: PrecompileInput): Promise<ExecResult> {
const mcl = (<any>opts._EVM)._mcl!

const inputData = opts.data
Expand Down
Loading