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

Using blobhash() #68

Merged
merged 5 commits into from
Jan 30, 2024
Merged

Using blobhash() #68

merged 5 commits into from
Jan 30, 2024

Conversation

qzhodl
Copy link
Contributor

@qzhodl qzhodl commented Jan 29, 2024

Try to fix #62

@qzhodl qzhodl requested a review from syntrust January 29, 2024 11:15
@syntrust syntrust mentioned this pull request Jan 29, 2024
@syntrust
Copy link
Contributor

Gas usage of putBlob:
before using blobhash(): first blob 117,274, later 98074
after using blobhash(): first 110,306. later 93187

@qzhodl qzhodl requested a review from qizhou January 29, 2024 11:47
@qzhodl qzhodl changed the title DRAFT: Using blobhash() Using blobhash() Jan 29, 2024
Copy link
Contributor

@qizhou qizhou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@qizhou qizhou merged commit 456f185 into main Jan 30, 2024
@qizhou
Copy link
Contributor

qizhou commented Jan 30, 2024

Gas usage of putBlob: before using blobhash(): first blob 117,274, later 98074 after using blobhash(): first 110,306. later 93187

I am a bit surprised about the gas cost. Do you have the contract and tx deploy on testnets?

@qzhodl
Copy link
Contributor Author

qzhodl commented Jan 30, 2024

Gas usage of putBlob: before using blobhash(): first blob 117,274, later 98074 after using blobhash(): first 110,306. later 93187

I am a bit surprised about the gas cost. Do you have the contract and tx deploy on testnets?

Here is a gas profile for pubBlob for the very first putting: https://dashboard.tenderly.co/tx/goerli/0xbb283594dd1129dfcaaa35f5cc04d10af02759454a894162ab47aa05317897fe/gas-usage

@qzhodl
Copy link
Contributor Author

qzhodl commented Jan 30, 2024

@qizhou
Copy link
Contributor

qizhou commented Jan 30, 2024

An optimization is proposed here #70

@qzhodl
Copy link
Contributor Author

qzhodl commented Jan 30, 2024

An optimization is proposed here #70

Storage contract is a proxy implementation, so its constructor can't accept any parameters, and that's why we don't use immutable

@qizhou
Copy link
Contributor

qizhou commented Jan 31, 2024

An idea is to use ClonesWithImmutableArgs.sol (employed by OP) https://goerli.etherscan.io/address/0x666C3d298B9c360990F901b3Eded4e7a9d7AD446#code#F2#L5

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

Successfully merging this pull request may close these issues.

Use HASH_OPCODE to get a blob hash directly
3 participants