Skip to content

Commit fd54c29

Browse files
l-monningerandygolaymusitdevmzabaluev0xmovses
authored andcommitted
fix: Gas Upgrades and Beta Fixes (#1055)
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 d7fa03a commit fd54c29

File tree

24 files changed

+319
-182
lines changed

24 files changed

+319
-182
lines changed

.github/workflows/build-push-containers-all.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ jobs:
7676

7777
- name: Read the commit SHA
7878
id: vars
79-
run: echo "CONTAINER_REV=${{ github.ref }}" >> .env
79+
run: |
80+
commit_hash=$(git rev-parse HEAD | cut -c1-7)
81+
echo CONTAINER_REV=${commit_hash}
82+
echo "CONTAINER_REV=${commit_hash}" >> .env
83+
8084
8185
- name: Display .env file
8286
run: cat .env

.github/workflows/checks-all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
-p move-rocks \
6666
-p movement-types \
6767
-p movement-config \
68-
-p movement-celestia-da-util \
68+
-p movement-da-util \
6969
-p movement-signer-test
7070
7171
movement-full-node-local:

Cargo.lock

Lines changed: 56 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ members = [
4545
"util/signing/integrations/aptos",
4646
"util/signing/providers/aws-kms",
4747
"util/signing/providers/hashicorp-vault",
48+
"util/signing/testing",
4849
"demo/hsm",
4950
"protocol-units/execution/maptos/framework/releases/*",
5051
"protocol-units/execution/maptos/framework/migrations/*",
@@ -361,9 +362,9 @@ http-body-util = "0.1"
361362
tap = "1.0.1"
362363

363364
# trying to pin diesel
364-
diesel = { version = "2.2.4", features = ["postgres", "numeric", "r2d2"] }
365+
diesel = { version = "2.2.7", features = ["postgres", "numeric", "r2d2"] }
365366
diesel_migrations = { version = "2.2.0" }
366-
bigdecimal = "0.4.0"
367+
bigdecimal = "0.3"
367368
num_cpus = "=1.16.0"
368369
ahash = "=0.8.11"
369370

docker/build/movement-full-node/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ RUN rust_binary="./target/release/movement-full-node"; dest_dir="/tmp/runtime";
1717

1818
FROM alpine:latest
1919

20+
# Install dependencies: git
21+
RUN apk add --no-cache git
22+
2023
# Copy the build artifact from the builder stage
2124
COPY --from=builder /tmp/build/target/release/movement-full-node /app/movement-full-node
2225
COPY --from=builder /tmp/runtime/nix/store /nix/store
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: "3"
2+
3+
processes:
4+
5+
setup:
6+
environment:
7+
- "KNOWN_FRAMEWORK_RELEASE=elsa"
8+
9+
test-migrate-elsa-to-biarritz-rc1:
10+
command: |
11+
cargo run --bin movement-full-node admin bring-up elsa-to-biarritz-rc1 upgrade 0x1 0x2 0x3
12+
depends_on:
13+
movement-full-node:
14+
condition: process_healthy
15+
movement-faucet:
16+
condition: process_healthy

process-compose/movement-full-node/process-compose.test-migrate-elsa-to-biarritz-rc1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ processes:
44

55
setup:
66
environment:
7-
- "KNOWN_FRAMEWORK_RELEASE=biarritz-rc1"
7+
- "KNOWN_FRAMEWORK_RELEASE=elsa"
88

99
test-migrate-elsa-to-biarritz-rc1:
1010
command: |

protocol-units/bridge/indexer-db/Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ publish = { workspace = true }
1010
rust-version = { workspace = true }
1111

1212
[dependencies]
13-
diesel = { workspace = true, features = ["postgres", "numeric", "r2d2", "chrono"] }
14-
diesel_migrations = { workspace = true }
15-
bigdecimal = { workspace = true }
13+
# Use specific version different from Aptos core one.
14+
# Could use workplace version when Aptos core will have upgrade for a more recent version.
15+
diesel = { version = "2.2.4", features = ["postgres", "numeric", "r2d2", "chrono"] }
16+
diesel_migrations = { version = "2.2.0" }
17+
bigdecimal = "0.4.0"
18+
1619
serde = { workspace = true }
1720
bridge-util = { workspace = true }
18-
bridge-config = { workspace = true }
1921
anyhow = { workspace = true }
2022
hex = { workspace = true }
2123
chrono = { workspace = true }

protocol-units/bridge/indexer-db/src/client.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use crate::migrations::run_migrations;
22
use crate::models::*;
33
use crate::schema::*;
4-
use bridge_config::Config;
54
use bridge_util::chains::bridge_contracts::BridgeContractEvent;
65
use bridge_util::types::BridgeTransferId;
76
use bridge_util::TransferActionType;
@@ -23,8 +22,8 @@ impl Client {
2322
Self { conn }
2423
}
2524

26-
pub fn from_bridge_config(config: &Config) -> Result<Self, anyhow::Error> {
27-
let conn = PgConnection::establish(&config.indexer.indexer_url)
25+
pub fn build_from_db_url(db_url: &str) -> Result<Self, anyhow::Error> {
26+
let conn = PgConnection::establish(&db_url)
2827
.map_err(|e| anyhow::anyhow!("Failed to connect to postgresql instance: {}", e))?;
2928
Ok(Self::new(conn))
3029
}

protocol-units/bridge/indexer-db/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use crate::client::Client;
2-
use bridge_config::Config;
32
use bridge_util::chains::bridge_contracts::BridgeContractMonitoring;
43
use bridge_util::types::BridgeTransferId;
54
use bridge_util::TransferActionType;
@@ -16,7 +15,7 @@ pub async fn run_indexer_client<
1615
SOURCE: Send + TryFrom<Vec<u8>> + std::clone::Clone + 'static + std::fmt::Debug,
1716
TARGET: Send + TryFrom<Vec<u8>> + std::clone::Clone + 'static + std::fmt::Debug,
1817
>(
19-
config: Config,
18+
db_url: String,
2019
mut stream_source: impl BridgeContractMonitoring<Address = SOURCE>,
2120
mut stream_target: impl BridgeContractMonitoring<Address = TARGET>,
2221
_relayer_actions: Option<mpsc::Sender<(BridgeTransferId, TransferActionType)>>,
@@ -25,7 +24,7 @@ where
2524
Vec<u8>: From<SOURCE>,
2625
Vec<u8>: From<TARGET>,
2726
{
28-
let mut indexer_db_client = match Client::from_bridge_config(&config) {
27+
let mut indexer_db_client = match Client::build_from_db_url(&db_url) {
2928
Ok(mut client) => {
3029
client.run_migrations()?;
3130
client

0 commit comments

Comments
 (0)