#What's the max size an emitted log can be? What limit pertains to log size?

3 messages · Page 1 of 1 (latest)

tidal stirrup
#
#![no_std]

use soroban_sdk::{contract, contractimpl, Bytes, Env, log};

#[contract]
pub struct Contract;

#[contractimpl]
impl Contract {
    pub fn hello(env: Env) {
        let bytes = Bytes::from_array(&env, &[0; u16::MAX as usize]);
        log!(&env, "", bytes);
    }
}

That's a pretty big log and it seems to be passing. How much bigger can it get?

dry rock
#

it's basically limited by the budget for creating the objects you log

#

because at apply time in core log is not executed and thus not metered