-
Notifications
You must be signed in to change notification settings - Fork 0
Message-Based Testing #42
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
base: main
Are you sure you want to change the base?
Conversation
1f2845d
to
a87de3c
Compare
@@ -109,6 +155,16 @@ impl State { | |||
} | |||
} | |||
|
|||
/// Returns a reference to the block state at a specified height, if applicable |
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.
Worth noting that there will only be (k=2160) blocks in the history - anything older than that is thrown away. So great if you just want to capture the tip without race conditions, but you can't use for historical stuff.
processes/golden_tests/README.md
Outdated
@@ -0,0 +1,12 @@ | |||
# Acropolis 'omnibus' process |
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.
Update required ;-)
processes/golden_tests/README.md
Outdated
## How to run it | ||
|
||
```shell | ||
$ cd processes/omnibus |
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.
Update
processes/golden_tests/golden.toml
Outdated
@@ -0,0 +1,71 @@ | |||
#TODO: setup configuration as needed | |||
# Top-level configuration for Acropolis omnibus process |
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.
Update
processes/golden_tests/golden.toml
Outdated
[startup] | ||
topic = "cardano.sequence.start" | ||
|
||
[message-bus.external] |
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.
Don't need this - generally I wonder if the config should be the minimum necessary to run the tests we've actually implemented so far...
ledger-state/cddl/common.cddl
Outdated
@@ -0,0 +1,31 @@ | |||
; This file contains some some basic, shared types that are used throughout the ledger state specification. | |||
|
|||
hash_28 = bytes .size 32 |
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.
Forgive my ignorance, but is this size a typo?
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.
Yes, this size is absolutely a typo 🤦
No ignorance there lol
This is very incomplete, the UTxO CDDL definition is not complete and there are some issues we've encountered with cddl-codegen for generating types around generics, for example. We've discussed a few potential solutions to these problems in Slack. Though it's not complete, we're getting everything merged in a state where at least it's clear what needs to be worked on when we get back to it, due to priority shifts at IO. What is left todo in this specific commit: - Complete the UTxO definition - Once the CDDL is complete that defines the output from the Haskell node, write a simple tool that converts from that representation to the canonical representation. - Provide some initial test data to use (just testing SPO module to start)
I've marked this PR as "Ready for Review" now, even though it's clearly not done. I left some notes for whoever picks up this work once we get time to focus back on Acropolis in commit 0e0a742 Merging this will make it easier to pick back up in the future, less "loose ends" to tie up in N months once we forget everything. @sandtreader If you think there is any other documentation or notes I should leave, please let me know. Otherwise, feel free to merge this whenever you think the time is right. |
It's also worth noting that I included the generated code from cddl-codegen that Simon and I were using as we were debugging/identifying issues with cddl-codegen, as we discussed in Slack. I don't want our definition of a canonical ledger state to be influenced by any particular tool's shortcomings, but I felt it was helpful context to have when we pick things back up in the future. |
This PR introduces:
ledger_state
type that handles the loading and decoding of a canonical ledger state (to be defined)snapshot_bootstrapper
module that constructs the aboveledger_state
and broadcastsSnapshotState
messages with each element of theledger_state
spo_state
module to load state from aSnapshotState
messageTODO: