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

Add blank state transitions to state #81

Merged
merged 3 commits into from
Jul 8, 2023
Merged

Add blank state transitions to state #81

merged 3 commits into from
Jul 8, 2023

Conversation

dr-orlovsky
Copy link
Member

Fixes #80

The bug was caused by the fact that we do state update only on consignment consumation - and not on production of state transitions. This PR fixes that.

@dr-orlovsky dr-orlovsky added the bug Something isn't working label Jul 6, 2023
@dr-orlovsky dr-orlovsky added this to the v0.10.x milestone Jul 6, 2023
@dr-orlovsky dr-orlovsky requested review from crisdut and nicbus July 6, 2023 08:50
@zoedberg
Copy link
Contributor

zoedberg commented Jul 6, 2023

I've tried this fix on rgb-lib. It solves the blank transition issue, but it breaks some other tests that were previously succeeding. We'll try to reproduce the new bugs with the sandbox so that you can see it yourself

@nicbus
Copy link
Contributor

nicbus commented Jul 7, 2023

Since an rgb-lib test fails when the code from this PR is used, using our sandbox I tried to initiate a transfer (up to rgb transfer) but then abort it (don't validate, broadcast the tx nor accept the transfer on either side), then re-start the transfer from scratch (including re-generating the recipient invoice).

Once the first transfer has been initiated, rgb state shows the change allocation from that transfer (instead of the original one), although the related tx was never broadcast.

This situation can be reproduced using this branch of the sandbox.

As an example, given the following initial situation:

  • outpoints:
dbfa837f699077039b395a37277b4d160f91c422184714554aeed204f27842b5:0
  • allocations:
2000  utxo=dbfa837f699077039b395a37277b4d160f91c422184714554aeed204f27842b5:0

after initiating a transfer (txid 946a3a73598a9ec45033f354596665fd0b3f070ced821a0492a9636c5a15d2b2) this is what I get:

  • outpoints:
dbfa837f699077039b395a37277b4d160f91c422184714554aeed204f27842b5:0
  • allocations:
amount=1900  utxo=946a3a73598a9ec45033f354596665fd0b3f070ced821a0492a9636c5a15d2b2:0

#82 might also be related.

@dr-orlovsky
Copy link
Member Author

@nicbus I fixed the problem of removing historic state in RGB-WG/rgb-core#166

Please re-test with that fix - I think all tests will be passing now

@dr-orlovsky dr-orlovsky reopened this Jul 8, 2023
@dr-orlovsky dr-orlovsky merged commit ed81f8a into master Jul 8, 2023
@dr-orlovsky dr-orlovsky deleted the fix/80 branch December 30, 2023 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Blank state transitions do not update to state data
3 participants