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

[BUG] balance changes due to transfers immediately following an additional issue are not reflected in UTXO #600

Closed
purplesmoke05 opened this issue Mar 6, 2024 · 0 comments · Fixed by #605
Assignees
Labels
bug Something isn't working

Comments

@purplesmoke05
Copy link
Member

purplesmoke05 commented Mar 6, 2024

Describe the bug

  • Under certain conditions, the processor of UTXO cannot process the changes triggered by Transfer Event.
  • If Additional issue and transfer are performed continuously so as to occur within CREATE_UTXO_INTERVAL (default: 600 seconds) and are processed at once by processor_create_utxo, the balance change of the transfer source is not reflected in UTXO.
  • This is because the additional issue is processed after the transfer is processed first in the following section, and the balance of the additional issue does not exist in UTXO at the time the transfer is processed, resulting in an insufficient balance and the subtraction being skipped.

LOG.info(f"Syncing from={block_from}, to={block_to}")
for token_contract in self.token_contract_list:
event_triggered = False
event_triggered = event_triggered | await self.__process_transfer(
db_session=db_session,
token_contract=token_contract,
block_from=block_from,
block_to=block_to,
)
event_triggered = event_triggered | await self.__process_issue(
db_session=db_session,
token_contract=token_contract,
block_from=block_from,
block_to=block_to,
)
event_triggered = event_triggered | await self.__process_redeem(
db_session=db_session,
token_contract=token_contract,
block_from=block_from,
block_to=block_to,
)
event_triggered = event_triggered | await self.__process_unlock(
db_session=db_session,
token_contract=token_contract,
block_from=block_from,
block_to=block_to,
)

Expected behavior

  • All balance changes caused by all events are handled correctly.
@purplesmoke05 purplesmoke05 added the bug Something isn't working label Mar 6, 2024
@purplesmoke05 purplesmoke05 self-assigned this Mar 6, 2024
@purplesmoke05 purplesmoke05 changed the title [BUG] Cannot catch balance changes caused by Transfer to update UTXO under certain conditions [BUG] balance changes due to transfers immediately following an additional issue are not reflected in UTXO Mar 12, 2024
@YoshihitoAso YoshihitoAso moved this to In Progress in ibet-OSS v24.3 Mar 13, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in ibet-OSS v24.3 Mar 13, 2024
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
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant