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

[feature] Register offer on both the chain and the server. #15

Closed
Gelassen opened this issue Feb 21, 2023 · 6 comments
Closed

[feature] Register offer on both the chain and the server. #15

Gelassen opened this issue Feb 21, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@Gelassen
Copy link
Owner

Gelassen commented Feb 21, 2023

User story:

As a user I want to register my offer on the chain and the web part of the service

Tech details:

Backend and chain parts has been implemented as a separate use cases. During integration several new requirements has been discovered:

  • to have the chain's token id which corresponds with offer we have to process txReceipt logs aka 'topics'
  • if the change in business requirements will lead to increased time from chain, operations with chains should be moved to background service and later chain queried again to receive the status of tx
  • it would require to cache tx hash which is not returned at this moment by the web3j interface (at this moment tx receipt is returned only after tx has been mined)

Refer project documentation of GDrive for more details.

At this moment extra work covers:

  • migrate operation with chain into WorkManager
  • add observation of cached data and perform POST requests in queue for transactions which have been mined on chain
  • extend backend /account/offers and, possibly, account/demands to support mapping of offer on-chain and offer data on the backend.
  • add CASCADE trigger to delete matches associated with profile id
  • write integration test on mobile client, unit tests could be done too by demand
@Gelassen
Copy link
Owner Author

Finish 1st and 2nd point for registerNewOffer() call.

@Gelassen
Copy link
Owner Author

Fix tests, finish 3rd point.

@Gelassen
Copy link
Owner Author

Gelassen commented Mar 6, 2023

Finish CASCADE trigger\constraint

@Gelassen
Copy link
Owner Author

Current issues are:

  • after offer tx has been mined and posted to the server, a local cache is not updated which leads duplicate error response on 2nd attempt to post this tx on the next launch
  • also this error creates a new record in cache instead of replace on conflict existing one
  • integration test on mobile side shows chain error caused by token hasn't mined by its owner.

@Gelassen
Copy link
Owner Author

Current issues except integration test has been finished.

@Gelassen
Copy link
Owner Author

Current issues except integration test has been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant