Skip to content

Commit

Permalink
Merge pull request #2924 from nervosnetwork/rc/v0.111.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY authored Nov 7, 2023
2 parents 572f4bb + 9e5dac6 commit df66a6c
Show file tree
Hide file tree
Showing 108 changed files with 2,517 additions and 644 deletions.
2 changes: 1 addition & 1 deletion .ckb-light-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.2.4
v0.3.0
2 changes: 1 addition & 1 deletion .github/workflows/check_checksums.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo ::set-output name=body::$body
echo "body=$body" >> $GITHUB_OUTPUT
- uses: peter-evans/commit-comment@v2
with:
Expand Down
35 changes: 33 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,39 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"

- name: Setup Certificate
if: matrix.os == 'windows-2019'
run: |
echo "${{ secrets.SM_CLIENT_CERT_FILE_BASE64 }}" | base64 --decode > /d/Certificate_pkcs12.p12
shell: bash

- name: Set variables
if: matrix.os == 'windows-2019'
run: |
echo "SM_KEYPAIR_NAME=${{ secrets.SM_KEYPAIR_ALIAS }}" >> "$GITHUB_ENV"
echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV"
echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.SM_CLIENT_CERT_PASSWORD }}" >> "$GITHUB_ENV"
echo "C:\Program Files (x86)\Windows Kits\10\App Certification Kit" >> $GITHUB_PATH
echo "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools" >> $GITHUB_PATH
echo "C:\Program Files\DigiCert\DigiCert One Signing Manager Tools" >> $GITHUB_PATH
shell: bash

- name: Setting up the client tools
if: ${{ matrix.os == 'windows-2019' && env.SM_API_KEY != '' }}
run: |
curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o smtools-windows-x64.msi
msiexec /i smtools-windows-x64.msi /quiet /qn
C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user
shell: cmd

- name: Certificates Sync
if: ${{ matrix.os == 'windows-2019' && env.SM_API_KEY != '' }}
run: |
smctl windows certsync
shell: cmd

- name: Install libudev
if: matrix.os == 'ubuntu-20.04'
run: |
Expand Down Expand Up @@ -88,8 +121,6 @@ jobs:
bash ./scripts/release.sh win
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.WIN_CERTIFICATE_BASE64 }}
CSC_KEY_PASSWORD: ${{ secrets.WIN_CERTIFICATE_PASSWORD }}

- name: Package for Linux
if: matrix.os == 'ubuntu-20.04'
Expand Down
47 changes: 34 additions & 13 deletions .github/workflows/package_for_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,39 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"

- name: Setup Certificate
if: matrix.os == 'windows-2019'
run: |
echo "${{ secrets.SM_CLIENT_CERT_FILE_BASE64 }}" | base64 --decode > /d/Certificate_pkcs12.p12
shell: bash

- name: Set variables
if: matrix.os == 'windows-2019'
run: |
echo "SM_KEYPAIR_NAME=${{ secrets.SM_KEYPAIR_ALIAS }}" >> "$GITHUB_ENV"
echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV"
echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV"
echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.SM_CLIENT_CERT_PASSWORD }}" >> "$GITHUB_ENV"
echo "C:\Program Files (x86)\Windows Kits\10\App Certification Kit" >> $GITHUB_PATH
echo "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools" >> $GITHUB_PATH
echo "C:\Program Files\DigiCert\DigiCert One Signing Manager Tools" >> $GITHUB_PATH
shell: bash

- name: Setting up the client tools
if: ${{ matrix.os == 'windows-2019' && env.SM_API_KEY != '' }}
run: |
curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o smtools-windows-x64.msi
msiexec /i smtools-windows-x64.msi /quiet /qn
C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user
shell: cmd

- name: Certificates Sync
if: ${{ matrix.os == 'windows-2019' && env.SM_API_KEY != '' }}
run: |
smctl windows certsync
shell: cmd

- name: Install libudev
if: matrix.os == 'ubuntu-20.04'
run: |
Expand Down Expand Up @@ -101,19 +134,7 @@ jobs:
SKIP_NOTARIZE: true

- name: Package for Windows
if: ${{ matrix.os == 'windows-2019' && env.WIN_CERTIFICATE_BASE64 != '' }}
run: |
bash ./scripts/download-ckb.sh win
yarn build
bash ./scripts/copy-ui-files.sh
bash ./scripts/package-for-test.sh win
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.WIN_CERTIFICATE_BASE64 }}
CSC_KEY_PASSWORD: ${{ secrets.WIN_CERTIFICATE_PASSWORD }}

- name: Package for Windows for skip code sign
if: ${{ matrix.os == 'windows-2019' && env.WIN_CERTIFICATE_BASE64 == '' }}
if: matrix.os == 'windows-2019'
run: |
bash ./scripts/download-ckb.sh win
yarn build
Expand Down
38 changes: 35 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# 0.111.1 (2023-11-08)

### CKB Node & Light Client

- [[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.
- [CKB Light [email protected]](https://github.com/nervosnetwork/ckb-light-client/releases/tag/v0.3.0) was released on Nov. 2nd, 2023. This version of CKB Light Client is now bundled and preconfigured in Neuron

#### Important

**CKB Light Client on Mainnet** is active and available in Neuron 👏. See how to enable Light Client on Mainnet on YouTube: https://www.youtube.com/watch?v=Vl2LGRNqnvk

[![Light Client on Mainnet](https://github.com/nervosnetwork/neuron/assets/7271329/97fb7848-350d-4d45-ab2d-1e79dd3c9716)](https://www.youtube.com/watch?v=Vl2LGRNqnvk)

#### Caveat

◆ "Internal Node" network option is reserved for the built-in CKB node for clarity, and won't be connected to an external CKB node anymore.

### Assumed valid target

Block before `0x79cecdd6f41361e2474290224751284312a018528d1d92f4e18dd6d542feddfe`(at height `11,204,206`) will be skipped in validation.(https://github.com/nervosnetwork/neuron/pull/2923)

---

## New features

- #2913: Use KeyLocker to sign Neuron for Windows, conforming to the new industry standards effective since June 1, 2023.(@keith-cy)
- #2921: Add network option of "Light Client(Mainnet)", and reserve "Internal Node" for built-in CKB Node only.(@yanguoyu)


**Full Changelog**: https://github.com/nervosnetwork/neuron/compare/v0.111.0...v0.111.1


# 0.111.0 (2023-10-19)

### CKB Node & Light Client
Expand All @@ -17,9 +49,9 @@ Block before `0xd5e25ad24400f237aa5f72f3738a9ae77fe082a89937e75143fcc8ef5b009383

## Bug fixes

* #2869: Add a dialog for migration.(@yanguoyu)
* #2870: Fix width of navbar.(@yanguoyu)
* #2873: Fix fallback font on Linux.(@yanguoyu)
- #2869: Add a dialog for migration.(@yanguoyu)
- #2870: Fix width of navbar.(@yanguoyu)
- #2873: Fix fallback font on Linux.(@yanguoyu)


**Full Changelog**: https://github.com/nervosnetwork/neuron/compare/v0.110.3...v0.111.0
Expand Down
4 changes: 1 addition & 3 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
[default.extend-words]
thur = "thur"
numer = "numer"

# defined in database schema
lastest = "lastest"

[files]
extend-exclude = ["CHANGELOG.md", "**/migrations/*.ts"]



11 changes: 6 additions & 5 deletions compatible.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CKB,0.110,0.109,0.108,0.107,0.106,0.105,0.104,0.103
Neuron,,,,,,,,
0.110,yes,yes,no,no,no,no,no,no
0.106,no,no,yes,yes,yes,yes,no,no
0.103,no,no,no,no,no,no,yes,yes
CKB,0.111,0.110,0.109,0.108,0.107,0.106,0.105,0.104,0.103
Neuron,,,,,,,,,
0.111,yes,yes,yes,no,no,no,no,no,no
0.110,yes,yes,yes,no,no,no,no,no,no
0.106,no,no,no,yes,yes,yes,yes,no,no
0.103,no,no,no,no,no,no,no,yes,yes
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packages": ["packages/*"],
"version": "0.111.0",
"version": "0.111.1",
"npmClient": "yarn",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "neuron",
"productName": "Neuron",
"description": "CKB Neuron Wallet",
"version": "0.111.0",
"version": "0.111.1",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "neuron-ui",
"version": "0.111.0",
"version": "0.111.1",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand Down
10 changes: 5 additions & 5 deletions packages/neuron-ui/src/components/DataSetting/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useState } from 'react'
import React, { useCallback, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import {
getCkbNodeDataPath,
Expand All @@ -7,11 +7,11 @@ import {
stopProcessMonitor,
setCkbNodeDataPath,
} from 'services/remote'
import { isSuccessResponse, useDidMount } from 'utils'
import { isSuccessResponse } from 'utils'

const type = 'ckb'

export const useDataPath = () => {
export const useDataPath = (network?: State.Network) => {
const [t] = useTranslation()
const [isSaving, setIsSaving] = useState(false)
const [savingType, setSavingType] = useState<string | null>()
Expand All @@ -20,13 +20,13 @@ export const useDataPath = () => {
const [isDialogOpen, setIsDialogOpen] = useState(false)
const [faidMessage, setFaidMessage] = useState('')

useDidMount(() => {
useEffect(() => {
getCkbNodeDataPath().then(res => {
if (isSuccessResponse(res)) {
setPrevPath(res.result!)
}
})
})
}, [network?.id])
const onSetting = useCallback(() => {
invokeShowOpenDialog({
buttonLabel: t('settings.data.set', { lng: navigator.language }),
Expand Down
42 changes: 13 additions & 29 deletions packages/neuron-ui/src/components/DataSetting/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import React, { useCallback, useEffect, useState, useRef, useMemo } from 'react'
import React, { useCallback, useRef, useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import Button from 'widgets/Button'
import ClearCache from 'components/ClearCache'
import { useDispatch, useState as useGlobalState } from 'states'
import { shell } from 'electron'
import { getIsCkbRunExternal } from 'services/remote'
import { isSuccessResponse } from 'utils'
import Tooltip from 'widgets/Tooltip'
import Dialog from 'widgets/Dialog'
import AlertDialog from 'widgets/AlertDialog'
import { LIGHT_NETWORK_TYPE } from 'utils/const'
import { NetworkType } from 'utils/const'
import { Attention } from 'widgets/Icons/icon'
import { useDataPath } from './hooks'

Expand Down Expand Up @@ -42,6 +40,12 @@ const PathItem = ({
const DataSetting = () => {
const dispatch = useDispatch()
const [t] = useTranslation()
const resyncRef = useRef<HTMLButtonElement | null>(null)
const {
chain: { networkID },
settings: { networks = [] },
} = useGlobalState()
const network = useMemo(() => networks.find(n => n.id === networkID), [networkID, networks])
const {
onSetting,
prevPath,
Expand All @@ -53,38 +57,20 @@ const DataSetting = () => {
savingType,
faidMessage,
setFaidMessage,
} = useDataPath()

const resyncRef = useRef<HTMLButtonElement | null>(null)
} = useDataPath(network)

const openPath = useCallback(() => {
if (prevPath) {
shell.openPath(prevPath!)
}
}, [prevPath])
const [isCkbRunExternal, setIsCkbRunExternal] = useState<boolean | undefined>()
useEffect(() => {
getIsCkbRunExternal().then(res => {
if (isSuccessResponse(res)) {
setIsCkbRunExternal(res.result ?? false)
} else {
// ignore
}
})
}, [])
const {
chain: { networkID },
settings: { networks = [] },
} = useGlobalState()
const isLightClient = useMemo(
() => networks.find(n => n.id === networkID)?.type === LIGHT_NETWORK_TYPE,
[networkID, networks]
)
const isLightClient = network?.type === NetworkType.Light
const hiddenDataPath = isLightClient || !network?.readonly
return (
<>
<div className={styles.root}>
<div className={styles.leftContainer}>
{isLightClient ? null : (
{hiddenDataPath ? null : (
<div className={styles.label}>
<div>{t('settings.data.ckb-node-data')}</div>
<Tooltip
Expand All @@ -110,9 +96,7 @@ const DataSetting = () => {
</div>
</div>
<div className={styles.rightContainer}>
{isLightClient ? null : (
<PathItem path={prevPath} openPath={openPath} handleClick={onSetting} disabled={isCkbRunExternal} />
)}
{hiddenDataPath ? null : <PathItem path={prevPath} openPath={openPath} handleClick={onSetting} />}
<ClearCache
className={styles.item}
btnClassName={styles.itemBtn}
Expand Down
4 changes: 2 additions & 2 deletions packages/neuron-ui/src/components/HDWalletSign/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { DeviceSignIndex as DeviceSignIndexSubject } from 'services/subjects'

import styles from '../HardwareSign/hardwareSign.module.scss'

const { MAINNET_TAG } = CONSTANTS
const { MAINNET_CLIENT_LIST } = CONSTANTS

const HDWalletSign = ({ tx }: { tx: State.DetailedTransaction }) => {
const [t] = useTranslation()
Expand All @@ -33,7 +33,7 @@ const HDWalletSign = ({ tx }: { tx: State.DetailedTransaction }) => {
throw new Error('Cannot find current network in the network list')
}

setIsMainnet(network.chain === MAINNET_TAG)
setIsMainnet(MAINNET_CLIENT_LIST.includes(network.chain))
}
})
.catch(err => console.warn(err))
Expand Down
7 changes: 2 additions & 5 deletions packages/neuron-ui/src/components/HistoryDetailPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,16 @@ import Tooltip from 'widgets/Tooltip'

import {
ErrorCode,
CONSTANTS,
localNumberFormatter,
uniformTimeFormatter,
shannonToCKBFormatter,
isSuccessResponse,
isMainnet as isMainnetUtil,
} from 'utils'
import { HIDE_BALANCE } from 'utils/const'

import styles from './historyDetailPage.module.scss'

const { MAINNET_TAG } = CONSTANTS

type InputOrOutputType = (State.DetailedInput | State.DetailedOutput) & { idx: number }

const InfoItem = ({ label, value, className }: { label: string; value: React.ReactNode; className?: string }) => (
Expand All @@ -46,8 +44,7 @@ const HistoryDetailPage = () => {
settings: { networks },
wallet: currentWallet,
} = useGlobalState()
const network = networks.find(n => n.id === networkID)
const isMainnet = network != null && network.chain === MAINNET_TAG
const isMainnet = isMainnetUtil(networks, networkID)
const [t] = useTranslation()
const [transaction, setTransaction] = useState(transactionState)
const [error, setError] = useState({ code: '', message: '' })
Expand Down
Loading

3 comments on commit df66a6c

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 6786647947

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'%0A'### Downloads'%0A''%0A'OS | Arch | Package | SHA256 Checksum'%0A'-- | -- | -- | --'%0A'Windows | x64 | exe | d13c02ae0f2cbffadcd26547f467cb5e449c302db6f35da94af77771343bd07c'%0A'macOS | x64 | zip | ee7033965b4ea1422ea6f4626ae3a3d4bbecda574c715c2bd47a3fa1099fca7d'%0A'macOS | arm64 | zip | 01afd9d62b3a3fdd0db653e7ed53ca29278ff754d82bf327c68a40d19ebc5a63'%0A'macOS | x64 | DMG | dad349d5ab67ef54ac08a8457e9ea1a3354c64737fe1260dc35e96d6bbae5bbc'%0A'macOS | arm64 | DMG | abef081706d1d3b64162196e2fa744380ad922b43a48d5eb0b36214b54d0831a'%0A'Linux | x64 | AppImage | fe5b1231fe2c98bc20cc0b00472890c3d2f9706311a2e2fa4f019650c04bc449

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 6791782395

Please sign in to comment.