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

Common/Monorepo: Remove NetworkId #3513

Merged
merged 8 commits into from
Jul 18, 2024
Merged

Conversation

holgerd77
Copy link
Member

This PR removes networkId from Common and upstream usages and configuration files. Client is keeping for now as a CLI option (but deprecated) for a smoother transition on things like Docker and stuff.

Ready for review! 🙂

@@ -63,12 +61,12 @@ describe('[Common]: Custom chains', () => {

it('custom() -> behavior', () => {
let common = createCustomCommon({ chainId: 123 })
assert.deepEqual(common.networkId(), BigInt(1), 'should default to mainnet base chain')
assert.equal(common.consensusAlgorithm(), 'casper', 'should default to mainnet base chain')
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this right? Why are we not checking chainID?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's correct, the goal of this test is to not check for the value passed (chainId), but to check that the other values remain the mainnet-specific ones.

Copy link
Contributor

@gabrocheleau gabrocheleau left a comment

Choose a reason for hiding this comment

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

Left some minor comments

Copy link

codecov bot commented Jul 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.71%. Comparing base (ef20930) to head (9c9d038).
Report is 10 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (ef20930) and HEAD (9c9d038). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (ef20930) HEAD (9c9d038)
devp2p 1 0
common 1 0
Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
blockchain 85.64% <ø> (?)
common ?
devp2p ?
evm 68.91% <ø> (?)
genesis 0.00% <ø> (?)
statemanager 64.52% <ø> (ø)
trie 53.11% <ø> (+0.03%) ⬆️
util 69.68% <ø> (ø)
vm 58.53% <ø> (?)

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

Co-authored-by: Gabriel Rocheleau <contact@rockwaterweb.com>
@holgerd77
Copy link
Member Author

Have addressed, ready for re-review!

holgerd77 and others added 2 commits July 18, 2024 09:08
Co-authored-by: Scotty <66335769+ScottyPoi@users.noreply.github.com>
Copy link
Member

@jochem-brouwer jochem-brouwer left a comment

Choose a reason for hiding this comment

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

LGTM!

@holgerd77 holgerd77 merged commit 3bd1847 into master Jul 18, 2024
34 checks passed
@holgerd77 holgerd77 deleted the common-remove-network-id branch July 18, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants