When emotions overpower rational thought

All of us hold onto experiences we would rather forget. Our suppressed memories are what can help us navigate the present. We have to learn the skill of taking advice from our past selves.

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Ethex.market 1.0

During testing we discovered a number of things that will make any DApp challenging to develop. I’ll write about these now in case it’s helpful to other developers.

Etherscan and Infura are awesome free Ethereum blockchain providers; however, they can make things difficult for great DApps. For instance, the getLogs function on these services can be extremely slow. We have clocked response times of up to 5 seconds for a single query. Sometimes nodes fail to respond at all.

One blockchain query to get all the tokens ever transferred to an address. We are going to need count limit and reverse searches, but this is a great start.

In theory getLogs is extremely useful. Two calls can provide token balances for a particular address. However Ethereum nodes respond to this query by creating a bloom filter based upon topics, then search through 5–6 million blocks for likely candidates. In practice getLogs is storage efficient, but too slow to be used for DApps.

When public nodes use load balancers, your client might get two different views of the blockchain. For instance, you might query a provider and find that a new block has arrived. However, when you query the blockchain again, you could be redirected to another machine that hasn’t included that block yet. This means that your client will miss any relevant updates in the new block. It’s difficult to track down why, and this only happens occasionally.

Behind the scenes we have deployed our own provider. We still use public providers as a fall back. In the future we want users to be able to configure their own provider, too.

Our provider caches getLogs then uses a load balancer for other requests or uncached queries. The cache server also makes sure that blockNumber is correct so there isn’t confusion about the current block.

Add a comment

Related posts:

Ahorra comisiones al viajar al extranjero

Dicen que gastarnos el dinero en experiencias da mucha más felicidad que gastarlo en cosas materiales. Y en el caso de los millennials, está claro que gastarnos el dinero en viajar es la mejor forma…

WYSIWYG

That word up there? I know it probably looks entirely unintelligible. But though nonsensical in appearance, when deconstructed, actually packs quite a punch. It’s pronounced wuzzywig and stands for…

How you can use OpenVPN to safely access private AWS resources

This article was adapted from part of my new Pluralsight course, “Connecting On-prem Resources to your AWS Infrastructure.” Do you sometimes need to connect to resources you’ve got running on Amazon…