-
Notifications
You must be signed in to change notification settings - Fork 107
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
feat: support custom chain_id (e.g. for subnets) #1669
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## develop #1669 +/- ##
===========================================
- Coverage 78.17% 77.89% -0.29%
===========================================
Files 79 79
Lines 11241 11296 +55
Branches 2495 2528 +33
===========================================
+ Hits 8788 8799 +11
- Misses 2339 2376 +37
- Partials 114 121 +7
|
blockstack-devops
pushed a commit
that referenced
this pull request
Jun 10, 2023
## [7.2.0-beta.4](v7.2.0-beta.3...v7.2.0-beta.4) (2023-06-10) ### Features * support custom chain_id (e.g. for subnets) ([#1669](#1669)) ([1c6e35a](1c6e35a))
🎉 This PR is included in version 7.2.0-beta.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
blockstack-devops
pushed a commit
that referenced
this pull request
Jul 12, 2023
## [7.3.0](v7.2.2...v7.3.0) (2023-07-12) ### Features * stacking pool members endpoint ([#1592](#1592)) ([3cd6023](3cd6023)), closes [#465](#465) * support custom chain_id (e.g. for subnets) ([#1669](#1669)) ([1c6e35a](1c6e35a)) * support for subnets ([#1549](#1549)) ([5d7056c](5d7056c)) * support for subnets ([#1625](#1625)) ([bfac932](bfac932)), closes [#1549](#1549) [#1528](#1528) [#1583](#1583) [#1583](#1583) ### Bug Fixes * add indexes to pox3_events table used for stacker lookup endpoints ([86304be](86304be)) * disabled BTC faucet endpoint ([#1530](#1530)) ([ce55212](ce55212)) * domain migration ([#1596](#1596)) ([2769e68](2769e68)) * enable requests auto logging ([#1656](#1656)) ([2015b9c](2015b9c)) * fixed the order of microblocks_streamed returned in reverse order in block endpoint ([#1528](#1528)) ([764f64a](764f64a)) * log cleanup ([#1613](#1613)) ([a067e39](a067e39)) * log level issues ([#1605](#1605)) ([c3a2377](c3a2377)), closes [#1603](#1603) [#1603](#1603) [#1604](#1604) [#1604](#1604) [#1452](#1452) * npm publish step ([#1617](#1617)) ([c9cdbb6](c9cdbb6)) * optimize queries to retrieve BNS names ([#1581](#1581)) ([1a6fde1](1a6fde1)) * use chaintip-cache-control in `/stx_supply` endpoints [#1590](#1590) ([#1594](#1594)) ([a47f153](a47f153)) * use pox3 for `/extended/beta/stacking/...` endpoint ([872f7e6](872f7e6)) * warning logger level for RPC proxy errors ([#1612](#1612)) ([2454932](2454932))
🎉 This PR is included in version 7.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new environment variable that can be used to specify the network (mainnet or testnet) for a given chain_id.
For example, the current subnet testnet chain_id is
0x55005500
. This can be configured with the env var:Multiple values can be configured using comma-separated key-value pairs:
Implementation
With the introduction of subnets, there is no longer a 1-to-1 mapping between chain_id and network name. For example, it's no longer
chain_id(0x00000001) === mainnet, chain_id(0x80000000) === testnet
. Any given chain_id can now be either testnet or mainnet. So the const enum mapping between chain_id<->network has been removed, and replaced with a function that determines which network a given chain_id corresponds to.Because chain_ids for subnets can be configured dynamically / per-deployment, we do not have an known list of mappings. So a new env var has been added which allows deployments to specify chain_id<->network mappings.