0

How does that parameter affect eth_call?

From the doc, this should specify a block? Does that mean it is as if the transaction were in the block?

0
  • QUANTITY => block number
  • | => or
  • TAG => one of the following strings: "latest", "earliest" or "pending"

There's also an explanation for this in "The default block parameter" part of the wiki:

When requests are made that act on the state of ethereum, the last default block parameter determines the height of the block.

The following options are possible for the defaultBlock parameter:

  • HEX String - an integer block number
  • String "earliest" for the earliest/genesis block
  • String "latest" - for the latest mined block
  • String "pending" - for the pending state/transactions
  • so if I specify the blocknum as =N=, then all blocks after =N= are ignored? EVM will process the transaction as if the chain is only of length =N= ? I guess in that case it would cost much CPU to maintain snapshots based on different =N=. – FunkyBaby Jan 26 '18 at 2:10
  • Yes, that's correct. You're just making a call on the state in that block. You don't have snapshots based on different N, the client would just query the known state for that block. (This works because of how the state data is organised.) – Richard Horrocks Jan 26 '18 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.