-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: add proxy and deployment scripts #70
Conversation
Also make the deployProxyContract task typed, so it's more explicit about the contracts we're supporting and what constructor arguments they need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, a question and typescript nit.
SedaDataTypes.RequestInputs calldata inputs | ||
) public override(RequestHandlerBase) whenNotPaused returns (bytes32) { | ||
// Check max replication factor first | ||
if (inputs.replicationFactor > maxReplicationFactor) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this check here/is there a reason to have an additional limit here? I understand the need for a lot of duplicate data on the contract, but this one seems weird to me?
The chain core contract already checks RF cannot be greater than number of executors. Just seems like extra unneeded/maintenance, but ig could be good to show you can do it as a reference implementation that you can limit the RF here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. However we are deprecating the SedaCorePermissioned, sot his contract will become most likely like a contract to test deployments.
import * as fs from 'node:fs/promises'; | ||
import * as path from 'node:path'; | ||
import * as readline from 'node:readline'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a nit, if we are using Bun
I think it would be preferable to use the Bun
API over the node
one's where possible. Bun doesn't have replacements for everything yet, but for some it does. Bun.file
for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's nice about using the node APIs is that if people check out this repo and use node
instead of bun
like we recommend it will still work. Given how flexible the core prover contracts are there's a fair chance that people will fork this to tweak it and using the node
APIs doesn't hurt us :)
Motivation
This PR introduces UUPS (Universal Upgradeable Proxy Standard) proxy pattern support to improve the upgradeability of our smart contracts. This change also led us to consider storage slots (in detriment of gaps) and update many things such as the deployment scripts.
Explanation of Changes
The main changes include:
Implementation of UUPS proxy pattern:
Chores:
Storage and Request Handling:
Testing
Tests covered:
Related PRs and Issues