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

ROLL-16 Tickets #34

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

ROLL-16 Tickets #34

wants to merge 8 commits into from

Conversation

matsakiv
Copy link
Member

No description provided.

@github-actions
Copy link

github-actions bot commented Jul 25, 2023

Test Results

746 tests  ±0   746 ✔️ ±0   13s ⏱️ ±0s
  13 suites ±0       0 💤 ±0 
    1 files   ±0       0 ±0 

Results for commit 4c63c0f. ± Comparison against base commit 46179e2.

♻️ This comment has been updated with latest results.

@matsakiv matsakiv marked this pull request as draft July 25, 2023 16:40
@@ -42,6 +42,7 @@ pub struct LayeredStore<Backend: StoreBackend> {
backend: Backend,
pending_state: HashMap<String, Option<(DynStoreType, StoreTypeSer)>>,
modified_keys: HashSet<String>,
tmp_state: HashMap<String, Option<(DynStoreType, StoreTypeSer)>>,
Copy link
Member

Choose a reason for hiding this comment

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

I'd just reuse pending_state, the only difference is that for tmp values you do not update modified_keys.
You can also implement that with existing get/set methods by adding flag

@@ -42,6 +52,11 @@ impl PureInterpreter for Dup {
}
// TODO: check if copyable
Copy link
Member

@m-kus m-kus Aug 24, 2023

Choose a reason for hiding this comment

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

Invite you to implement this as well :)

amount.value().into(),
)?;

stack.push(StackItem::Option(OptionItem::Some(Box::new(ticket.into()))))
Copy link
Member

Choose a reason for hiding this comment

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

There is OptionItem::some()

identifier: &Micheline,
identifier_ty: &Type,
owner: &Address,
) -> Result<UBig>;
Copy link
Member

Choose a reason for hiding this comment

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

I suggest using Nat/Int on the interface level so that if we swap the underlying big number library, we don't have to change anything here

}

#[derive(Clone, Debug)]
pub struct TicketBalanceDiff {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe reuse naming from Tezos codebase "TicketUpdate" ?

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