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

Unreachable poh contract might introduce unverified blocks #141

Open
3 tasks
JeremyPansier opened this issue Nov 4, 2022 · 2 comments
Open
3 tasks

Unreachable poh contract might introduce unverified blocks #141

JeremyPansier opened this issue Nov 4, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@JeremyPansier
Copy link
Member

JeremyPansier commented Nov 4, 2022

To Reproduce

  1. Run a node
  2. Proof of Humanity smart contract returns 503 Service Unavailable: internal server failure

Expected behavior

Actual behavior
Validators not registered in the PoH registry are able to append a new block to the blockchain.

Tasks

  • Set up a local Ethereum node using software such as Geth or Parity
  • Use it as provider
  • If requesting the PoH smart contract returns an error, remove the address from the registered addresses
    This should be a better resolution of this issue: The POH smart contract calls might reach the limit #212
@JeremyPansier
Copy link
Member Author

ChatGPT mention these steps to set up a local Ethereum node using Geth:

  • Install Geth by downloading the latest stable release for your operating system from the official Geth repository: https://github.com/ethereum/go-ethereum/releases
  • Create a new directory where you want to store your blockchain data. This directory will be used to store the blockchain data and other configuration files. You can choose any name for this directory. For example, let's call it myblockchain.
  • Open a terminal and navigate to the myblockchain directory. Then, run the following command to initialize the blockchain:
geth --datadir=./data init genesis.json

This command creates a new data directory called data and initializes it with the genesis.json file. You can modify the genesis.json file to change the initial parameters of your blockchain, such as the difficulty, gas limit, or allocation of ether.

  • After the initialization is complete, run the following command to start the Geth client:
geth --datadir=./data --rpc --rpcapi eth,net,web3,personal

This command starts the Geth client and enables the JSON-RPC API, which allows external applications to connect to your node and interact with the Ethereum network. The --rpc flag enables the RPC interface, and the --rpcapi flag specifies the list of APIs that will be exposed over RPC.

  • Wait for Geth to synchronize with the Ethereum network. This process may take some time, depending on the speed of your computer and the network connection.

  • Once Geth is fully synchronized, you can interact with it using various tools and libraries. For example, you can use the geth attach command to open a JavaScript console and execute Ethereum commands:

geth attach ./data/geth.ipc

This command connects to the running Geth instance over IPC and opens a JavaScript console. From the console, you can execute various Ethereum commands, such as sending transactions, deploying contracts, or querying the blockchain data.

  • To use your local Geth node as a provider in your application, you need to update the connection URL or provider endpoint to point to your local node. The exact configuration depends on the specific library or tool you are using. For example, in web3.js, you can use the Web3.providers.HttpProvider or Web3.providers.WebsocketProvider class to specify the connection URL.

That's it! You now have a fully functional Ethereum node running on your local machine, which you can use to interact with the Ethereum network or develop decentralized applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To Do
Development

No branches or pull requests

1 participant