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

Include tx compression level in calldata units cache #389

Merged
merged 3 commits into from
Dec 21, 2024

Conversation

PlasmaPower
Copy link
Collaborator

No description provided.

Copy link
Contributor

@tsahee tsahee left a comment

Choose a reason for hiding this comment

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

approved with comment


// caches
hash atomic.Pointer[common.Hash]
size atomic.Uint64
from atomic.Pointer[sigCache]
}

// GetRawCachedCalldataUnits returns the cached brotli compression level and corresponding calldata units,
// or (0, 0) if the cache is empty.
func (tx *Transaction) GetRawCachedCalldataUnits() (uint64, uint64) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make this function private (lowercase)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, it's used in nitro to retrieve the cached calldata units if any for a metric update

@PlasmaPower PlasmaPower merged commit d99138f into master Dec 21, 2024
8 checks passed
@PlasmaPower PlasmaPower deleted the tx-calldata-cache-compression branch December 21, 2024 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants