-
Notifications
You must be signed in to change notification settings - Fork 88
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
Make the explorer persistent #1281
Conversation
a63bf7b
to
7c02218
Compare
7c02218
to
6bdb200
Compare
Transactions CostsSizes and execution budgets for Hydra protocol transactions. Note that unlisted parameters are currently using
Script summary
Cost of Init Transaction
Cost of Commit TransactionThis is using ada-only outputs for better comparability.
Cost of CollectCom Transaction
Cost of Close Transaction
Cost of Contest Transaction
Cost of Abort TransactionSome variation because of random mixture of still initial and already committed outputs.
Cost of FanOut TransactionInvolves spending head output and burning head tokens. Uses ada-only UTxO for better comparability.
End-To-End Benchmark ResultsThis page is intended to collect the latest end-to-end benchmarks results produced by Hydra's Continuous Integration system from the latest Please take those results with a grain of salt as they are currently produced from very limited cloud VMs and not controlled hardware. Instead of focusing on the absolute results, the emphasis should be on relative results, eg. how the timings for a scenario evolve as the code changes. Generated at 2024-02-02 15:05:56.046757007 UTC Baseline Scenario
Baseline Scenario
|
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.
IMO this creates more problems than it helps the way it is currently implemented (see my comment about explorer-state
).
Furthermore, I don't even agree to the Why of this PR (although I like that you have spelled it out). Would have been better if we discuss this before you spend time on this (although it seemed to be doable quickly)
import Hydra.Network (PortNumber) | ||
import Hydra.Logging.Messages (HydraLog (..)) | ||
import Hydra.Network (Host (..)) | ||
import Hydra.Node (HydraNodeLog (..)) |
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.
Should: not re-use hydra-node
library, but create new trace data types.
This makes it harder to decouple this later from it (and hydra-chain-observer
). Also, we are not logging from a hydra-node
here, but from the explorer.
<> case networkId of | ||
Mainnet -> ["--mainnet"] | ||
Testnet (NetworkMagic magic) -> ["--testnet-magic", show magic] | ||
<> Options.toArgStartChainFrom startChainFrom |
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.
Could: make this consistent
Either use all the toArg
functions or none.
Eventually we need to get rid of using them anyway as we can not depend on hydra-node
or hydra-chain-observer
when we do #1282
traceWith nodeTracer LoadedState{numberOfEvents = fromIntegral $ length events} | ||
let initialState = mempty | ||
recoveredSt = foldl' aggregateOnChainTx initialState events | ||
newTVarIO recoveredSt |
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.
Must: include chain information in persisted data to avoid inconsistencies by design
This explorer-state
seems not to include any information about which point on the chain was last seen. Hence, we can easily "miss heads" if we start the explorer, stop it and then start it again after a few minutes (e.g. when doing maintenance)
This must be avoided! Having an explorer synchronizing everything from a fixed point (--start-chain-from
or even genesis) is strictly more correct than this half-way persisting. Also, it is not a big problem if starting the explorer takes a few minutes before it is fully live (can be controlled by the --start-chain-from
option).
I would like to discuss the premise of this whole PR please.
Closed as rejected. |
Why
Once we start hosting the explorer, it becomes necessary to upgrade the backend with every release. Maintaining persistence eliminates the need to restart the explorer from genesis during each upgrade.
What
The explorer now incrementally persists on-chain transactions and recovers its state based on them.