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

rename chainID to blockchainID #92

Merged
merged 9 commits into from
Dec 1, 2023
Merged

Conversation

geoff-vball
Copy link
Contributor

@geoff-vball geoff-vball commented Nov 28, 2023

Why this should be merged

chainID usually refers to an ethereum chainID, which is set in the chain genesis. This is distinct from blockchainID, which uniquely identifies a subnet on Avalanche, and is the hash of the P-Chain tx that creates the blockchain. We have used chainID in many places that should be blockchainID, so this PR looks to disambiguate them.

Note: chainID always appears as a *big.Int or uint256, whereas blockchainID is a [32]byte.

Related Teleporter PR ava-labs/icm-contracts#156

closes #70

How this works

How this was tested

How is this documented

cam-schultz
cam-schultz previously approved these changes Nov 28, 2023
Copy link
Collaborator

@cam-schultz cam-schultz left a comment

Choose a reason for hiding this comment

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

LGTM, just one note about a further update we'll need to make in teleporter. We can wait to make that at the same time we update the awm-relayer version though.

@@ -38,7 +38,7 @@ type MessageProtocolConfig struct {
}
type SourceSubnet struct {
SubnetID string `mapstructure:"subnet-id" json:"subnet-id"`
ChainID string `mapstructure:"chain-id" json:"chain-id"`
BlockchainID string `mapstructure:"blockchain-id" json:"blockchain-id"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

We'll have to update https://github.com/ava-labs/teleporter/blob/main/docker/relayerConfigTemplate.json to match the new config options. It looks like that slipped through the cracks of the other PR.

cam-schultz
cam-schultz previously approved these changes Nov 29, 2023
Copy link
Contributor

@bernard-avalabs bernard-avalabs left a comment

Choose a reason for hiding this comment

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

LGTM

config/config.go Outdated Show resolved Hide resolved
Copy link
Contributor

@bernard-avalabs bernard-avalabs left a comment

Choose a reason for hiding this comment

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

LGTM

@geoff-vball geoff-vball merged commit ffccd45 into main Dec 1, 2023
5 checks passed
@geoff-vball geoff-vball deleted the gstuart/chainID-to-blockchainID branch December 1, 2023 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Rename "chainID" to "blockchainID"
4 participants