Skip to content

Add blockbuilderpolicy upgradeability #15

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

Merged
merged 5 commits into from
Jun 20, 2025

Conversation

Melvillian
Copy link
Collaborator

No description provided.

@Melvillian Melvillian requested a review from ccashwell June 11, 2025 15:36
* add tests for upgradeability and fix tests that are obsolete because
of the new upgradeability changes
@Melvillian Melvillian force-pushed the add-blockbuilderpolicy-upgradeability branch 2 times, most recently from f9b977f to cb566ef Compare June 11, 2025 15:47
@@ -4,12 +4,6 @@
[submodule "lib/automata-dcap-attestation"]
path = lib/automata-dcap-attestation
url = https://github.com/automata-network/automata-dcap-attestation
[submodule "lib/solmate"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed these because we use OZ's OwnableUpgradeable contract instead of solmate's Ownable, and we don't need the top level openzeppelin-contracts dep anymore because we use remappings.txt to point to the openzeppelin-contracts/ dep of openzeppelin-contracts-upgradeable (see remappings.txt)

@Melvillian Melvillian force-pushed the add-blockbuilderpolicy-upgradeability branch from cb566ef to 2e6d338 Compare June 11, 2025 17:51
@Melvillian Melvillian force-pushed the add-blockbuilderpolicy-upgradeability branch from b12988b to b0862e4 Compare June 11, 2025 20:38
function setUp() public {}

function run() public {
vm.startBroadcast();
policy = new BlockBuilderPolicy(
vm.envAddress("FLASHTESTATION_REGISTRY_ADDRESS"), vm.envAddress("OWNER_BLOCK_BUILDER_POLICY")
// this is the address that stores all of the TEE-controlled addresses and their associated workloadIds
Copy link
Collaborator

Choose a reason for hiding this comment

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

For any production deploys, would recommend just adding this to the contracts deploy cli tool, unless its going to be like a one time deployment (ie only on 1 chain)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sorry, what do you mean "contracts deploy cli tool"? What is that? And once I know what it is, why would we add it to this cli tool, what are we trying to improve?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Its just a nice way to deploy contracts if we have to deploy many of the same thing, if we don't need to do that here then its prob not worth it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK I see what you mean.

Deployment has been pretty easy so far. I would add this if we get more orgs across multiple chains trying to deploy. But until that happens I'd rather keep it as it is (more simple)

require(registry != address(0), "FLASHTESTATION_REGISTRY_ADDRESS address is 0x0");
FlashtestationRegistry registryContract = FlashtestationRegistry(registry);
require(
registryContract.owner() == vm.envAddress("FLASHTESTATION_REGISTRY_OWNER"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

it seems like the registry contract is already deployed at this point? why do we need to asset the registry owner here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's just a sanity check to make sure that, before we go ahead and make the script's function call, we ensure we're working with the registry contract that we think we're working with.

@Melvillian Melvillian merged commit 75b5db9 into main Jun 20, 2025
2 checks passed
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.

2 participants