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

all: v2 refactoring to use feed byte identifier #23

Merged
merged 19 commits into from
Nov 27, 2023

Conversation

pmerkleplant
Copy link
Member

Refactors Scribe to use the first byte of a feed's address as their identifier instead of a "random" storage index. This allows backend systems to not have to know an instance's internal state in order to create the IScribe.SchnorrData payload.

Breaking Changes:

  • IScribe.SchnorrData.signersBlob got renamed to IScribe.SchnorrData.feedIds
  • IScribe's SignerNotFeed(address signer) renamed to error InvalidFeedId(uint8 feedId)
  • IScribe's SignersNotOrdered() renamed to error DoubleSigningAttempted(uint8 feedId);
    • Note that double signing is now prevented via bloom filter usage instead of expecting strict ordering
  • The FeedLifted and FeedDropped events updated to emit the feed's id instead of their index
  • Removed function maxFeeds()(uint8). The maximum number of supported feeds is type(uint8).max + 1
  • feeds read and management functions updated to take/return feed ids instead of indexes
  • lift and drop function updated to take/return feed ids instead of indexes
  • IScribeOptimistic::opFeedIndex() updated to opFeedId()

This PR shall only be merged once the changes are audited!

@pmerkleplant
Copy link
Member Author

Force pushed to rebase to v1.2.0.

@pmerkleplant
Copy link
Member Author

Force push to rebase to current main.
Diff to main only touched offchain code, namely chaincheck and docker/

Copy link

openzeppelin-code bot commented Nov 2, 2023

all: v2 refactoring to use feed byte identifier

Generated at commit: 876c2498e33cb5d0234e8f652e33e4b2254dedd7

🚨 Vulnerabilities Summary

Process Issues Results
Contract Inspector high
note
low
critical
Total
1
25
6
1
33
Dependency Checker Total 0

For more details view the full report in OpenZeppelin Code

@pmerkleplant pmerkleplant merged commit 41f25a8 into main Nov 27, 2023
6 checks passed
@pmerkleplant pmerkleplant deleted the v2_feed_byte_identifier branch November 27, 2023 12:20
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.

1 participant