Skip to content

Commit

Permalink
feat: remove owner requirement on deploying a staged upgrade (#794)
Browse files Browse the repository at this point in the history
Given that there are precautions to remove a staged upgrade, and only
the owner or DAO can stage an upgrade, removing the owner's requirement
of deploying the upgrade is safe.

We started running into a potential issue where it may be too costly for
the DAO to deploy future Engine releases. While there is currently no
issue to stage a release, a deployment may, in fact be a bit too costly.
The DAO almost hit this limit previously as 280 Tgas was the gas
required via the DAO. Additionally, this reduces the DAO votes by 1 as
now they only have to vote on an upgrade which needs to be staged.

This should be done as a patch release on the master branch prior to any
further deployments.

---------

Co-authored-by: Oleksandr Anyshchenko <oleksandr.anyshchenko@aurora.dev>
  • Loading branch information
joshuajbouw and aleksuss committed Jul 20, 2023
1 parent f7e47dd commit c538364
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
- name: Clone the repository
uses: actions/checkout@v3
- name: Restore cache
run: |
cache-util restore cargo_git cargo_registry yarn_cache
cache-util restore aurora-engine-target@generic@${{ hashFiles('**/Cargo.lock') }}:target
run: cache-util restore cargo_git cargo_registry yarn_cache rocksdb:/root/rocksdb
- name: Preparing rocksdb library
run: scripts/ci/build_rocksdb.sh
- name: Build contracts
run: cargo make build-contracts
- name: Test contracts
Expand All @@ -38,9 +38,7 @@ jobs:
- name: Test testnet
run: cargo make --profile testnet test-workspace
- name: Save cache
run: |
cache-util save cargo_git cargo_registry yarn_cache
cache-util msave aurora-engine-target@generic@${{ hashFiles('**/Cargo.lock') }}:target
run: cache-util save cargo_git cargo_registry yarn_cache

test_modexp:
name: Test modexp suite (mainnet, testnet)
Expand Down
2 changes: 1 addition & 1 deletion engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ mod contract {
pub extern "C" fn deploy_upgrade() {
let mut io = Runtime;
let state = state::get_state(&io).sdk_unwrap();
require_owner_only(&state, &io.predecessor_account_id());
require_running(&state);
let index = internal_get_upgrade_index();
if io.block_height() <= index {
sdk::panic_utf8(errors::ERR_NOT_ALLOWED_TOO_EARLY);
Expand Down

0 comments on commit c538364

Please sign in to comment.