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

No std support for Powdr #1

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open

No std support for Powdr #1

wants to merge 35 commits into from

Conversation

CeciliaZ030
Copy link
Owner

@CeciliaZ030 CeciliaZ030 commented Jan 6, 2024

  • got rid of std from all zeth-lib and zeth-primitives dependencies
  • compiled to RICS-V with Powdr's command
let mut cmd = Command::new("cargo");
    cmd.env("RUSTFLAGS", "--emit=asm -g");

    let args = as_ref![
        OsStr;
        "+nightly-2023-01-03",
        "build",
        "--release",
        "-Z",
        "build-std=core,alloc",
        "--target",
        "riscv32imac-unknown-none-elf",
        "--lib",
        "--target-dir",
        target_dir,
        "--manifest-path",
        input_dir,
    ];
  • compile to asm
  • asm to PIL
  • verify success

How to run

  1. set PILCOM to path https://github.com/0xPolygonHermez/pilcom
  2. cargo run --package bin-powdr --bin bin-powdr --all-features

intoverflow and others added 24 commits October 19, 2023 13:35
* Introduce op-info tool

* Whitespace

* Update host/Cargo.toml

Co-authored-by: Wolfgang Welz <[email protected]>

* Update Cargo.lock

---------

Co-authored-by: Wolfgang Welz <[email protected]>
* upgrade dependencies

* upgrade dependencies
* MPT cleanups

* avoid clone when calling hash

* fix clippy
* cleanup host crate

* minor cleanups

* fix trie creation

* separate node maps

* fix tests

* fix proof generation

* fix integration test

* add documentation

* inline public mpt methods

* move mpt functions

* fix verification of zero RPC accounts
…and non-Unicode sequences in filepath (taikoxyz#65)

* fix: use PathBuf and Path for compatibility

* fix: use PathBuf as cache path type
* Update and fix CI

* fix cargo-install version

* try without cache

* Revert "try without cache"

This reverts commit d91547ab1697989050cfdfce35229e8899b0b27f.

* add GITHUB_TOKEN

* review suggestions

* make version env
* transactions module

* TxEssence trait

* Generic Transaction struct

* tx essence as a generic parameter

* OptimismTxEssence

* op chain spec

* OpTxExecStrategy

* redundant block builder type params

* strategy bundles

* host binary parameters

* profiling flag

* optimism

* new derivation binary skeleton, copy over libs

* providers and conversion utils

* epoch transitioning

* basic derive flow

* host-side derivation

* read metadata from op head

* op-derive guest

* disable guest memory leaks

* heapless batch derivation

* Add missing import

* Remove heapless BinaryHeap

* Remove heapless

* Introduce op-derive tool

* Remove ethers types from BatcherDb trait

* Verify new op block has correct transaction list

* Move derive logic into library

* Fix bug in transaction trie reconstruction

* Introduce get_op_header() to BatcherDb

* Clippy warning

* Default Serde value for FileProvider::receipts

* Disable bloom filter checks

* Clippy

* Clippy

* Fix parsing of from and to fields for deposits

* Reintroduce filtering by log bloom

* fmt

* Add support for local exec to op-derive

* Enforce block_number is correct in MemDb

* Split derive() into multiple functions

* Remove redundant check for batch parent hash

* Remove redundant copy of system config

* Remove redundant block number check

* Cleanup

* Remove redundant vector of eth blocks

* Add base_fee_per_gas to Epoch

* Store deposits in Epoch

* Add Eth tail to DeriveOutput

* Cleanup

* Move deque_next_epoch_if_none to State

* Move eth block processing to Batches

* Reorg and cleanup

* More cleanup

* run cargo fmt --all

* fix clippy warnings

* remove unused imports

* format guest code

* add op-derive cmd test

* add cmd tests

* cleanup optimism/mod

* Rename command line args

* Fix test arguments

* Rename config field to max_channel_bank_size

* Enforce decompression limit of MAX_RLP_BYTES_PER_CHANNEL

* Use constant OPTIMISM_DEPOSITED_TX_TYPE when checking batch validity

* Import from std instead of alloc/core

* Re-enable core::mem::forget() optimization

* Replace asserts with ensures; enforce absence of receipts for Op blocks

* Simplfy iteration through derived transactions

* Add Bonsai support to op-derive. Also add Bonsai session status to output when polling

* More println

* Rework Batcher initialization

* More logging

* More log output if Bonsai workflow fails

---------

Co-authored-by: Rami Khalil <[email protected]>
Co-authored-by: Wolfgang Welz <[email protected]>
* cleanup frame parsing

* fix frame loading

* move byte wrapping into RLP encoding

* improve documentation

* fmt

* use an actual Batch for the tests

* log batcher transaction

* add unit tests
* fix channel bank

* channel_index is not mut
@CeciliaZ030
Copy link
Owner Author

CeciliaZ030 commented Jan 27, 2024

To test riscv32 build:

cargo +nightly-2023-01-03 build --release -Z build-std=core,alloc --target riscv32imac-unknown-none-elf --lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants