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

Integrate with CheckpointManager.sol #952

Conversation

goran-ethernal
Copy link
Collaborator

@goran-ethernal goran-ethernal commented Nov 22, 2022

Description

PR integrates the most recent changes for CheckpointManager smart contract.

Note: Polybft e2e test are failing, because we are still waiting for the parameterized epoch size support and quorum check fixes on smart contracts.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual test

Precondition: core-contracts must be pre-compiled before running following commands.
Order of commands is important

go run . polybft-secrets --data-dir test-chain- --num 4
go run . rootchain server
go run . genesis --block-gas-limit 10000000 --validator-set-size=4 --consensus polybft --epoch-size 5 --bridge
go run . rootchain init-contracts
go run . rootchain fund --data-dir test-chain- --num 4
go run . server --data-dir ./test-chain-1 --chain genesis.json --grpc-address :5001 --libp2p :30301 --jsonrpc :9545 --seal --log-level DEBUG
go run . server --data-dir ./test-chain-2 --chain genesis.json --grpc-address :5002 --libp2p :30302 --jsonrpc :10002 --seal --log-level DEBUG
go run . server --data-dir ./test-chain-3 --chain genesis.json --grpc-address :5003 --libp2p :30303 --jsonrpc :10003 --seal --log-level DEBUG
go run . server --data-dir ./test-chain-4 --chain genesis.json --grpc-address :5004 --libp2p :30304 --jsonrpc :10004 --seal --log-level DEBUG

Notice that logs of Edge nodes have the following message:
"send checkpoint txn success"

@goran-ethernal goran-ethernal self-assigned this Nov 22, 2022
@goran-ethernal goran-ethernal force-pushed the EVM-218-start-using-updated-version-of-submit-checkpoint branch 2 times, most recently from 47098f8 to 7eb4464 Compare November 23, 2022 08:31
@codecov
Copy link

codecov bot commented Nov 23, 2022

Codecov Report

Merging #952 (36bf704) into feature/v3-parity (e96eeda) will decrease coverage by 0.05%.
The diff coverage is 71.00%.

❗ Current head 36bf704 differs from pull request most recent head 73fac00. Consider uploading reports for the commit 73fac00 to get more accurate results

@@                  Coverage Diff                  @@
##           feature/v3-parity     #952      +/-   ##
=====================================================
- Coverage              55.36%   55.30%   -0.06%     
=====================================================
  Files                    167      167              
  Lines                  22357    22408      +51     
=====================================================
+ Hits                   12378    12393      +15     
- Misses                  9005     9034      +29     
- Partials                 974      981       +7     
Impacted Files Coverage Δ
consensus/polybft/contracts_initializer.go 0.00% <0.00%> (ø)
consensus/polybft/polybft.go 19.14% <0.00%> (ø)
consensus/polybft/system_state.go 59.61% <0.00%> (-1.78%) ⬇️
consensus/polybft/wallet/key.go 51.51% <0.00%> (-7.11%) ⬇️
consensus/polybft/consensus_runtime.go 62.59% <42.85%> (-0.18%) ⬇️
consensus/polybft/wallet/account.go 43.33% <60.00%> (+1.82%) ⬆️
consensus/polybft/checkpoint_manager.go 67.51% <81.48%> (+1.60%) ⬆️
chain/chain.go 25.64% <100.00%> (+2.29%) ⬆️
consensus/polybft/extra.go 86.29% <100.00%> (ø)
consensus/polybft/validator_metadata.go 86.28% <100.00%> (+0.07%) ⬆️
... and 1 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Stefan-Ethernal Stefan-Ethernal added the feature New update to Polygon Edge label Nov 23, 2022
@Stefan-Ethernal Stefan-Ethernal force-pushed the EVM-218-start-using-updated-version-of-submit-checkpoint branch 2 times, most recently from b22d230 to dfbe820 Compare November 24, 2022 09:49
@goran-ethernal goran-ethernal force-pushed the EVM-218-start-using-updated-version-of-submit-checkpoint branch 2 times, most recently from 7234119 to 2df1a11 Compare November 24, 2022 10:56
@Stefan-Ethernal Stefan-Ethernal force-pushed the EVM-218-start-using-updated-version-of-submit-checkpoint branch 4 times, most recently from 5f7cbf5 to 102bd10 Compare November 29, 2022 10:24
@Stefan-Ethernal Stefan-Ethernal changed the base branch from feature/v3-parity to kilic-bn254 November 29, 2022 15:07
@Stefan-Ethernal Stefan-Ethernal marked this pull request as ready for review November 29, 2022 15:08
Base automatically changed from kilic-bn254 to feature/v3-parity November 30, 2022 07:15
@Stefan-Ethernal Stefan-Ethernal force-pushed the EVM-218-start-using-updated-version-of-submit-checkpoint branch from c7718f2 to cca8f2f Compare November 30, 2022 07:16
Copy link
Contributor

@igorcrevar igorcrevar left a comment

Choose a reason for hiding this comment

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

lgtm

chain/chain.go Outdated Show resolved Hide resolved
@Stefan-Ethernal Stefan-Ethernal force-pushed the EVM-218-start-using-updated-version-of-submit-checkpoint branch from 36bf704 to f7ddd10 Compare November 30, 2022 13:58
* Provide epochSize to the ChildValidatorSet

* Rename newBls map key

* Rename parameters

* Point to our branch in core-contracts

Co-authored-by: Goran Rojovic <goran.rojovic@ethernal.tech>
@goran-ethernal goran-ethernal merged commit a219437 into feature/v3-parity Nov 30, 2022
@goran-ethernal goran-ethernal deleted the EVM-218-start-using-updated-version-of-submit-checkpoint branch November 30, 2022 19:39
@github-actions github-actions bot locked and limited conversation to collaborators Nov 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New update to Polygon Edge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants