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

Enhancement/sync node broadcast txs #1651

Merged
merged 19 commits into from
Dec 29, 2023

Conversation

DmytroNazarenko
Copy link
Collaborator

@DmytroNazarenko DmytroNazarenko commented Sep 18, 2023

Enabling transactions broadcast for sync nodes

This PR enables functionality for broadcasting transactions from sync/archive nodes to the core nodes.

Main changes:

  • Turning on eth_sendTransaction and eth_sendRawTransaction APIs on sync/archive nodes
  • Enabling transaction broadcasting from sync/archive nodes to validator nodes

Testing

  1. Add unit test send_raw_tx_sync that is sending tx to sync node and checking that it is appeared in transaction queue
  2. Run end-to-end test on devnet:
    • Spin up 4-node chain + sync node
    • Connect Remix to sync node endpoint
    • Write simple Simple contract and deploy it through Remix
    • Send a store(10) tx -> tx should pass
    • Check tx receipt on core nodes
    • Make a retrieve call -> should return 10

Contract for E2E testing:

// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.7.0 <0.9.0;

/**
 * @title Storage
 * @dev Store & retrieve value in a variable
 */
contract Storage {

    uint256 number;

    /**
     * @dev Store value in variable
     * @param num value to store
     */
    function store(uint256 num) public {
        number = num;
    }

    /**
     * @dev Return value 
     * @return value of 'number'
     */
    function retrieve() public view returns (uint256){
        return number;
    }
}

olehnikolaiev
olehnikolaiev previously approved these changes Sep 18, 2023
Copy link

codecov bot commented Nov 16, 2023

Codecov Report

Attention: 39 lines in your changes are missing coverage. Please review.

Comparison is base (f7c560a) 45.50% compared to head (a2d5363) 45.59%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           v3.18.0    #1651      +/-   ##
===========================================
+ Coverage    45.50%   45.59%   +0.08%     
===========================================
  Files          356      356              
  Lines        51720    51709      -11     
===========================================
+ Hits         23537    23576      +39     
+ Misses       28183    28133      -50     

dimalit
dimalit previously approved these changes Dec 14, 2023
olehnikolaiev
olehnikolaiev previously approved these changes Dec 18, 2023
@DmytroNazarenko DmytroNazarenko merged commit c18ad39 into v3.18.0 Dec 29, 2023
9 checks passed
@DmytroNazarenko DmytroNazarenko deleted the enhancement/sync-node-broadcast-txs branch December 29, 2023 19:16
@github-actions github-actions bot locked and limited conversation to collaborators Dec 29, 2023
@DmytroNazarenko DmytroNazarenko linked an issue Feb 12, 2024 that may be closed by this pull request
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Let sync node accept and broadcast transactions
4 participants