New answers tagged

2

The only option to do this is to use the takeSnapshot and revertToSnapshot functions in that same repo. When you are at a state you know you want to return to, call takeSnapshot in order to get a snapshot ID. When you want to revert to that state, simply run revertToSnapshot with that specific ID. As a note, the snapshotting function in Ganache was finicky ...


1

All the data is visible for everyone who has access to the blockchain. If it's a private blockchain you can control who has access to it. Your idea about the architecture is approximately correct with the addition that usually data is added in parallel so different entities' data get added in the same block. Different entities don't typically "wait" for ...


0

You can combine getBlockNumber (retrieve latest block number) and getBlock. Since both function are asynchronous we will use Promise.then and async/await. Full Code in NodeJs var http = require('http'); var Web3 = require('web3'); var w3 = new Web3("ws://localhost:8546"); async function queryBlock(i){ var json = await w3.eth.getBlock(i); return json; } ...


1

I though I will comment to @lunr's answer but adding as an answer due to it's length. And if that's true, will that transaction take longer to get confirmed than say a regular transfer transaction? (given they're both sent with the same gas price) The answer is it depends. Let A be a regular transaction and B be the one that consumes gas limit. Suppose ...


1

Does a transaction that requires the entire block gas limit to be executed (currently ~8M) take the entire block by itself? Yes. And if that's true, will that transaction take longer to get confirmed than say a regular transfer transaction? (given they're both sent with the same gas price) Probably. That's because including that tx in a block will be ...


Top 50 recent answers are included