sp1_core_executor::events

Trait ByteRecord

Source
pub trait ByteRecord {
    // Required methods
    fn add_byte_lookup_event(&mut self, blu_event: ByteLookupEvent);
    fn add_sharded_byte_lookup_events(
        &mut self,
        sharded_blu_events_vec: Vec<&HashMap<u32, HashMap<ByteLookupEvent, usize>>>,
    );

    // Provided methods
    fn add_byte_lookup_events(&mut self, blu_events: Vec<ByteLookupEvent>) { ... }
    fn add_u8_range_check(&mut self, shard: u32, a: u8, b: u8) { ... }
    fn add_u16_range_check(&mut self, shard: u32, a: u16) { ... }
    fn add_u8_range_checks(&mut self, shard: u32, bytes: &[u8]) { ... }
    fn add_u8_range_checks_field<F: PrimeField32>(
        &mut self,
        shard: u32,
        field_values: &[F],
    ) { ... }
    fn add_u16_range_checks(&mut self, shard: u32, ls: &[u16]) { ... }
    fn lookup_or(&mut self, shard: u32, b: u8, c: u8) { ... }
}
Expand description

A type that can record byte lookup events.

Required Methods§

Source

fn add_byte_lookup_event(&mut self, blu_event: ByteLookupEvent)

Adds a new ByteLookupEvent to the record.

Source

fn add_sharded_byte_lookup_events( &mut self, sharded_blu_events_vec: Vec<&HashMap<u32, HashMap<ByteLookupEvent, usize>>>, )

Adds a list of sharded ByteLookupEvents to the record.

Provided Methods§

Source

fn add_byte_lookup_events(&mut self, blu_events: Vec<ByteLookupEvent>)

Adds a list of ByteLookupEvents to the record.

Source

fn add_u8_range_check(&mut self, shard: u32, a: u8, b: u8)

Adds a ByteLookupEvent to verify a and b are indeed bytes to the shard.

Source

fn add_u16_range_check(&mut self, shard: u32, a: u16)

Adds a ByteLookupEvent to verify a is indeed u16.

Source

fn add_u8_range_checks(&mut self, shard: u32, bytes: &[u8])

Adds ByteLookupEvents to verify that all the bytes in the input slice are indeed bytes.

Source

fn add_u8_range_checks_field<F: PrimeField32>( &mut self, shard: u32, field_values: &[F], )

Adds ByteLookupEvents to verify that all the field elements in the input slice are indeed bytes.

Source

fn add_u16_range_checks(&mut self, shard: u32, ls: &[u16])

Adds ByteLookupEvents to verify that all the bytes in the input slice are indeed bytes.

Source

fn lookup_or(&mut self, shard: u32, b: u8, c: u8)

Adds a ByteLookupEvent to compute the bitwise OR of the two input values.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ByteRecord for Vec<ByteLookupEvent>

Source§

impl ByteRecord for HashMap<u32, HashMap<ByteLookupEvent, usize>>

Implementors§