Skip to content

Commit 67d303a

Browse files
l-monningerandygolaymusitdevmzabaluev0xmovses
authored andcommitted
fix: Upgrade script to use usecs after timestamp upgrading timestamp logic (#1075)
Co-authored-by: Andy Golay <[email protected]> Co-authored-by: musitdev <[email protected]> Co-authored-by: Mikhail Zabaluev <[email protected]> Co-authored-by: Richard Melkonian <[email protected]> Co-authored-by: Icarus131 <[email protected]> Co-authored-by: primata <[email protected]> Co-authored-by: Icarus131 <[email protected]> Co-authored-by: Richard Melkonian <[email protected]> Co-authored-by: Radu Popa <[email protected]>
1 parent bbb8be6 commit 67d303a

File tree

15 files changed

+115
-10
lines changed

15 files changed

+115
-10
lines changed

.github/workflows/checks-all.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,34 @@ jobs:
204204
nix develop --command bash -c "just movement-full-node native build.setup.eth-holesky.celestia-local.test -t=false"
205205
nix develop --command bash -c "just movement-full-node native build.setup.eth-holesky.celestia-local.test -t=false"
206206
207+
# Elsa to Biarritz RC1
208+
movement-elsa-to-biarritz-rc1-bring-up:
209+
if: github.event.label.name == 'cicd:movement-elsa-to-biarritz-rc1' || github.ref == 'refs/heads/main'
210+
211+
strategy:
212+
matrix:
213+
include:
214+
- os: ubuntu-22.04
215+
arch: x86_64
216+
runs-on: buildjet-16vcpu-ubuntu-2204
217+
218+
runs-on: ${{ matrix.runs-on }}
219+
220+
steps:
221+
- name: Checkout repository
222+
uses: actions/checkout@v4
223+
with:
224+
submodules: true
225+
226+
- name: Install Nix
227+
uses: DeterminateSystems/nix-installer-action@main
228+
229+
- name: Run Movement Full Node Gas DoS Test
230+
env:
231+
CELESTIA_LOG_LEVEL: FATAL # adjust the log level while debugging
232+
run: |
233+
nix develop --command bash -c "just movement-full-node native build.setup.eth-local.celestia-local.gas-dos -t=false"
234+
207235
movement-celestia-da-light-node:
208236
if: false # this is effectively tested by the above
209237
strategy:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[package]
2+
name = "Minter"
3+
version = "0.0.0"
4+
5+
[dependencies.AptosFramework]
6+
git = "https://github.com/movementlabsxyz/aptos-core.git"
7+
rev = "movement"
8+
subdir = "aptos-move/framework/aptos-framework"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
script {
2+
use aptos_framework::aptos_governance;
3+
use aptos_framework::transaction_fee;
4+
5+
fun main(core_resources: &signer) {
6+
7+
let core_signer = aptos_governance::get_signer_testnet_only(core_resources, @0x1);
8+
9+
let framework_signer = &core_signer;
10+
11+
transaction_fee::burn_from(framework_signer, @0xdead, 4);
12+
13+
}
14+
}

protocol-units/da/movement/protocol/util/src/blob/ir/data.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,28 @@ pub mod block {
8080
Ok(Self::now(blob))
8181
}
8282
}
83+
84+
impl<C> TryFrom<block::Id> for InnerSignedBlobV1Data<C>
85+
where
86+
C: Curve + Verify<C> + Digester<C>,
87+
{
88+
type Error = anyhow::Error;
89+
90+
fn try_from(id: block::Id) -> Result<Self, Self::Error> {
91+
let blob = id.as_bytes().to_vec();
92+
Ok(Self::now(blob))
93+
}
94+
}
95+
96+
impl<C> TryFrom<Vec<block::Id>> for InnerSignedBlobV1Data<C>
97+
where
98+
C: Curve + Verify<C> + Digester<C>,
99+
{
100+
type Error = anyhow::Error;
101+
102+
fn try_from(ids: Vec<block::Id>) -> Result<Self, Self::Error> {
103+
let blob = bcs::to_bytes(&ids)?;
104+
Ok(Self::now(blob))
105+
}
106+
}
83107
}

protocol-units/execution/maptos/framework/migrations/elsa-to-biarritz-rc1/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pub mod dot_movement;
22

3-
use aptos_framework_biarritz_rc1_release::cached::gas_upgrade::BiarritzRc1;
3+
use aptos_framework_biarritz_rc1_release::cached::full::feature_upgrade::BiarritzRc1;
44
use maptos_framework_release_util::{Release, ReleaseSigner};
55
use std::future::Future;
66

@@ -21,7 +21,7 @@ impl ElsaToBiarritzRc1 {
2121
// upgrade to Biarritz RC1 with the gas upgrade
2222
let biarritz_rc1 = BiarritzRc1::new();
2323
biarritz_rc1
24-
.release(signer, 2_000_000, 100, 60, client)
24+
.release(signer, 2_000_000, 100, 60_000, client)
2525
.await
2626
.map_err(|e| ElsaToBiarritzRc1Error::MigrationFailed(e.into()))?;
2727

protocol-units/execution/maptos/framework/releases/biarritz-rc1/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use maptos_framework_release_util::commit_hash_with_script;
55
commit_hash_with_script!(
66
BiarritzRc1, // Struct name
77
"https://github.com/movementlabsxyz/aptos-core.git", // Repository URL
8-
"d86339c130c3a9afd9413db95412b7586b78c905", // Commit hash
8+
"aa45303216be96ea30d361ab7eb2e95fb08c2dcb", // Commit hash
99
6, // Bytecode version
1010
"biarritz-rc1.mrb", // MRB file name
1111
"CACHE_BIARRITZ_RC1_FRAMEWORK_RELEASE" // Cache environment variable for Elsa

protocol-units/execution/maptos/framework/releases/biarritz-rc1/src/cached.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use maptos_framework_release_util::mrb_release;
44
mrb_release!(
55
BiarritzRc1,
66
BIARRTIZ_RC1,
7-
"d86339c130c3a9afd9413db95412b7586b78c905-biarritz-rc1.mrb"
7+
"aa45303216be96ea30d361ab7eb2e95fb08c2dcb-biarritz-rc1.mrb"
88
);
99

1010
generate_gas_upgrade_module!(gas_upgrade, BiarritzRc1, {

protocol-units/execution/maptos/framework/releases/biarritz-rc1/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use maptos_framework_release_util::commit_hash_with_script;
77
commit_hash_with_script!(
88
BiarritzRc1, // Struct name
99
"https://github.com/movementlabsxyz/aptos-core.git", // Repository URL
10-
"d86339c130c3a9afd9413db95412b7586b78c905", // Commit hash
10+
"aa45303216be96ea30d361ab7eb2e95fb08c2dcb", // Commit hash
1111
6, // Bytecode version
1212
"biarritz-rc1.mrb", // MRB file name
1313
"CACHE_BIARRITZ_RC1_FRAMEWORK_RELEASE" // Cache environment variable for Elsa

protocol-units/execution/maptos/framework/releases/feature-flags/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ where
162162
let now_u64 = std::time::SystemTime::now()
163163
.duration_since(std::time::UNIX_EPOCH)
164164
.map_err(|e| ReleaseBundleError::Build(e.into()))?
165-
.as_secs();
165+
.as_micros() as u64;
166166
let expiration_timestamp_secs = now_u64 + expiration_timestamp_sec_offset;
167167
self.set_feature_flags(
168168
signer,

0 commit comments

Comments
 (0)