Skip to content

Commit f10e04b

Browse files
authored
Merge pull request #302 from onflow/release/v024
Release v0.24.0
2 parents 8a88a28 + 4042007 commit f10e04b

164 files changed

Lines changed: 7002 additions & 6230 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/cd.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CD Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- uses: actions/setup-go@v1
16+
with:
17+
go-version: '1.16.2'
18+
- name: Build Binaries
19+
run: make versioned-binaries
20+
- name: Uploading Binaries
21+
uses: google-github-actions/upload-cloud-storage@main
22+
with:
23+
credentials: ${{ secrets.FLOW_TEST_SA }}
24+
path: cmd/flow/flow-*
25+
destination: flow-cli-test/

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,16 @@ jobs:
2424
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
2525
restore-keys: |
2626
${{ runner.os }}-go-
27-
- run: |
27+
- name: Run tests
28+
run: |
2829
make ci
2930
make check-tidy
3031
make check-headers
32+
- name: Upload coverage report
33+
uses: codecov/codecov-action@v1
34+
with:
35+
file: ./coverage.txt
36+
flags: unittests
3137

3238
lint:
3339
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
# Coverage artifacts
88
coverage.zip
9+
coverage.txt
910
cover.json
1011
cover-summary
1112
index.html

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ COMMIT := $(shell git rev-parse HEAD)
55
# The tag of the current commit, otherwise empty
66
VERSION := $(shell git describe --tags --abbrev=0 --exact-match 2>/dev/null)
77
# Name of the cover profile
8-
COVER_PROFILE := cover.out
8+
COVER_PROFILE := coverage.txt
99
# Disable go sum database lookup for private repos
1010
GOPRIVATE := github.com/dapperlabs/*
1111
# Ensure go bin path is in path (Especially for CI)
@@ -32,10 +32,6 @@ install-tools:
3232
test:
3333
GO111MODULE=on go test -coverprofile=$(COVER_PROFILE) $(if $(JSON_OUTPUT),-json,) ./...
3434

35-
.PHONY: test-e2e
36-
test-e2e:
37-
GO111MODULE=on E2E=1 go test tests/e2e_test.go
38-
3935
.PHONY: test-e2e-emulator
4036
test-e2e-emulator:
4137
flow -f tests/flow.json emulator start

cmd/flow/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737
"github.com/onflow/flow-cli/internal/status"
3838
"github.com/onflow/flow-cli/internal/transactions"
3939
"github.com/onflow/flow-cli/internal/version"
40-
"github.com/onflow/flow-cli/pkg/flowcli/util"
40+
"github.com/onflow/flow-cli/pkg/flowkit/util"
4141
)
4242

4343
func main() {

docs/configuration.md

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Flow configuration (`flow.json`) file will contain the following properties:
3232
"accounts": {
3333
"emulator-account": {
3434
"address": "f8d6e0586b0a20c7",
35-
"keys": "ae1b44c0f5e8f6992ef2348898a35e50a8b0b9684000da8b1dade1b3bcd6ebee",
35+
"key": "ae1b44c0f5e8f6992ef2348898a35e50a8b0b9684000da8b1dade1b3bcd6ebee",
3636
}
3737
},
3838
"deployments": {},
@@ -79,15 +79,15 @@ We'll walk through each property one by one.
7979
"accounts": {
8080
"admin-account": {
8181
"address": "3ae53cb6e3f42a79",
82-
"keys": "12332967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad1111"
82+
"key": "12332967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad1111"
8383
},
8484
"user-account": {
8585
"address": "e2a8b7f23e8b548f",
86-
"keys": "22232967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad1111"
86+
"key": "22232967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad1111"
8787
},
8888
"emulator-account": {
8989
"address": "f8d6e0586b0a20c7",
90-
"keys": "2eae2f31cb5b756151fa11d82949c634b8f28796a711d7eb1e52cc301ed11111",
90+
"key": "2eae2f31cb5b756151fa11d82949c634b8f28796a711d7eb1e52cc301ed11111",
9191
}
9292
},
9393

@@ -167,7 +167,7 @@ private key.
167167
"accounts": {
168168
"admin-account": {
169169
"address": "3ae53cb6e3f42a79",
170-
"keys": "12332967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad1111"
170+
"key": "12332967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad1111"
171171
}
172172
}
173173

@@ -186,28 +186,15 @@ value that is defined on the run time to the default service address on the emul
186186
...
187187

188188
"accounts": {
189-
"admin-account-multiple-keys": {
189+
"admin-account": {
190190
"address": "service",
191-
"keys": [
192-
{
191+
"key":{
193192
"type": "hex",
194193
"index": 0,
195194
"signatureAlgorithm": "ECDSA_P256",
196195
"hashAlgorithm": "SHA3_256",
197-
"context": {
198-
"privateKey": "12332967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad1111"
199-
}
200-
},
201-
{
202-
"type": "hex",
203-
"index": 1,
204-
"signatureAlgorithm": "ECDSA_P256",
205-
"hashAlgorithm": "SHA3_256",
206-
"context": {
207-
"privateKey": "333332967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad1111"
208-
}
196+
"privateKey": "12332967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad1111"
209197
}
210-
]
211198
}
212199
}
213200

docs/create-accounts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ In the above example, the `flow.json` file would look something like this:
4040
"accounts": {
4141
"my-testnet-account": {
4242
"address": "a2c4941b5f3c7151",
43-
"keys": "12c5dfde...bb2e542f1af710bd1d40b2"
43+
"key": "12c5dfde...bb2e542f1af710bd1d40b2"
4444
}
4545
}
4646
}

docs/decode-keys.md

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,62 @@
11
---
2-
title: Decode Account Key with the Flow CLI
3-
sidebar_title: Decode Account Keys
4-
description: How to decode rlp encoded key pair from the command line
2+
title: Decode Public Keys with the Flow CLI
3+
sidebar_title: Decode Public Keys
4+
description: How to decode Flow public keys from the command line
55
---
66

7-
The Flow CLI provides a command to decode RLP encoded account key.
7+
The Flow CLI provides a command to decode encoded public account keys.
88

99
```shell
10-
flow keys decode <rlp encoded account key>
10+
flow keys decode <rlp|pem> <encoded public key>
1111
```
1212

1313
## Example Usage
1414

15+
### Decode RLP Encoded Public Key
1516
```shell
16-
> flow keys decode f847b84084d716c14b051ad6b001624f738f5d302636e6b07cc75e4530af7776a4368a2b586dbefc0564ee28384c2696f178cbed52e62811bcc9ecb59568c996d342db2402038203e8
17+
> flow keys decode rlp f847b84084d716c14b051ad6b001624f738f5d302636e6b07cc75e4530af7776a4368a2b586dbefc0564ee28384c2696f178cbed52e62811bcc9ecb59568c996d342db2402038203e8
1718

18-
Public Key 84d716c14b051ad6b001624f738f5d302636e6b07cc75e4530af7776a4368a2b586dbefc0564ee28384c2696f178cbed52e62811bcc9ecb59568c996d342db24
19+
Public Key 84d716c1...bcc9ecb59568c996d342db24
1920
Signature algorithm ECDSA_P256
2021
Hash algorithm SHA3_256
2122
Weight 1000
2223
Revoked false
2324
```
2425

26+
### Decode PEM Encoded Public Key From File
27+
```shell
28+
> flow keys decode pem --from-file key.pem
29+
30+
Public Key d479b3c...c4615360039a6660a366a95f
31+
Signature algorithm ECDSA_P256
32+
Hash algorithm UNKNOWN
33+
Revoked false
34+
35+
```
36+
37+
## Arguments
38+
39+
### Encoding
40+
- Valid inputs: `rlp`, `pem`
41+
42+
First argument specifies a valid encoding of the public key provided.
43+
44+
### Optional: Public Key
45+
- Name: `encoded public key`
46+
- Valid inputs: valid encoded key content
47+
48+
Optional second argument provides content of the encoded public key.
49+
If this argument is omitted the `--from-file` must be used instead.
50+
2551
## Flags
2652

53+
### From File
54+
55+
- Flag: `--from-file`
56+
- Valid inputs: valid filepath
57+
58+
Provide file with the encoded public key.
59+
2760
### Filter
2861

2962
- Flag: `--filter`
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## ⬆️ Install or Upgrade
2+
3+
Follow the [Flow CLI installation guide](https://docs.onflow.org/flow-cli/install/) for instructions on how to install or upgrade the CLI.
4+
5+
## 💥 Breaking Changes
6+
7+
### Cadence and Language Server Update
8+
Cadence was updated to version v0.18.0 and language server to version v0.18.2 which implements the breaking changes from flowkit library.
9+
10+
### FlowKit API Changes
11+
CLI implements a flowkit utility library which can be reused in other services. This is early stage development and the API for this library was refactored and improved.
12+
13+
## ⭐ Features
14+
15+
### Decode PEM Public Key
16+
New command for decoding PEM encoded public key. You can use the decoding command like so:
17+
```bash
18+
flow keys decode pem --from-file key.pem
19+
20+
Public Key d479b3cdc9edbddb195cb12b35161ade826b032a64bdd4062cc87fb3ba7e71c9cf646ff23990bb4532ca45c445c7e908cef278b2c4615360039a6660a366a95f
21+
Signature algorithm ECDSA_P256
22+
Revoked false
23+
24+
```
25+
26+
## 🎉 Improvements
27+
28+
### Validate Configuration
29+
Configuration validation has been improved and will provide better feedback when there are wrong values set in the `flow.json`.
30+
31+
### Updated Cobra
32+
Cobra library was updated to the latest version.
33+
34+
### Refactored Testing
35+
Testing suite was completely refactored and improved which will provide better code coverage and more reliable codebase.
36+
37+
## 🐞 Bug Fixes
38+
39+
### Refactored Event Display
40+
Events output on the transaction command was refactored, so it better handles special values in the events.
41+
42+
### Flow Init Warning
43+
Flow init command incorrectly displayed a warning which is now removed.
44+
45+
### Transaction IDs Output
46+
All commands that send transactions to the network now display that transaction ID for better visibility.
47+

docs/security.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ that is not checked into source control (e.g. excluded with `.gitignore`).
4646
"accounts": {
4747
"my-testnet-account": {
4848
"address": "3ae53cb6e3f42a79",
49-
"keys": "334232967f52bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad1111"
49+
"key": "334232967f52bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad1111"
5050
}
5151
}
5252
}
@@ -69,7 +69,7 @@ PRIVATE_KEY=key flow project deploy
6969
"accounts": {
7070
"my-testnet-account": {
7171
"address": "3ae53cb6e3f42a79",
72-
"keys": "$PRIVATE_KEY"
72+
"key": "$PRIVATE_KEY"
7373
}
7474
}
7575
...

0 commit comments

Comments
 (0)