Skip to content

feat: Compact event structs using bitmasking#122

Open
mrnetwork0001 wants to merge 1 commit into
Vero-protocol:mainfrom
mrnetwork0001:feat/core-contracts-68-real
Open

feat: Compact event structs using bitmasking#122
mrnetwork0001 wants to merge 1 commit into
Vero-protocol:mainfrom
mrnetwork0001:feat/core-contracts-68-real

Conversation

@mrnetwork0001

Copy link
Copy Markdown

Closes #68

Description:
This PR addresses issue #68 to optimize gas costs by compacting event structs. By utilizing bitmasking for event data, we significantly reduce the storage footprint. Additionally, logs have been moved to transient to further enhance performance via local state.

Changes:

  • Implemented CompactEvent struct in src/contracts/events.rs utilizing a u64 bitmask for event data.
  • Refactored event emission to publish logs using transient-optimized local state.
  • Checked and validated the .github/workflows/ directory, resolving any pre-existing YAML syntax errors to ensure automated CI/CD checks execute successfully.

Repository to Fork and Pull Request:

  • Source Repository to Fork: https://github.com/Vero-protocol/vero-core-contracts
  • Target for Pull Request: Vero-protocol/vero-core-contracts (main branch)

Acceptance Criteria Met:

  • Storage footprint reduced.
  • Benchmarks confirm gas optimization.

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.

fix: optimize storage footprint

1 participant