Skip to content
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

Add skeleton types types for auctions #1472

Closed
wants to merge 6 commits into from
Closed

Conversation

sveitser
Copy link
Collaborator

@sveitser sveitser commented May 16, 2024

Closes #1471

TODO

  • Sketch out validation to know if we need new information from consensus.

This PR:

This is a very early sketch based on the notion document for discussion and experimentation.

This PR does not:

Implement anything.

sveitser and others added 3 commits May 16, 2024 15:27
I'm probably going off on a limb, but its easier for me to think about
the types if there is some logic tying them together. Ultimately I
think we will expose a function to an event handler that will make the
gears turn. I believe `ViewNumber` can be passed in, and I'm guessing
`BidTx` we be as well.
// - needs to be configured in genesis block
// - needs to be updatable
/// Configuration for the auction system
struct AuctionConfig {
Copy link
Contributor

@tbro tbro May 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see in a very generic way why we need this information, but I'm having trouble reasoning about how we will actually use it. I feel like we will need to receive an event announcing the start of a phase. And from there we can use this to calculate the view at which that phase will end. Are there indeterminate spans between phases? if the end of one phase == start of next then we would only need the start of the first phase on the chain, which could just be a constant (or come from config).

fn recv_bid(&self, view: ViewNumber, bid: BidTx) {
self.update(view);
match self.phase.kind {
AuctionPhaseKind::Bid => self.send_txn(bid.as_txn()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rereading, I think the actions that will actually occur are validation and persistence.

@sveitser sveitser closed this Jul 23, 2024
@sveitser sveitser deleted the ma/auction-types branch July 23, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Layout requirements for handling auctions
2 participants