Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Cadence v0.19.0 #1265

Merged
merged 18 commits into from
Sep 8, 2021
Merged

Update to Cadence v0.19.0 #1265

merged 18 commits into from
Sep 8, 2021

Conversation

SupunS
Copy link
Member

@SupunS SupunS commented Sep 8, 2021

Bumps the Cadence version to v0.19.0

Also includes unit test fixes @janezpodhostnik did in #1199

NOTE: I noticed a few intermittent test failures. Retriggering the CI changes the status of these test failures (sometimes unit tests and other times its integration tests). Not sure if it's a CI issue (caching maybe?), an issue in the test case, or an actual bug in the code.

Comment on lines -142 to -144
if version <= 3 {
decodeFunction = interpreter.DecodeValueV3
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Version 3 is no longer available/possible.

"github.com/onflow/flow-go/ledger"
)

func TestStorageFormatV4Migration(t *testing.T) {
Copy link
Member Author

Choose a reason for hiding this comment

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

These tests are also no longer valid. storage_v4.go file was left only for reference.

@@ -47,7 +47,7 @@ func TestBootstrapLedger(t *testing.T) {
}

func TestBootstrapLedger_ZeroTokenSupply(t *testing.T) {
expectedStateCommitmentBytes, _ := hex.DecodeString("96af74917f39a5fc689260e5066c9ab19ff93c27a555ef27f3e95e04e9d12856")
expectedStateCommitmentBytes, _ := hex.DecodeString("4951e30c1c7aa71cb01ce0d744e45c357a6456f10047663da1af997a384b7d51")
Copy link
Member

Choose a reason for hiding this comment

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

NOTE: These are changed on purpose, as the storage layer is slightly altered here.

@@ -19,7 +19,7 @@ import (
const ServiceAccountPrivateKeyHex = "e3a08ae3d0461cfed6d6f49bfc25fa899351c39d1bd21fdba8c87595b6c49bb4cc430201"

// Pre-calculated state commitment with root account with the above private key
const GenesisStateCommitmentHex = "2fac1ddd9cdf8d036e97fed716f70183ce75b944eb1fde7cc97cb0a7ebcb4959"
const GenesisStateCommitmentHex = "d199da82127e0da6304191bb89296683cfafa65fe5cd6d7a91d743ee2e1b95d0"
Copy link
Member

Choose a reason for hiding this comment

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

NOTE: These are changed on purpose, as the storage layer is slightly altered here.

@codecov-commenter
Copy link

Codecov Report

Merging #1265 (4ea2cfc) into master (e87550c) will decrease coverage by 0.20%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1265      +/-   ##
==========================================
- Coverage   56.22%   56.02%   -0.21%     
==========================================
  Files         497      497              
  Lines       30388    30386       -2     
==========================================
- Hits        17087    17025      -62     
- Misses      10975    11051      +76     
+ Partials     2326     2310      -16     
Flag Coverage Δ
unittests 56.02% <ø> (-0.21%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/util/ledger/migrations/storage_v4.go 4.87% <ø> (-37.30%) ⬇️
...sus/approvals/assignment_collector_statemachine.go 47.11% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e87550c...4ea2cfc. Read the comment docs.

@Kay-Zee
Copy link
Member

Kay-Zee commented Sep 8, 2021

As this is mainly a version bump, will merge, inorder include in release

@Kay-Zee Kay-Zee merged commit 464258f into master Sep 8, 2021
@Kay-Zee Kay-Zee deleted the supun/cadence-v0.19.0 branch September 8, 2021 05:38
bors bot added a commit that referenced this pull request Sep 8, 2021
1264: Add storage migration to inject static types to cadence values r=Kay-Zee a=SupunS

## Description:
This migration adds static types info to cadence values with missing type info. This is required for onflow/cadence#870

**Depends on:** #1265 

## Steps to run:
- Build the binary with:
  ```
  GOOS=linux GOARCH=amd64 go build ./cmd/util
  ```
- Run with the following command. Here `<checkpoint-dir>` is the directory where the checkpoint file is located.  `<output-dir>` is the directory where outputs will be generated (assumes `<output-dir>` exists).
  ```
  ./util execution-state-extract --execution-state-dir <checkpoint-dir> --output-dir <output-dir>
  ```
- To remove broken contracts and clean up the storage, add ` --cleanup-storage` flag. e.g:
  ```
  ./util execution-state-extract --execution-state-dir <checkpoint-dir> --output-dir <output-dir> --cleanup-storage
  ```

Co-authored-by: Bastian Müller <bastian@axiomzen.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants