Support dynamically specified networks - #187
Open
SebastienGllmt wants to merge 14 commits into
Open
Conversation
This was referenced Apr 29, 2024
rooooooooob
added a commit
to dcSpark/dcspark-core
that referenced
this pull request
Aug 7, 2024
Related to dcSpark/carp#187
ecioppettini
pushed a commit
to dcSpark/dcspark-core
that referenced
this pull request
Aug 27, 2024
* NetworkConfiguration JSON Related to dcSpark/carp#187 * remove json test * Bump CML to 6.0.0
SebastienGllmt
commented
Sep 14, 2024
Comment on lines
+14
to
+35
| custom_config: | ||
| chain_info: | ||
| network_id: 1 | ||
| protocol_magic: 42 | ||
| relay: | ||
| - "localhost" | ||
| - 3001 | ||
| from: | ||
| BlockHeader: | ||
| slot_nb: 1 | ||
| hash: "ba8066f73eb9cf4ad9adf38051c54d3a51d92cb98561cffc1f202b1b97739cd5" | ||
| genesis_parent: "0ded594a3411f6d3236228abc1e2ef8c2a21e09d859ea23bfc2182f92853cba8" | ||
| genesis: | ||
| BlockHeader: | ||
| slot_nb: 0 | ||
| hash: "7a32184d9e0068b0fa75fd0ecaad798f9bc573d4921c519b12968e26ff0747a3" | ||
| shelley_era_config: | ||
| first_slot: 0 | ||
| start_epoch: 0 | ||
| known_time: 1722355346 | ||
| slot_length: 1 | ||
| epoch_length_seconds: 500 |
Contributor
Author
There was a problem hiding this comment.
Not convinced about this approach. How would you convert the yaci-devkit to this data type dynamically?
Especially because the genesis config can contain stuff that we actually have to insert into the database (ex: for Shelley, the Shelley config can contain some default pools and registrations for the Shelley era that Carp would have to know about)
Contributor
There was a problem hiding this comment.
You can do the config file dynamically with the env variable, wouldn't that be enough?
SebastienGllmt
commented
Sep 14, 2024
|
|
||
| let mut perf_aggregator = PerfAggregator::new(); | ||
|
|
||
| // TODO: fetch from DB |
SebastienGllmt
commented
Sep 14, 2024
| ) | ||
| .await? | ||
| } | ||
| Some(prev_era) if era > prev_era => { |
Contributor
Author
There was a problem hiding this comment.
IIRC I never added proper rollback support since it was tricky to figure out how to handle rollbacks that undo a era transition
…s processing task
it's more or less the same thing, but the deserialization of the blocks is entirely done in cml now
This file contains hidden or 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
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.
Currently Carp only supports a fixed set of networks (preprod, preview, sanchonet, mainnet)
However, to be able to test easily on local networks, we need to support the ability to connect to a custom network whose genesis files and contents are provided after compile-time.
Missing features:
CardanoNetconfig