New answers tagged

0

You will have to be patient to sync a node. It took me 60 hours to sync Rinkeby in fast mode. There were 125M state entries and the folder size was 38GB after synchronization. With time, both these numbers will grow. You can type eth.syncing in Geth console. If you get 'False' as output, it means that syncing is finished. Otherwise you'll get various ...


0

According to https://github.com/ethereum/go-ethereum/issues/14338: Geth uses fast sync by default. The block states are unavailable for intermediate blocks and are downloaded only for the recent state. As such, up to the point that sync completes, the latest complete block is zero, since all newer blocks are incomplete during sync. When fast sync finishes, ...


0

Check this answer . It also applies to smart contracts instead of balances. So, yes, you would have to sync geth (at least) until wherever you need. Hope it helps.


0

You will have to add the Geth path to the environment variables. You can do this by going to Control Panel>System>Advanced System Settings>Environment Variables>Path and add the path of Geth (C:\Program Files\Geth). Restart the Command Prompt and it should work.


0

There is a high likelyhood that you are running a go-ethereum v1.9.0 or below as your base. Well the issue seems to have been resolved with the release of v1.9.0. The problem which is a chain indexing issue immediately after some reorgs is addressed here: https://github.com/ethereum/go-ethereum/pull/19748 Tests fix: https://github.com/ethereum/go-ethereum/...


2

"fast" is the default value for --syncmode key It means, that there are no different to use --syncmode fast or do not use it. The information from https://github.com/ethereum/go-ethereum/wiki/command-line-options --syncmode value Blockchain sync mode ("fast", "full", or "light") (default: fast)


0

You can use Docker volumes to mount a host path to a container. If your synced database is stored in /home/foo/.ethereum for example, you can mount it to the Geth docker container with: $ docker run -it -p 30303:30303 -v /home/foo/.ethereum:/root/.ethereum ethereum/client-go Do not change /root/.ethereum, since that's where the folder will be mounted ...


0

Export 9389279 block takes less than 1 hour. I used command: docker run -d --rm -v $PWD/full-ethereum-node:/root/.ethereum ethereum/client-go export /root/.ethereum/geth/chaindata/9389270.backup 0 9389270 But import whole 9389270.backup file is so slow, that it is equal to sync node from genesis block with the network. The testing environment was: Intel ...


0

How have you established that SSH disconnection depends on your operation of Geth ? SSH and Geth can both be configured to bind to specific ports. Confirm which those are, and confirm that your SSH connection requests reaching the computer.


1

I can make it work by include these in the genesis file. "byzantiumBlock": 5, "constantinopleBlock": 10, "constantinopleFixBlock": 20


0

The rather unfortunate Returned values aren't valid, did it run Out of Gas error message is usually misleading, and it typically implies that you are trying to execute a function which is not implemented in the contract. You say that your execution code is: dieselprice = new web3.eth.Contract(abi, address); const price = await dieselprice.methods.ETHUSD()....


0

If you use Geth 1.9.+, Ethereum node --syncmode full contains about 450 GB of data: sudo du -h ./ 4,0K ./keystore 7,9M ./geth/nodes 166M ./geth/ethash 113G ./geth/chaindata/ancient 450G ./geth/chaindata 450G ./geth 450G ./ Here is the post on official Ethereum blog with some benchmarks Actually you can download whole chaindata folder ...


1

Use the key: --exitwhensynced (Exits after block synchronisation completes) Regarding to https://github.com/ethereum/go-ethereum/wiki/command-line-options


0

It is because you use loopback interface when trying to connect. Just try to use: docker run --rm -it ethereum/client-go \ attach http://$(ip route \ |grep "default via" \ |grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' \ |grep -m2 "" \ |tail -1):8545


1

Regarding to the https://github.com/ethereum/go-ethereum/wiki/command-line-options you can use the key: --lightkdf (Reduce key-derivation RAM & CPU usage at some expense of KDF strength)


2

I have figured out the issue and writing the answer to help anyone who face similar issue. The issue was due to incorrect use of asn object identifier for secp256k1 which is 1.3.132.0.10. Reference URL: secp256k1 ASN Object ID. Using this OID has resulted in retrieving the correct public key and I am able to transmit transaction to Ethereum blockchain now....


1

A Detailed Verification Process Blockchain wallets are what holds the Bitcoin address and also records all of your transactions. To send, receive, or store digital currencies you need to have a digital wallet. The Bitcoin address is a code created with a numbers and letters, also called a public key. The sequence of the public key can be seen by all within ...


1

The difference is what RPC method is being called under the hood. From the docs: web3.persal.getAccounts returns a list of accounts the node controls by using the provider and calling the RPC method personal_listAccounts. The results are the same as web3.eth.getAccounts() except that calls the RPC method eth_accounts.


1

Each ABAP program has a program type which must be determined in the program attributes when the program is created. There are seven program types from which you can choose: executable program, module pool, function group, class pool, interface pool, subroutine pool, and include program. All the SAP ABAP Program used name Standard, like Program name SAPM***...


1

you can check these issues on GitHub the solution to this is already provided in the issue link 1 click here link 2 click here


1

There are quite a lot of them here https://github.com/ethereum/wiki/wiki/JSON-RPC and some of them here https://github.com/ethereum/go-ethereum/wiki/Management-APIs . Hope this helps! I think, currently, there is no other rich documentation as that.


0

For geth on AWS EC2 you need the --rpcvhosts=* argument for the call to get through from an external location. My network config turned out to be fine.


1

Maybe try geth attach ~/Desktop/Tutorials/ChainSkills/miner1/geth.ipc ?


0

You can measure the transaction time spent between creation until it appears on the blockchain. Once you create the transaction you record the time with the hash in a database. When a transaction is mined you record the block timestamp. There are other time you can measure also like the first time a transaction appears in the pending pool. As said by Rob ...


0

First thing you need to acknowledge that Ethereum (like all cryptocurrencies) is decentralized peer to peer network. There is no central authority that processes all transactions. Instead, it is split by thousands of nodes worldwide, which can be hosted by anyone. When you click "send" button, you digitally sign transaction with your private key using ...


1

My question is if there is a better way of measuring the time? I suspect there is a conceptual disconnect. It's not a synchronous operation and the time is dependent on more factors than are accounted for here. Also, the rapid-fire transactions would probably lead to trouble in production if done this way. Network Throughput Yes, you are measuring the ...


0

I ran into this same issue and wasn't able to find a good answer anywhere, so I thought I'd share what fixed it for me. I was extending a base contract but not calling it's constructor. It looks like you may be doing the same thing with the ERC721 contract. Here's some solidity documentation about how to properly call base contract constructors: pragma ...


0

The accepted answer will only work for txn to a contract. For detecting ether transfers ( txn to EOAs ) you'll have to setup a listener for getting latest blocks & query on the transactions array of the block to find a match for a particular requirement.


5

When you sync your node, It fetches data previously written on the Blockchain. Hypothetically, let's say that: Node is currently syncing and had fetched the 100 first blocks the first time your account was transferred some tokens were at the block 1000 In this scenario, at that precise point, if your node is still syncing, it won't have enough data to say ...


1

The section Setting Up Networking here describes how to run a bootstrap node. It looks like you just need to provide the flag --nat with the IP address of the computer/server running the code when you run the geth command. You need to make sure you have the port you are using open appropriately as well. You can then use the geth console geth attach data/...


1

Since the resolution of ether is 18 decimals, but the resolution of an ERC20-token is not necessarily the same, you can use this: uint256 amount; uint8 decimals = ERC20Interface(token).decimals; if (decimals > 18) amount = _quantity * _tokenPrice / 10 ** (decimals - 18); else amount = _quantity * _tokenPrice * 10 ** (18 - decimals); Be sure to ...


0

Using geth attach, you need to provide the IP:PORT Example: geth attach 'http://localhost:8501' Your geth must provide RPC interface with something like this in the geth execution command: --rpc --rpcaddr '0.0.0.0' --rpcport 8501 --rpcapi 'personal,db,eth,net,web3,txpool,miner,admin,clique'


1

Bootnodes must be identified by an enode. Enodes are derived from private key. Full quote: Each ethereum node, including a bootnode is identified by an enode identifier. These identifiers are derived from a key. Therefore you will need to give the bootnode such key. Source: https://github.com/ethereum/go-ethereum/wiki/Setting-up-private-network-or-...


1

Does solidity always show that error message when the condition of require is not met? First of all, it is not Solidity which generates this error-message, it is Web3.js. Second, it is indeed arguably not the most suitable error-message because it makes one think that it has something to do with the gas, where in fact the transaction reverts because the ...


3

Azure provides an RPC security layer that enforces access control to the network. In order to provide authentication to your RPC interface you can use basic authentication, certificate based authentication or you can link to your identity provider. After you are part of the network (rpc auth passe) you have Quorum state authorization layer (what is called ...


3

You are correct - anyone with the address & ABI can call a public contract. The only way to prevent this is to have code within the contract that checks for calls from authorized addresses. If a private key is lost then the contract would need to be updated to replace that authorized address. I suggest you take a look at Quorum's smart contract based ...


1

Yes, sure, you may recover public key from your transaction using ABDK Toolkit. For this you need your transaction in raw hexadecimal format. You may again use ABDK Toolkit to convert transaction into this format. Your particular transaction in raw format looks like this: 0xf8ac1c850430e2340083015f90942608273b77ef3964ceb1fb488d4b95b30258 ...


0

You may use ABDK Toolkit to recover both, public key and address from your private key.


1

You need to sign the transaction with the private key of the account, and then send it to the node. For example (tested with Web3.js v1.2.1): async function send(web3, privateKey, gasPrice, contract, receiverAddress, numOfCoins) { const account = web3.eth.accounts.privateKeyToAccount(privateKey).address; const transaction = contract.methods....


0

What's weird is the code I'm using in my Node.js file is the exact same code I've been using in my regular client-side JS files (which are embedded into my HTML files) - which work perfectly well. You clearly have two different versions of Web3.js installed: Your client-side environment relies on Web3.js v0.x. Your NodeJS environment probably relies on ...


1

A fast sync will switch to a full sync mode as it reaches the chain tip, once enough of the state trie has been synced in fast mode. Going forward from that time, it will sync in full mode and download and evaluate each block vs. pulling just the state trie changes as in fast mode. Your node is quite close to the chain tip, and has likely passed the point ...


0

theContract.events.yourEventName is neccesary. const theContract = new web3.eth.Contract(abi, contractAddress, { from: fromAddress, gasPrice: 200000000 }); theContract.events.saleTXReceivedEvent((error, event) => { console.log(event); });


Top 50 recent answers are included