-
Notifications
You must be signed in to change notification settings - Fork 22
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
Support dynamically specified networks #187
base: main
Are you sure you want to change the base?
Conversation
Related to dcSpark/carp#187
* NetworkConfiguration JSON Related to dcSpark/carp#187 * remove json test * Bump CML to 6.0.0
indexer/configs/custom.yml
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do the config file dynamically with the env variable, wouldn't that be enough?
indexer/src/engine.rs
Outdated
@@ -44,6 +45,9 @@ impl< | |||
|
|||
let mut perf_aggregator = PerfAggregator::new(); | |||
|
|||
// TODO: fetch from DB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
indexer/src/sinks/cardano.rs
Outdated
) | ||
.await? | ||
} | ||
Some(prev_era) if era > prev_era => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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:
CardanoNet
config