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

De-hardcode ConwayEra, parametrise & use IsBabbageBasedEra / IsConwayBasedEra where applicable #206

Closed
Swordlash opened this issue Sep 13, 2024 · 6 comments

Comments

@Swordlash
Copy link

As in the title.
I'd like to use Convex in my protocol, I think it's a cool library, but I don't feel like hardcoding ConwayEra everywhere where I use Convex tools.

@j-mueller
Copy link
Owner

I'll have a look - but in my experience, as soon as the new era lands we don't care about the old eras anymore. Yes there's a transition period but after that it's okay to have a single hard-coded era.

@Swordlash
Copy link
Author

I have a fork of Convex and it took me about 2 days to era generalise it. It comes handy when testing hard forks in a transitional period. In Axo we had the same codebase running in parallel for 2 months on preview / preprod Conway and prod Babbage. But I understand if that’s too much of a hassle.

@j-mueller
Copy link
Owner

I agree that era transitions are a concern - I actually had a branch of sc-tools that we used for the transition of Djed from babbage to conway era (here) I just wasn't sure if the added complexity is worth it in the majority of time where there is no era transition to be expected.

Is there some code you could share from your work on generalising it?

@Swordlash
Copy link
Author

Swordlash commented Sep 25, 2024

It's part of a private multirepo so I don't think I can share only a folder in GitHub. I've made a zip.
sc-tools.zip
I’ve done some more opinionated changes there, you can ignore.

@j-mueller
Copy link
Owner

Thanks for the file. I finished the changes, just need to get the tests to pass. PR here: #211

@j-mueller
Copy link
Owner

Closed in #211

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

No branches or pull requests

2 participants