Comments (15)
If you're using the node's built-in wallet, then aren't receive transactions automatically executed when the node detects them?
from jnano.
If you're using the node's built-in wallet, then aren't receive transactions automatically executed when the node detects them?
Yes, but I receive transactions without using the nodes auto receive feature because the detection and process is slow when the node auto receives.
from jnano.
How are you currently scanning for new transactions? If you'd like, you can add me on discord Karl#8079
and I can maybe help you a little easier.
from jnano.
I just implemented request receive for my main wallet, it didn't take too long and so I just wanted to suggest a feature which could save developers a little bit of time if they wanted to process receives on there own.
from jnano.
Ah I see. Did you try the search_pending
command? That should manually trigger all pending blocks in the wallet to be received, but I'm not sure if that undergoes the same slow process.
from jnano.
My accounts for my wallet are saved in a DB and I just loop through and check for pending tx's that way.
from jnano.
Are you not using the websocket API to receive blocks as soon as they're confirmed? That way you'd be able to confirm transactions the millisecond they arrive.
from jnano.
I know that's possible but I just don't know how reliable it is. If say my node goes offline or is out of sync and a deposit is sent, it would take a bit of extra work to credit that deposit.
I also do an extra send to my main wallet before crediting a user's account to reduce/prevent any issues.
from jnano.
Yeah there'd probably be a bit more to it, but it shouldn't be too difficult. You could combine both manual scanning (ie, scan accounts every 10 mins to ensure all blocks are received) and websocket updates so that deposits are low-latency while maintaining reliability. This is something I could look into including in the library though, some kind of easy to use payment processing API.
You shouldn't need to send before crediting, as the transaction is already confirmed when in the account. It'd be better to credit the user first, that way there's almost no delay.
from jnano.
Yeah there'd probably be a bit more to it, but it shouldn't be too difficult. You could combine both manual scanning (ie, scan accounts every 10 mins to ensure all blocks are received) and websocket updates so that deposits are low-latency while maintaining reliability. This is something I could look into including in the library though, some kind of easy to use payment processing API.
You shouldn't need to send before crediting, as the transaction is already confirmed when in the account. It'd be better to credit the user first, that way there's almost no delay.
Yes I know but it's to reduce any possible exploits. I will however look into crediting deposits as soon as they are found.
from jnano.
If you wanted to play it careful, you could also increase the online_weight_quorum
configuration value in the node.
from jnano.
Will have a look.
On another note, deposits are usually credited between 7 seconds and 1 min. That is a major improvement and am satisfied with it at this stage. A GPU work peer would probably be my choice to improve the times as I don't have the most ideal hardware(NO GPU and no SSD).
from jnano.
I've got deposits down to under 5 seconds as I now credit pending deposits.
from jnano.
Can I ask, how do you receive deposits? Do you issue a temporary deposit account each time, or does each user have their own reusable deposit address?
from jnano.
@letskingit Hey, if you want to speed up work generation you could give the new OpenCLWorkGenerator
class a try, and use it on your CPU (or GPU if you get one). You'll need to update to 2.17.2
. I've just ran a few tests locally and it seems to be 3x faster than the Nano node.
Most intel CPUs support OpenCL, but you may need to install the driver (https://software.intel.com/content/www/us/en/develop/articles/opencl-drivers.html scroll down to the "CPU Runtime" section).
More info here: https://github.com/koczadly/jNano/wiki/Utilities#work-generation
Let me know how it goes and if you need any help with it.
from jnano.
Related Issues (14)
- RpcWalletSpecification Missing?/Can't be imported HOT 17
- Update NanoAmount/NanoUnit friendly amount to support new currency symbol ΣΎ HOT 4
- java.lang.NoClassDefFoundError HOT 3
- RpcInvalidArgumentException: Bad account number HOT 6
- Keepalive and Reconnect has been include? HOT 2
- Examples for constructing Send blocks? HOT 2
- IlligalArgumentException on creating new account. HOT 3
- Upgrade to node V25 HOT 1
- uk.oczadly.karl.jnano.rpc.exception.RpcEntityNotFoundException: Wallet not found HOT 5
- RPC Exception: Cancelled HOT 4
- Comptability with pippin HOT 9
- Close HOT 1
- uk.oczadly.karl.jnano.model.block.BlockDeserializer$BlockParseException: Could not parse block (malformed json?). HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jnano.