Most Popular

1500 questions
10
votes
1 answer

"retrieved ancestor invalid" message during synchronization

We have been running a private ethereum network for a couple of months. Today we tried to add a new node to the network. When the node was synchronizing, (after 3-4 hours) it stopped with the following message : 5a0e number=847268 hash=0000...0000…
user813
  • 331
  • 3
  • 8
10
votes
2 answers

What is the target block time for Casper?

With PoW, the block time is around 17 seconds. What is the target block time for Casper's PoS?
Randomblue
  • 2,610
  • 2
  • 17
  • 38
10
votes
2 answers

Are Transactions originating from one account mined in nonce order?

Discussion in another thread raises an interesting point. how many transactions could be included in a new block from the same account? Since miners can opt to omit a known transaction from the block they're working on miners don't have…
Rob Hitchens
  • 55,151
  • 11
  • 89
  • 145
10
votes
2 answers

How to calculate the location index (slot) in storage of a mapping key

I read the documentation and tried some other approaches but it's not working for me. I'm not sure what I'm missing. Let's say I have a contract with a mapping and I would like to know the storage slot location for a particular key and be able to…
Jeremy Then
  • 4,599
  • 3
  • 5
  • 28
10
votes
1 answer

solidity 0.4.10 require vs throw

In this trivial example, both require and throw perform the same guard. And according to remix using the 0.4.10 compiler, both functions, when presented with a value <= 10 throw : VM Exception: invalid opcode. Other than maybe the readability of…
dbryson
  • 6,403
  • 2
  • 27
  • 37
10
votes
1 answer

MetaMask - RPC Error: The requested account and/or method has not been authorized by the user

I'm following the tutorial on https://www.toptal.com/ethereum/one-click-login-flows-a-metamask-tutorial#how-the-login-flow-works. One of the sections show an example of prompting the user's Metamask to sign a piece of data using the following in the…
Stephen Fong
  • 265
  • 2
  • 8
10
votes
2 answers

How to build a front end for dApp

I am studying about DApps and Ethereum. I did get the Solidity part but I am confused about the front-end apps. Is it possible that I use web framework like PHP Laravel/Rails for Frontend/Db operations and interact with backend Blockchain via…
Volatil3
  • 337
  • 2
  • 3
  • 12
10
votes
5 answers

Find the creator of a contract

I want to prove that a contract was deployed by a specific address (a factory contract). I have noticed that block explorers such as https://etherscan.io/ list the contract creator. How do they get this information? I cant find any way of getting a…
Joe
  • 1,173
  • 1
  • 11
  • 31
10
votes
1 answer

from solidity: TypeError: Member "log" not found or not visible after argument-dependent lookup in type(library console)

from solidity: TypeError: Member "log" not found or not visible after argument-dependent lookup in type(library console). Im using hardhats lib "hardhat/console.sol"; I want to console.log the mapping and its members also, How can I do that ? //…
10
votes
5 answers

Need help to break down large contract

related to question Best practices to solve the problem of a contract that is too large?, I am facing similar issue (contract too large to be deployed, compare to gasLimit of the blockchain) and before I launch a refactoring of my code I am seeking…
10
votes
2 answers

Getting an address from ethereumjs-utils ecrecover

I am trying to sign a string using web3.eth.sign() and then get the public key I signed with from the signature. To do this I am using ecrecover() from ethereumjs-utils, which returns a buffer. When I use bufferToHex() on the buffer it gives a hex…
Joe
  • 1,173
  • 1
  • 11
  • 31
10
votes
2 answers

Invalid array length, expected integer literal

I'm trying to declare an in-memory array with a fixed length: uint length = 10; uint[length] memory priorityList; However, it just displays this error message: Invalid array length, expected integer literal Do I have to do uint[10] memory…
johnhckuo
  • 341
  • 4
  • 13
10
votes
1 answer

Truffle Dapp only works when I first use `truffle migrate --reset`

When I first load my Dapp with testrpc the functionality doesn't work until I use the command truffle migrate --reset Any ideas why?
ethereal
  • 1,805
  • 2
  • 14
  • 25
10
votes
2 answers

Unable to define greeterContract in the Greeter tutorial. Breaking change in Solidity 0.4.9!

I was following the Greeter tutorial on Go Ethereum wiki and got stuck on the "var greeterContract = web3.eth.contract(greeterCompiled.greeter.info.abiDefinition)" phase returning TypeError: Cannot access member 'info' of undefined. I have solC…
Henrik
  • 103
  • 4
10
votes
2 answers

Programmatically saving the contract address of a submitted contract

I understand how the below web3js code block works, adapted from here: https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethcontract But how does one save the contract address programmatically? One could, I suppose, open a file and persist…
NYCeyes
  • 235
  • 1
  • 9