Skip to content

Commit 788ccac

Browse files
committed
ethereum: remove Goerli testnet
Goerli testnet shut down April 2020.
1 parent 55c77a7 commit 788ccac

File tree

6 files changed

+15
-22
lines changed

6 files changed

+15
-22
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ customers cannot upgrade their bootloader, its changes are recorded separately.
88

99
### [Unreleased]
1010
- Update manufacturer HID descriptor to bitbox.swiss
11+
- Ethereum: remove deprecated Goerli network
1112

1213
### 9.21.0
1314
- Bitcoin: add support for sending to silent payment (BIP-352) addresses

src/rust/bitbox02-rust/src/hww/api/ethereum/params.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@ const PARAMS: &[Params] = &[
4242
name: "Ethereum",
4343
unit: "ETH",
4444
},
45-
Params {
46-
coin: None,
47-
bip44_coin: 1 + HARDENED,
48-
chain_id: 5,
49-
name: "Goerli",
50-
unit: "GOETH",
51-
},
5245
Params {
5346
coin: None,
5447
bip44_coin: 1 + HARDENED,
@@ -154,8 +147,8 @@ mod tests {
154147
assert_eq!(get(Some(EthCoin::Eth), 0).unwrap().name, "Ethereum");
155148
assert_eq!(get(Some(EthCoin::Eth), 1).unwrap().name, "Ethereum");
156149
assert_eq!(get(None, 1).unwrap().name, "Ethereum");
157-
assert_eq!(get(Some(EthCoin::Eth), 5).unwrap().name, "Goerli");
158-
assert_eq!(get(None, 5).unwrap().name, "Goerli");
150+
assert_eq!(get(Some(EthCoin::Eth), 11155111).unwrap().name, "Sepolia");
151+
assert_eq!(get(None, 11155111).unwrap().name, "Sepolia");
159152
assert_eq!(
160153
get(Some(EthCoin::Eth), 56).unwrap().name,
161154
"Binance Smart Chain"

src/rust/bitbox02-rust/src/hww/api/ethereum/pubrequest.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,11 @@ mod tests {
207207
CONFIRM_COUNTER
208208
} {
209209
1 => {
210-
assert_eq!(params.title, "Goerli");
210+
assert_eq!(params.title, "Sepolia");
211211
assert_eq!(params.body, "Warning: unusual keypath m/44'/60'/0'/0/0. Proceed only if you know what you are doing.");
212212
}
213213
2 => {
214-
assert_eq!(params.title, "Goerli");
214+
assert_eq!(params.title, "Sepolia");
215215
assert_eq!(params.body, ADDRESS);
216216
}
217217
_ => panic!("too many user confirmations"),
@@ -228,7 +228,7 @@ mod tests {
228228
coin: pb::EthCoin::Eth as _,
229229
display: true,
230230
contract_address: b"".to_vec(),
231-
chain_id: 5,
231+
chain_id: 11155111,
232232
})),
233233
Ok(Response::Pub(pb::PubResponse {
234234
r#pub: ADDRESS.into()

src/rust/bitbox02-rust/src/hww/api/ethereum/sighash.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ mod tests {
186186
var nets = []*params.ChainConfig{
187187
params.MainnetChainConfig,
188188
params.SepoliaChainConfig,
189-
params.GoerliChainConfig,
190189
&params.ChainConfig{
191190
ChainID: big.NewInt(200),
192191
LondonBlock: big.NewInt(12965000),

src/rust/bitbox02-rust/src/hww/api/ethereum/sign.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ mod tests {
630630
assert_eq!(unsafe { UI_COUNTER }, 1);
631631
}
632632

633-
/// Standard ETH transaction on an unusual keypath (Goerli on mainnet keypath)
633+
/// Standard ETH transaction on an unusual keypath (Sepolia on mainnet keypath)
634634
#[test]
635635
pub fn test_process_warn_unusual_keypath() {
636636
const KEYPATH: &[u32] = &[44 + HARDENED, 60 + HARDENED, 0 + HARDENED, 0, 0];
@@ -643,21 +643,21 @@ mod tests {
643643
CONFIRM_COUNTER
644644
} {
645645
1 => {
646-
assert_eq!(params.title, "Goerli");
646+
assert_eq!(params.title, "Sepolia");
647647
assert_eq!(params.body, "Warning: unusual keypath m/44'/60'/0'/0/0. Proceed only if you know what you are doing.");
648648
true
649649
}
650650
_ => panic!("too many user confirmations"),
651651
}
652652
})),
653653
ui_transaction_address_create: Some(Box::new(|amount, address| {
654-
assert_eq!(amount, "0.530564 GOETH");
654+
assert_eq!(amount, "0.530564 SEPETH");
655655
assert_eq!(address, "0x04F264Cf34440313B4A0192A352814FBe927b885");
656656
true
657657
})),
658658
ui_transaction_fee_create: Some(Box::new(|total, fee, longtouch| {
659-
assert_eq!(total, "0.53069 GOETH");
660-
assert_eq!(fee, "0.000126 GOETH");
659+
assert_eq!(total, "0.53069 SEPETH");
660+
assert_eq!(fee, "0.000126 SEPETH");
661661
assert!(longtouch);
662662
true
663663
})),
@@ -677,7 +677,7 @@ mod tests {
677677
value: b"\x07\x5c\xf1\x25\x9e\x9c\x40\x00".to_vec(),
678678
data: b"".to_vec(),
679679
host_nonce_commitment: None,
680-
chain_id: 5,
680+
chain_id: 11155111,
681681
address_case: pb::EthAddressCase::Mixed as _,
682682
})))
683683
.unwrap();

src/rust/bitbox02-rust/src/hww/api/ethereum/signmsg.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ mod tests {
158158
CONFIRM_COUNTER
159159
} {
160160
1 => {
161-
assert_eq!(params.title, "Goerli");
161+
assert_eq!(params.title, "Sepolia");
162162
assert_eq!(params.body, "Warning: unusual keypath m/44'/60'/0'/0/0. Proceed only if you know what you are doing.");
163163
true
164164
}
165165
2 => {
166-
assert_eq!(params.title, "Goerli");
166+
assert_eq!(params.title, "Sepolia");
167167
assert_eq!(params.body, EXPECTED_ADDRESS);
168168
true
169169
}
@@ -183,7 +183,7 @@ mod tests {
183183
keypath: KEYPATH.to_vec(),
184184
msg: MESSAGE.to_vec(),
185185
host_nonce_commitment: None,
186-
chain_id: 5,
186+
chain_id: 11155111,
187187
}))
188188
.unwrap();
189189
assert_eq!(unsafe { CONFIRM_COUNTER }, 3);

0 commit comments

Comments
 (0)