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

Setting up vbs integration #448

Merged
merged 10 commits into from
Mar 20, 2024
Merged

Setting up vbs integration #448

merged 10 commits into from
Mar 20, 2024

Conversation

nyospe
Copy link
Contributor

@nyospe nyospe commented Feb 29, 2024

where
State: 'static + Send + Sync + ReadState,
<State as ReadState>::State: Send + Sync + AvailabilityDataSource<Types>,
Payload<Types>: QueryablePayload,
{
let mut api = load_api::<State, Error>(
let mut api = load_api::<State, Error, MAJOR_VERSION, MINOR_VERSION>(
options.api_path.as_ref(),
include_str!("../api/availability.toml"),
options.extensions.clone(),
Copy link
Member

Choose a reason for hiding this comment

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

We could change the with_version call below on line 160 to match, e.g format!("{MAJOR_VERSION}.{MINOR_VERSION}").parse().unwrap())

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call, but I think, instead, I'll add it as a default behavior in tide-disco and remove the .with_version calls on all the implementations. WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I like that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just a thought... this will lock the API version to the executable version, which was our intent. But we currently specify a semver::Version which takes (major, minor, patch) by default. I can update some things to allow us to accommodate semver, but we'll only have type enforcement on major and minor....

Copy link
Member

Choose a reason for hiding this comment

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

Hmm. I actually don't necessarily thing the API and executable version should be locked. E.g. performance improvements to the executable, or features outside the scope of the versioned API, like rate limiting, API credits, etc.

Mayyybe we can have (major, minor) locked to the API version and use patch by convention for non-API updates. Or, we can just have separate versions, in which case I think the thing returned by the version endpoint should be the API version. We can make changes on tide disco if necessary to stop using semver and just use major,minor

@@ -503,7 +508,7 @@ mod test {

/// Get the current ledger height and a list of non-empty leaf/block pairs.
async fn get_non_empty_blocks(
client: &Client<Error>,
client: &Client<Error, 0, 1>,
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to define like const LATEST_VERSION so we don't have to update every single one of these each time we do a version bump?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I think we can do one better, even... stay tuned, I'm still trying to wrangle all of the dependencies back to passing tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, it's currently still 0.1, but that's just because of HotShot's upgradability. I've got a fix for that. Note that the version is only specified outside of the sequencer itself in HS's upgradability, and in tests. I don't believe the actual version(s) used will matter for tests.

Cargo.toml Outdated Show resolved Hide resolved
@move47 move47 force-pushed the adding_vbs_support branch from 0f2498e to fd5c425 Compare March 19, 2024 23:00
@nyospe nyospe force-pushed the adding_vbs_support branch from 2971fc5 to 6a4ba00 Compare March 20, 2024 00:32
@nyospe nyospe marked this pull request as ready for review March 20, 2024 13:50
@nyospe nyospe requested review from nomaxg and sveitser as code owners March 20, 2024 13:50
@nyospe nyospe merged commit 516e37d into main Mar 20, 2024
11 checks passed
@nyospe nyospe deleted the adding_vbs_support branch March 20, 2024 13:56
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.

Migrate hotshot-query-service to use BinarySerializer
2 participants