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

Cost models update conway #336

Merged
merged 2 commits into from
Jun 18, 2024
Merged

Cost models update conway #336

merged 2 commits into from
Jun 18, 2024

Conversation

rooooooooob
Copy link
Contributor

Due to changes here: IntersectMBO/cardano-ledger#4284
Clarification here: IntersectMBO/cardano-ledger#4383

Allows non-Plutus languages according to the spec and changes to an indexable map type.

Due to changes here: IntersectMBO/cardano-ledger#4284
Clarification here: IntersectMBO/cardano-ledger#4383

Allows non-Plutus languages according to the spec and changes to an
indexable map type.
impl TryFrom<u64> for Language {
type Error = DeserializeError;

fn try_from(language: u64) -> Result<Self, Self::Error> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am also thinking of just getting rid of the Language enum entirely and swapping it with just pub type Language = u64 then maybe a Languages module with V1/V2/V3 members to avoid having to convert to/from u64/Language via From/TryFrom

@@ -354,52 +343,69 @@ impl CostModels {
let mut serializer = Serializer::new_vec();
// as canonical encodings are used, we odn't need to check the keys' bytes encodings
// and can order this statically.
serializer.write_map(cbor_event::Len::Len(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This might be the reason why the plutus stuff wasn't being accepted in March, I need to look into it more. This should be fixed now. (the length calculation didn't take into account v3)

@@ -720,13 +720,12 @@ impl TransactionBuilder {

match &script_witness.script {
PlutusScriptWitness::Ref(ref_script) => {
if self
if !self
Copy link
Contributor

Choose a reason for hiding this comment

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

These diffs should go away if you rebase

@rooooooooob rooooooooob merged commit 29c48aa into develop Jun 18, 2024
1 check passed
rooooooooob added a commit that referenced this pull request Jul 23, 2024
rooooooooob added a commit that referenced this pull request Jul 23, 2024
Due to changes here: IntersectMBO/cardano-ledger#4284
Clarification here: IntersectMBO/cardano-ledger#4383

Allows non-Plutus languages according to the spec and changes to an
indexable map type.
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.

2 participants