Code Monkey home page Code Monkey logo

Comments (15)

koczadly avatar koczadly commented on June 1, 2024

If you're using the node's built-in wallet, then aren't receive transactions automatically executed when the node detects them?

from jnano.

letskingit avatar letskingit commented on June 1, 2024

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.

koczadly avatar koczadly commented on June 1, 2024

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.

letskingit avatar letskingit commented on June 1, 2024

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.

koczadly avatar koczadly commented on June 1, 2024

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.

letskingit avatar letskingit commented on June 1, 2024

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.

koczadly avatar koczadly commented on June 1, 2024

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.

letskingit avatar letskingit commented on June 1, 2024

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.

koczadly avatar koczadly commented on June 1, 2024

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.

letskingit avatar letskingit commented on June 1, 2024

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.

koczadly avatar koczadly commented on June 1, 2024

If you wanted to play it careful, you could also increase the online_weight_quorum configuration value in the node.

from jnano.

letskingit avatar letskingit commented on June 1, 2024

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.

letskingit avatar letskingit commented on June 1, 2024

I've got deposits down to under 5 seconds as I now credit pending deposits.

from jnano.

koczadly avatar koczadly commented on June 1, 2024

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.

koczadly avatar koczadly commented on June 1, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.