taikoxyz / taiko-reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
Apache License 2.0
39 stars 36 forks source link

feat: support taiko protocol&t8ntool in reth #1

Closed johntaiko closed 5 months ago

johntaiko commented 7 months ago

Taiko portocol & t8ntool

TODOs

Taiko protocol in node

https://github.com/ethereum/go-ethereum/compare/master...taikoxyz:taiko-geth:taiko

petarvujovic98 commented 7 months ago

@johntaiko What are you taking on currently? I want to jump on something so that we are not doing duplicate work

pbeza commented 7 months ago

@johntaiko @petarvujovic98 I have some lame questions about the tasks on the TODO list, as I'm not clear on the context or reasons for these specific items:

johntaiko commented 7 months ago
  • What is the difference between Hive and t8ntool? Is the latter a subset of the former? Why is it necessary now if it wasn't for taiko-mono? Any specific reason?

Hive is an e2e framework, you can consider t8ntool as a scaffold for unit tests. Because we need to use t8ntool to test the specs in https://github.com/ethereum/tests just like what geth did

  • Are we moving from the taiko-mono (a fork of geth) to the reth fork? What is the reasoning behind this change? Where can I find the reth fork?

I think we will implement BBR in reth, and will share the details between raiko and reth.

petarvujovic98 commented 7 months ago

@johntaiko Could you help me understand what should go in this part of the block building process for Taiko https://github.com/taikoxyz/reth/blob/ab178d6d61c0237bcceaa22edef54c958e48a634/crates/payload/taiko/src/builder.rs#L362-L374

johntaiko commented 7 months ago

@johntaiko Could you help me understand what should go in this part of the block building process for Taiko

https://github.com/taikoxyz/reth/blob/ab178d6d61c0237bcceaa22edef54c958e48a634/crates/payload/taiko/src/builder.rs#L362-L374

You should use receipts_root_slow instead of optimism_receipts_root_slow. This part of code is used to calculate the root state of the current executed block.

But I think it's really complex to understand their abstraction, you can see my code in t8n, it's intuitive. https://github.com/taikoxyz/reth/blob/955f5e9b97ddbe2f953d295cd98e8457d6e8cda1/bin/reth/src/commands/t8n/mod.rs#L508

petarvujovic98 commented 7 months ago

@johntaiko Thank you. I was trying to go through the abstraction levels but it was quite deep compared to the geth implementation. Just to confirm here, Taiko doesn't change this process compared to regular Eth then?

johntaiko commented 7 months ago

Just to confirm here, Taiko doesn't change this process compared to regular Eth then?

You only need to be concerned about the impact of the anchor.

petarvujovic98 commented 7 months ago

@johntaiko I might need a bit help understanding how to implement TxPoolContent into Reth

petarvujovic98 commented 7 months ago

@johntaiko We can now compile taiko-reth using:

cargo build -F taiko

and run taiko-reth using something like

./target/debug/taiko-reth node

but we need to test if the node actually had correct behavior. How can I run some tests to check for expected behavior compared to taiko-geth?