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: Pending transactions #56

Open
TonioMacaronio opened this issue Oct 25, 2018 · 24 comments
Open

Feature: Pending transactions #56

TonioMacaronio opened this issue Oct 25, 2018 · 24 comments
Assignees
Labels
enhancement New feature or request Gitcoin For Gitcoin bounties good first issue Good for newcomers help wanted Extra attention is needed

Comments

@TonioMacaronio
Copy link
Contributor

TonioMacaronio commented Oct 25, 2018

Current behavior:
Now you can only get past transactions and show them

Expected behavior:
Needs to get pending transactions and show them

Solution:
You can use txpool, made by @currybab in his PR
For Franklin use Matter Plasma Ignis API to get pending transactions.

@skywinder skywinder added the enhancement New feature or request label Oct 28, 2018
@TonioMacaronio TonioMacaronio added help wanted Extra attention is needed good first issue Good for newcomers Gitcoin For Gitcoin bounties labels Feb 12, 2019
@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 100.0 DAI (100.0 USD @ $1.0/DAI) attached to it.

@gitcoinbot
Copy link

gitcoinbot commented Mar 18, 2019

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 1 week, 2 days ago.
Please review their action plans below:

1) santteegt has been approved to start work.

I´ll love to work on this as a first good issue for using a plasma impl.

Learn more on the Gitcoin Issue Details page.

@TonioMacaronio
Copy link
Contributor Author

TonioMacaronio commented Mar 20, 2019

@santteegt hi! Great that you want to help with this. Ready to answer your questions

@santteegt
Copy link

Hi @BaldyAsh,

I've already setup the project dev environment. I was doing some tests by sending small Eth transactions on the Rinkeby testnet. Digging into the code, seems that this feature has to be implemented under the uploadTransactions() function in the TransactionHistory view controller. Now, I'm going to do some tests using the txPool instance available under wallet.web3Instance. In case I found some issues, I'll reach you :)

@gitcoinbot
Copy link

@santteegt Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@santteegt
Copy link

santteegt commented Mar 25, 2019

Hi @BaldyAsh,

After doing some test trying to get the tx pool for sent ETH trxs on the Rinkeby testnet, I was always getting nil. Looking at the documentation seems that it does not work with Infura providers. Do I need to setup a local node to implement this, as mentioned in the reference PR?

@gitcoinbot
Copy link

@santteegt Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@TonioMacaronio
Copy link
Contributor Author

@santteegt you are right. Think I need to implement subscriptions in web3swift myself and then this issue can be solved

@santteegt
Copy link

Hi @BaldyAsh,

Okay, so should I wait until this feature is implemented under web3swift? I was thinking of implementing a manual tx pool by maintaining a sent tx list in global state and then verify if each of them was confirmed using the getTransactionReceipt method, but the downside is that this will be hardcoded in the wallet project.

On the other hand, in order to send transactions through the Plasma chain, how can I get some Franklin tokens?

@TonioMacaronio
Copy link
Contributor Author

@santteegt think you may implement just UI and make some mocks for TXs loading. You can write mocks assuming that the pending TXs interface will be similar to the one that is in web3.js. I think this should be enough, I'll finish web3swift part and the task will be completed.
For plasma - there is no need for separated pending TXs loading, and besides I have not implemented TXs in Swift yet. There is used a curve for signing TXs, that is not yet implemented in Swift. So currently I'm working on bridging some rust libs functionality with iOS.

@TonioMacaronio
Copy link
Contributor Author

TonioMacaronio commented Apr 1, 2019

@santteegt started work in web3swift-team/web3swift#144

@gitcoinbot
Copy link

@santteegt Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@santteegt
Copy link

Hi @BaldyAsh ,

I was considering using the current UI features to show pending transactions (Bob trx on screen image) under the All tab

image

I was looking to your progress in the websockets feature and seems that you almost finish it. Let me know when this feature is fully available on web3swift :)

@TonioMacaronio
Copy link
Contributor Author

TonioMacaronio commented Apr 6, 2019

@santteegt hi, yes I've almost finished. There was some pod issue, hope it will not appear in new release. Or I'll integrate web3swift in Franklin as framework and it will work.
Regarding pending txs - yes they should be presented in that way ;)

@santteegt
Copy link

Hi @BaldyAsh,

I just looked that you made a new release for the web3swift library. I've proceeded to update the web3swift pod version to 2.1.3 and also changed the Swift language to version 5, but I'm getting some compiling errors on the new code that implements the support for web sockets, such as Value of optional type '[String : Any]?' must be unwrapped to refer to member 'subscript' of wrapped base type '[String : Any]' at line 171 of Web3+InfuraProviders.swift:

let result = dictionary["result"] as? String {
        // setting filter id
       filterID = result
}

Not sure if I'm missing something when upgrading the pods.

@TonioMacaronio
Copy link
Contributor Author

@santteegt hi, I've updated Franklin myself and haven't faced this error. Could you provide me a link to your project?

@TonioMacaronio
Copy link
Contributor Author

TonioMacaronio commented Apr 11, 2019

@santteegt You can use updated Franklin version from this branch https://github.com/matter-labs/FranklinPay-iOS/tree/w3s2.1.3update

@santteegt
Copy link

santteegt commented Apr 11, 2019

Cool! Thanks @BaldyAsh. I'll use that branch

@santteegt
Copy link

Hi @BaldyAsh,

I am working in the following approach for fulfilling this feature. What do you think?

  • Store all sent transactions on the ETHTransactionModel with isPending=true.
  • When the TransactionHistory view refreshes:
  1. fetch these records
  2. compare txhashes with confirmed tx list
  3. update the record status on those that were already confirmed
  4. trxs that are still pending are appended to the view list

@TonioMacaronio
Copy link
Contributor Author

@santteegt hi, think this should work, don't forget about failed txs :)

@santteegt
Copy link

Hi @BaldyAsh,

I just created a WIP PR for you to review my approach. It is working but sometimes while the pending transaction is confirmed through web3, the tx does not appear until Etherscan index that transaction a 1-2 seconds later.

@gitcoinbot
Copy link

@santteegt Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • reminder (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 100.0 DAI (100.0 USD @ $1.0/DAI) has been submitted by:

  1. @santteegt

@ceresstation please take a look at the submitted work:


@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 100.0 DAI (100.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @santteegt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Gitcoin For Gitcoin bounties good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants