Skip to content

Fix ec-pairing precompile, remove the 4 pair limit #36

@Thegaram

Description

@Thegaram

Currently, Scroll's version of the ecPairing precompile limits the input to at most 4 pairs:

fn bernoulli_run(input: &[u8], gas_limit: u64) -> PrecompileResult {
if input.len() > N_PAIRING_PER_OP * N_BYTES_PER_PAIR {
return Err(PrecompileError::Other("BN128PairingInputOverflow: input overflow".into()));
}
run_pair(input, ISTANBUL_PAIR_PER_POINT, ISTANBUL_PAIR_BASE, gas_limit)

From Feynman, we should remove this limit.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions