INNER CODE UNIT · Rust

end_block

GuildOfWeavers/distaff · src/processor/decoder/mod.rs:172

    pub fn end_block(&mut self, sibling_hash: u128, true_branch: bool) {
        assert!(self.step % BASE_CYCLE_LENGTH == 0,
            "cannot exit context block at step {}: operation alignment is not valid", self.step);

        self.advance_step(false);
        let context_hash = self.pop_context();
        self.copy_loop_stack();

        let block_hash = self.sponge[0];
        if true_branch {
            // we are closing true branch of execution
            self.set_op_bits(FlowOps::Tend, UserOps::Noop);
            self.set_sponge([context_hash, block_hash, sibling_hash, 0]);
        }
        else {
            // we are closing false branch of execution
            self.set_op_bits(FlowOps::Fend, UserOps::Noop);
            self.set_sponge([context_hash, sibling_hash, block_hash, 0]);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…