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

Send new block proposal by raw tx #47

Merged
merged 6 commits into from
Jul 5, 2024

Conversation

mskrzypkows
Copy link
Collaborator

No description provided.

let signer = PrivateKeySigner::from_str(private_key)?;
let wallet = EthereumWallet::from(signer);

Ok(Self {
rpc_url: rpc_url.parse()?,
wallet,
new_block_proposal_contract_address: new_block_proposal_contract_address.parse()?,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: let's call it the taiko_preconfirming_address

#[derive(Serialize, Deserialize, Debug)]
#[serde(rename_all = "PascalCase")]
pub struct RPCReplyL2TxLists {
pub tx_lists: Value,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my preference would be to put the correct type instead of Value but happy to skip if its too much for devnet
let's put a TODO here otherwise

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, but this is in the json::Value form because I pass directly the same json to the driver to advance the head, so after parsing it to the type I would need to encode it for driver.

impl Config {
pub fn read_env_variables() -> Self {
const ETHEREUM_PRIVATE_KEY: &str = "ETHEREUM_PRIVATE_KEY";
const NEW_BLOCK_PROPOSAL_CONTRACT_ADDRESS: &str = "NEW_BLOCK_PROPOSAL_CONTRACT_ADDRESS";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TAIKO_PRECONFIRMING_ADDRESS

Copy link
Collaborator

@swapnilraj swapnilraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some comments for naming stuff
apart from that looks good

@mskrzypkows mskrzypkows merged commit 2d57bb4 into master Jul 5, 2024
1 check passed
mskrzypkows added a commit that referenced this pull request Jul 7, 2024
* RPC client for fetching tx lists (#23)

* RPC client for fetching tx lists

RPC server for tests

* Improve async processing and error handling

* More assert to  the gen l2 tx test

---------

Co-authored-by: Denis Kolodin <[email protected]>
Co-authored-by: Ahmad Bitar <[email protected]>

* submit new l2 blocks using RPC (#28)

* submit_new_l2_blocks implemented

* fixed tests

* Fix loops in Node/src/node/mod.rs to be consistent (#38)

every 4 seconds and not blocked by channel
processing

Co-authored-by: Ahmad Bitar <[email protected]>

* Two RCP addresses for the Node

fixed some JSON RPC compatibility with taiko-clients

* unused import

* small fixes

---------

Co-authored-by: Ahmad Bitar <[email protected]>
Co-authored-by: Ahmad Bitar <[email protected]>

* Unit test for deployment and call of Ethereum contract (#39)

* Unit test for deployment and call of Ethereum contract

* foundry for github actions

* propose_new_block call with empty parameters

* Default params for the newBlockProposal

* rest parameter passed to the propose_new_block

* Send new block proposal by raw tx (#47)

* build Eip1559 transaction

* Handling additional arguments passed by JSON RPC from proposer

* Forwarding of encoded tx to the mev boost module

* Configuration parameters take form the ENV

* sending new block proposal using builder.send

* renamed according to the review

---------

Co-authored-by: Denis Kolodin <[email protected]>
Co-authored-by: Ahmad Bitar <[email protected]>
Co-authored-by: Ahmad Bitar <[email protected]>
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.

3 participants