Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@ethers @bamos01 and others