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 v1.2.1, Move Cadence Crypto contract on-chain #6571

Merged
merged 27 commits into from
Oct 22, 2024

Conversation

turbolent
Copy link
Member

@turbolent turbolent commented Oct 17, 2024

Work towards onflow/cadence#3135

  • Update to Cadence v1.2.1 and Go SDK v1.2.2
  • Add the Crypto system contract, and e.g. deploy it to the system account during bootstrapping
  • Translate import Crypto to the chain-specific contract

@turbolent turbolent requested review from joshuahannan and a team October 17, 2024 21:40
@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 80.48780% with 16 lines in your changes missing coverage. Please review.

Project coverage is 41.14%. Comparing base (ce74abc) to head (27f56e0).
Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
...md/util/ledger/util/migration_runtime_interface.go 0.00% 7 Missing ⚠️
fvm/environment/contract_reader.go 88.88% 2 Missing and 1 partial ⚠️
fvm/evm/stdlib/checking.go 85.71% 2 Missing ⚠️
fvm/systemcontracts/system_contracts.go 50.00% 2 Missing ⚠️
utils/unittest/execution_state.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6571      +/-   ##
==========================================
+ Coverage   41.12%   41.14%   +0.01%     
==========================================
  Files        2031     2031              
  Lines      179589   179571      -18     
==========================================
+ Hits        73862    73878      +16     
+ Misses      99521    99483      -38     
- Partials     6206     6210       +4     
Flag Coverage Δ
unittests 41.14% <80.48%> (+0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@turbolent turbolent marked this pull request as ready for review October 18, 2024 21:14
fvm/fvm_test.go Outdated Show resolved Hide resolved
fvm/environment/contract_reader.go Show resolved Hide resolved
fvm/fvm_test.go Outdated Show resolved Hide resolved
@turbolent
Copy link
Member Author

Looks like this also needs an Emulator PR

@turbolent turbolent changed the title Move Cadence Crypto contract on-chain Update to Cadence v1.2.0, Move Cadence Crypto contract on-chain Oct 21, 2024
turbolent added a commit to onflow/flow-emulator that referenced this pull request Oct 21, 2024
@turbolent turbolent changed the title Update to Cadence v1.2.0, Move Cadence Crypto contract on-chain Update to Cadence v1.2.1, Move Cadence Crypto contract on-chain Oct 21, 2024
@turbolent
Copy link
Member Author

No idea why the integrations test fail, with odd errors like

could not get latest sealed block header: client: failed to construct flow.BlockHeader entity from protobuf value: protobuf message is empty

@onflow/flow-access @onflow/flow-core-protocol could you PTAL?

@turbolent
Copy link
Member Author

CI failures are probably due to the SDK update, which includes a few PRs which might cause this, e.g. onflow/flow-go-sdk#778. @illia-malachyn could you PTAL?

@illia-malachyn
Copy link
Contributor

sure. i'm looking into this

@illia-malachyn
Copy link
Contributor

illia-malachyn commented Oct 22, 2024

Hi @turbolent,

I've updated the SDK to align with the new protobuf message format, which now expects additional fields in the block header message. However, it seems these new fields are not being sent. I suspect that the code responsible for constructing block headers and sending them to peers hasn’t been updated to include the new fields.

I initially assumed that if the protobuf message was updated, the code responsible for sending the messages would also be updated accordingly.

The new fields that might be causing the issue are:

  • LastViewTimeoutCertificate (a TimeoutCertificate)
  • HighestQC (a QuorumCertificate within TimeoutCertificate)

Update 1:
TimeoutCertificate can be null. I didn't know about his. I'll fix this but we will have to move to v1.2.3 or sth to make this PR work

Update 2:
I opened a PR for this onflow/flow-go-sdk#790

@turbolent
Copy link
Member Author

@illia-malachyn Thank you for looking into this and fixing it, much appreciated! Unfortunately, I don't know anything about it. @onflow/flow-core-protocol @onflow/flow-collection-and-consensus can someone familiar with timeout certificates please review onflow/flow-go-sdk#790?

@turbolent turbolent added this pull request to the merge queue Oct 22, 2024
Merged via the queue into master with commit 6a254ed Oct 22, 2024
55 checks passed
@turbolent turbolent deleted the bastian/move-cadence-crypto-contract-onchain branch October 22, 2024 16:30
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.

6 participants