Skip to content

Commit 288aaac

Browse files
committed
Merge branch 'develop'
2 parents a5d27a7 + a8bf38d commit 288aaac

File tree

10 files changed

+158
-16
lines changed

10 files changed

+158
-16
lines changed

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
# 0.111.0 (2023-10-19)
2+
3+
### CKB Node & Light Client
4+
5+
- [[email protected]](https://github.com/nervosnetwork/ckb/releases/tag/v0.111.0) was released on Sep. 14nd, 2023. This version of CKB node is now bundled and preconfigured in Neuron.
6+
- [CKB Light [email protected]](https://github.com/nervosnetwork/ckb-light-client/releases/tag/v0.2.4) was released on May. 28th, 2023. This version of CKB Light Client is now bundled and preconfigured in Neuron
7+
8+
#### Caveat
9+
10+
**CKB Light Client** is only activated on testnet, thus only `light testnet` is enabled in Neuron. **CKB Light Client on Mainnet** requires an activation on the mainnet, the timetable can be found at https://github.com/nervosnetwork/ckb/releases/tag/v0.110.1.
11+
12+
### Assumed valid target
13+
14+
Block before `0xd5e25ad24400f237aa5f72f3738a9ae77fe082a89937e75143fcc8ef5b009383`(at height `11,204,855`) will be skipped in validation.(https://github.com/nervosnetwork/neuron/pull/2881)
15+
16+
---
17+
18+
## Bug fixes
19+
20+
* #2869: Add a dialog for migration.(@yanguoyu)
21+
* #2870: Fix width of navbar.(@yanguoyu)
22+
* #2873: Fix fallback font on Linux.(@yanguoyu)
23+
24+
25+
**Full Changelog**: https://github.com/nervosnetwork/neuron/compare/v0.110.3...v0.111.0
26+
27+
128
# 0.110.3 (2023-10-11)
229

330
### CKB Node & Light Client

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"packages": ["packages/*"],
3-
"version": "0.110.3",
3+
"version": "0.111.0",
44
"npmClient": "yarn",
55
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
66
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "neuron",
33
"productName": "Neuron",
44
"description": "CKB Neuron Wallet",
5-
"version": "0.110.3",
5+
"version": "0.111.0",
66
"private": true,
77
"author": {
88
"name": "Nervos Core Dev",

packages/neuron-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "neuron-ui",
3-
"version": "0.110.3",
3+
"version": "0.111.0",
44
"private": true,
55
"author": {
66
"name": "Nervos Core Dev",

packages/neuron-wallet/.env

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ DAO_CODE_HASH=0x82d76d1b75fe2fd9a27dfbaa65a039221a380d76c926f378d3f81cf3e7e13f2e
117117
MULTISIG_CODE_HASH=0x5c5069eb0857efc65e1bca0c07df34c31663b3622fd3876c876320fc9634e2a8
118118

119119
# CKB NODE OPTIONS
120-
CKB_NODE_ASSUME_VALID_TARGET='0xc0c532e10c708852d9586be46a5ed8317b2aa0835c721aa691abffb9bf4a26cd'
121-
122-
CKB_NODE_ASSUME_VALID_TARGET='0x6b6db6bb23e6e98f63b88e6cd38fa49f46980e5b816f620c71c6c9c74633ee54'
120+
CKB_NODE_ASSUME_VALID_TARGET='0xd5e25ad24400f237aa5f72f3738a9ae77fe082a89937e75143fcc8ef5b009383'
123121

124122
WALLET_CONNECT_PROJECT_ID=9200911ea59e455fe56bd123a15ff7d2

packages/neuron-wallet/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"productName": "Neuron",
44
"description": "CKB Neuron Wallet",
55
"homepage": "https://www.nervos.org/",
6-
"version": "0.110.3",
6+
"version": "0.111.0",
77
"private": true,
88
"author": {
99
"name": "Nervos Core Dev",
@@ -98,7 +98,7 @@
9898
"electron-builder": "23.6.0",
9999
"electron-devtools-installer": "3.2.0",
100100
"jest-when": "3.5.2",
101-
"neuron-ui": "0.110.3",
101+
"neuron-ui": "0.111.0",
102102
"typescript": "5.0.4"
103103
}
104104
}

packages/neuron-wallet/src/controllers/export-debug.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,18 @@ export default class ExportDebugController {
137137
}
138138

139139
private async addHdPublicKeyInfoCsv() {
140-
const addressMetas = await AddressService.getAddressesByAllWallets()
141-
let csv = 'walletId,addressType,addressIndex,publicKeyInBlake160\n'
142-
for (const addressMeta of addressMetas) {
143-
const row = `${addressMeta.walletId},${addressMeta.addressType},${addressMeta.addressIndex},${addressMeta.blake160}\n`
144-
csv += row
140+
try {
141+
const addressMetas = await AddressService.getAddressesByAllWallets()
142+
let csv = 'walletId,addressType,addressIndex,publicKeyInBlake160\n'
143+
for (const addressMeta of addressMetas) {
144+
const row = `${addressMeta.walletId},${addressMeta.addressType},${addressMeta.addressIndex},${addressMeta.blake160}\n`
145+
csv += row
146+
}
147+
const csvFileName = 'hd_public_key_info.csv'
148+
this.archive.append(csv, { name: csvFileName })
149+
} catch (error) {
150+
logger.error(`Export Debug:\t export public key info error: ${error}`)
145151
}
146-
const csvFileName = 'hd_public_key_info.csv'
147-
this.archive.append(csv, { name: csvFileName })
148152
}
149153

150154
private addLogFiles = (files = ['main.log', 'renderer.log']) => {

packages/neuron-wallet/src/utils/logger.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import env from '../env'
44
if (!env.isDevMode) {
55
logger.transports.file.level = 'info'
66
}
7+
logger.transports.file.format = '[{iso}] [{level}] {text}'
8+
9+
logger.transports.console.format = '[{iso}] [{level}] {text}'
710

811
// logger.catchErrors({ showDialog: false })
912

scripts/generate-checksum-table.js

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
// use this script as 'node ./generate-checksum-table.js ./binaries' where Neuron binaries sit in ./binaries
2+
const fs = require('node:fs')
3+
const path = require('node:path')
4+
const crypto = require('node:crypto')
5+
6+
class Package {
7+
_name
8+
_directory
9+
10+
get arch() {
11+
const name = this._name
12+
if (name.endsWith('.exe') || name.includes('-x64') || name.includes('x86_64')) {
13+
return 'x64'
14+
}
15+
16+
if (name.includes('-arm64')) {
17+
return 'arm64'
18+
}
19+
20+
throw new Error(`Unknown arch: ${name}`)
21+
}
22+
23+
get os() {
24+
const name = this._name
25+
if (name.endsWith('.exe')) {
26+
return 'Windows'
27+
}
28+
29+
if (name.includes('-mac-') || name.endsWith('.dmg')) {
30+
return 'macOS'
31+
}
32+
33+
if (name.endsWith('.AppImage')) {
34+
return 'Linux'
35+
}
36+
37+
throw new Error(`Unknown OS: ${name}`)
38+
}
39+
40+
get package() {
41+
const ext = path.extname(this._name).slice(1)
42+
if (ext === 'dmg') return 'DMG'
43+
return ext
44+
}
45+
46+
get url() {
47+
const version = this._name.split('-')[1]
48+
return `https://github.com/nervosnetwork/neuron/releases/download/${version}/${this._name}`
49+
}
50+
51+
get checksum() {
52+
const binary = fs.readFileSync(path.join(this._directory, this._name))
53+
const hash = crypto.createHash('sha256')
54+
hash.update(binary)
55+
return hash.digest('hex')
56+
}
57+
58+
constructor(directory, name) {
59+
this._directory = directory
60+
this._name = name
61+
}
62+
63+
toEntry() {
64+
return `${this.os} | ${this.arch} | [${this.package}](${this.url}) | <code>${this.checksum}</code>\n`
65+
}
66+
}
67+
68+
const getChecksumTable = (directory) => {
69+
let table = `OS | Arch | Package | SHA256 Checksum\n-- | -- | -- | --\n`
70+
71+
const files = fs.readdirSync(directory).filter((f) => ['.dmg', '.zip', '.exe', '.AppImage'].includes(path.extname(f)))
72+
files
73+
.map((f) => {
74+
return new Package(directory, f)
75+
})
76+
.sort((a, b) => {
77+
if (a.os !== b.os) {
78+
if (a.os === 'Windows') return -1
79+
if (a.os === 'Linux') return 1
80+
}
81+
82+
if (a.package !== b.package) {
83+
return a.package === 'zip' ? -1 : 1
84+
}
85+
86+
if (a.arch !== b.arch) {
87+
return a.arch === 'x64' ? -1 : 1
88+
}
89+
})
90+
.forEach((p) => {
91+
table += p.toEntry()
92+
})
93+
94+
return table
95+
}
96+
97+
if (process.argv.length < 3) {
98+
throw new Error(`Directory of binaries is required, use command as 'node ./generate-checksum-table.js ./binaries`)
99+
}
100+
101+
const directory = process.argv[2]
102+
103+
const checksumTable = getChecksumTable(directory)
104+
105+
console.info(checksumTable)
106+
107+
const output = path.join(directory, './checksums.txt')
108+
fs.writeFileSync(output, checksumTable, { flag: 'wx' })
109+
110+
console.info(`Checksum table has been generated at ${output}`)

scripts/release-checksums.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def get_sha256_checksum(url)
3434
macOS | arm64 | [zip](#{macos_arm64_zip}) | <code>#{macos_arm64_zip_sha256}</code>
3535
macOS | x64 | [DMG](#{macos_x64_dmg}) | <code>#{macos_x64_dmg_sha256}</code>
3636
macOS | arm64 | [DMG](#{macos_arm64_dmg}) | <code>#{macos_arm64_dmg_sha256}</code>
37-
Linux | x64 | [AppImage](#{linux_appimage}) | <code>#{linux_appimage_sha256}</code>
37+
Linux | x64 | [AppImage](#{linux_appimage}) | <code>#{linux_appimage_sha256}</code>
3838
)
3939

4040
puts checksums

0 commit comments

Comments
 (0)