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

Fungible operation history #126

Merged
merged 14 commits into from
Jan 19, 2024
Merged

Fungible operation history #126

merged 14 commits into from
Jan 19, 2024

Conversation

dr-orlovsky
Copy link
Member

@dr-orlovsky dr-orlovsky commented Jan 7, 2024

Prerequisites for RGB-WG/rgb#92. Include:

  • new concept of witness filters;
  • new concept of state change types which help to track past operation effects
  • AmountChange: a case of state change type which tracks the change in the balance as an effect of past fungible transfers
  • refactored typed states
  • ContractIface::fungible_ops command reconstructing history of operations affecting some fungible state (with changes expressed as AmountChange)
  • Rgb20::transfer_history wrapper which simplifies the call for RGB20-interfaces contracts

@dr-orlovsky dr-orlovsky added the epic Epic task covering multiple steps of implementation label Jan 7, 2024
@dr-orlovsky dr-orlovsky added this to the v0.11.0 milestone Jan 7, 2024
@crisdut
Copy link
Member

crisdut commented Jan 7, 2024

Really good @dr-orlovsky,

When I implemented a similar history feature in the bitmask wallet, I encountered a scenario where we needed hidden "invalid allocations" in stash history. This scenario occurs because we have implemented RBF, when the sender generate new bitcoin transaction using RBF, the previous transitions in RGB stash turns invalid.

Did you test this scenario?

It would be interesting to have this option to hide "invalid allocations" by default.

@dr-orlovsky
Copy link
Member Author

This works/is blocked by using appropriate witness filter. You can even work with block reorgs and lightning channel history by using them.

I will expose witness filter customization to outside of Runtime

fix blank_builder to avoid AssetTagMissed error
@dr-orlovsky dr-orlovsky merged commit 5c2f457 into master Jan 19, 2024
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Epic task covering multiple steps of implementation
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

3 participants