Skip to content

Commit

Permalink
Rollback for Force deploy on barnard network (#4026)
Browse files Browse the repository at this point in the history
* [force-upgrade] Commit for rollback for barnard

* [force-upgrade] fixed error hash

* [force-upgrade] fixed error hash

* [force-upgrade rollback] new barnard rollback tag

* [force-upgrade rollback] new barnard kube param for rollback time

* fix fmt

* [force-upgrade rollback] changed the stalled block number baseline after rollback

* fix test

* comment pull request merge successfully deploy net halley

* [force-upgrade rollback] revert AddressFilter::ACTIVATION_BLOCK_NUMBER to 16801958

---------

Co-authored-by: simonjiao <simonjiaoh@gmail.com>
Co-authored-by: nk_ysg <nk_ysg@163.com>
  • Loading branch information
3 people authored Apr 17, 2024
1 parent 4c24388 commit 3173f8c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ jobs:
# use sha tag for force update
SHA=$(git rev-parse --short=7 HEAD);
echo "sha: ${SHA}";
kubectl patch --namespace starcoin-halley statefulset starcoin --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"starcoin/starcoin:sha-'${SHA}'"}]'
# kubectl patch --namespace starcoin-halley statefulset starcoin --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"starcoin/starcoin:sha-'${SHA}'"}]'
8 changes: 4 additions & 4 deletions kube/manifest/starcoin-barnard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
matchLabels:
app: starcoin
serviceName: starcoin-svc
replicas: 3
replicas: 2
template:
metadata:
name: starcoin
Expand All @@ -23,7 +23,7 @@ spec:
starcoin/node-pool: seed-pool
containers:
- name: starcoin
image: ghcr.io/starcoinorg/starcoin:v1.13.8
image: ghcr.io/starcoinorg/starcoin:barnard_rollback_block_fix_force_upgrade_02
imagePullPolicy: Always
command:
- bash
Expand Down Expand Up @@ -67,7 +67,7 @@ spec:
livenessProbe:
tcpSocket:
port: 9840
initialDelaySeconds: 10
initialDelaySeconds: 600
periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 3
Expand All @@ -79,7 +79,7 @@ spec:
- -c
- >-
/starcoin/starcoin -n barnard -d /sc-data node sync status|grep Synchronized
initialDelaySeconds: 10
initialDelaySeconds: 600
periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 3
Expand Down
4 changes: 2 additions & 2 deletions network/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use std::ops::RangeInclusive;
use std::sync::Arc;

const BARNARD_HARD_FORK_PEER_VERSION_STRING_PREFIX: &str = "barnard_rollback_block_fix";
const BARNARD_HARD_FORK_VERSION: [i32; 3] = [1, 13, 7];
const BARNARD_HARD_FORK_VERSION: [i32; 3] = [1, 13, 11];

pub struct NetworkActorService {
/// Worker and inner have ChainInfo instances separately. There might be some way to solve the problem.
Expand Down Expand Up @@ -930,7 +930,7 @@ mod test {
assert!(!greater_barnard_fork_version(&v3));
let v4 = String::from("starcoin/1.12.9 (build:v1.12.9) (kele01)");
assert!(!greater_barnard_fork_version(&v4));
let v5 = String::from("starcoin/1.13.7 (build:v1.13.8-alpha) (kele01)");
let v5 = String::from("starcoin/1.13.12 (build:v1.13.12-alpha) (kele01)");
assert!(greater_barnard_fork_version(&v5));
}
}
4 changes: 2 additions & 2 deletions storage/src/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ use std::cmp::Ordering;

pub struct DBUpgrade;

pub static BARNARD_HARD_FORK_HEIGHT: BlockNumber = 16057420;
pub static BARNARD_HARD_FORK_HEIGHT: BlockNumber = 16057000;
pub static BARNARD_HARD_FORK_HASH: Lazy<HashValue> = Lazy::new(|| {
HashValue::from_hex_literal(
"0x602bb269e3a221510f82b0b812304e767457f73ac3203663bd401ef3d29bcc97",
"0x1dd5987fa3b8bffad60f7a7756e73acd7b6808fed5a174200bf49e9f5de2d073",
)
.expect("")
});
Expand Down

0 comments on commit 3173f8c

Please sign in to comment.