Skip to content
This repository has been archived by the owner on Feb 11, 2025. It is now read-only.

High gas costs #43

Open
bamos01 opened this issue Dec 10, 2016 · 1 comment
Open

High gas costs #43

bamos01 opened this issue Dec 10, 2016 · 1 comment

Comments

@bamos01
Copy link

bamos01 commented Dec 10, 2016

It costs about 0.04$ to add a new header in gas costs. This makes it expensive to get it current (about 10k blocks behind)- any ideas to optimize to make it easier to keep up to date?

Thanks

@ethers
Copy link
Member

ethers commented Dec 10, 2016

You're right, adding a header (80bytes and logic) has been 160-200K gas, which can be 0.004 ETH.

An available idea now that might save a little is this API for bulk inserts:
https://github.com/ethereum/btcrelay#bulkstoreheaderbytesofheaders-numberofheaders
https://github.com/ethereum/btcrelay/blob/develop/btcBulkStoreHeaders.se#L6

A number of optimizations has been implemented in the code, and any other suggestions are welcome. Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@ethers @bamos01 and others