Bitcoin Forum
July 04, 2024, 04:41:34 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 »
81  Alternate cryptocurrencies / Altcoin Discussion / Re: Remember when ETH was $1400 a few years ago then crashed to $70 as BTC crashed? on: February 17, 2021, 06:08:49 PM

Everyone who had been in crypto and had experienced the last bullrun may have learned the lesson already to dump what they have to stablecoin before everything falls apart. They know it could happen again because we had been advised over and over that history will repeat itself again. What they do now is just wait. Traders who assumes that $1800 is already the ATH had dumped already.

Exactly. I moved to fiat at $1400, thinking that it would crash soon, but Mr Elon Musk changed the fate and bought some time. Alt season is coming, and like every time it is better to be safe than late! It will happen brutally and if you are still in the game at this time, you will be under the wave for quite a long time...
I am surprised that it still standing at such a hi value with all the problems and bad news for ETH; gas price, USDT that moved to Tron chain and basically all exchanges encouraging the smart contract creators to move to TRC20 asap.
This shows that the value of the crypto is only due to pure speculation in the hand of big whales.
 
82  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][KYF][FRANC][ Kryptofranc, Franc and WOK on: February 14, 2021, 08:29:47 AM
About the staking with FRANC, the price of gas from Ethereum is a problem, and we decided to do the token on TRX (Tron) which has a guaranteed low fee price for at least the next few years. Plus it is using Solidity, so the conversion to the new blockchain does not requires a lot of work.
We will post a press release when it is working.

On the development path, I have added more important info about the  KYF addresses in the block explorer https://kryptofranc.com/explorer
This is necessary for staking, now we know what address is holding how much KYF, the block explorer also display all the unspent transactions (for the technicians who are seeking complete information from the blockchain)

Last but not least, we are ready to sign all the contracts about WOK. This will guarantee the funding of the project until it is publically open for playing and testing. Jean Martial and me will be partner on this WOK project just as we were on Kryptofranc.

The idea of WOK (Wolf Online Kingdom) is very simple. Since the real world does not want to generalize use the Crypto currencies, the government are resisting using crypto and banks are still fighting to impose the fiat currencies and keep the crypto only as a speculative tool, we have decided to create a virtual world, social networking platform and game named WOK, that will be powered by our Crypto KYF and FRANC.

This will be both a new social experience, because it will be a virtual society with new economic models, and also a real economy where people can earn money, setup business and possibly make a living in this virtual world.
It will attract a lot of people from outside of the crypto geek sphere and give a visual to what is otherwise considered too abstract by the general population. I think that it will help crypto as a whole to become more mainstream, by targeting gamers in a way that is familiar to them.

It will be a 3d breathtaking photo realistic world, that will take both on the current social networking platforms but offering nextgen graphics and action, but also a place where having fun is the engine of the society. Quite the opposite of the real world.

Our moto will be "The world sucks, go WOK". Stay tuned about more info about this project and the continuing development of KYF
83  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][KYF][FRANC][ Kryptofranc, Franc and WOK on: February 14, 2021, 08:18:24 AM




Kryptofranc Mining Pool

Stratum Settings:
https://kriptokyng.com/#kyf/connect
https://kriptokyng.com/#kyf/stats

No registration is required, your payouts are in the currency that you mine.

This is a PPLNS Mining Pool, a proportional reward, the pool distributes the reward among miners in proportion to the number of shares received from them
for the current round of block search (the time taken by the pool to find the next block). There is an .8% Pool Fee to cover the expense of providing this pool
and is deducted from the Reward Balance before payment distribution.





Thanks for supporting us!  Grin Grin Grin
84  Alternate cryptocurrencies / Altcoin Discussion / Re: What is the future of Ethereum smart contracts with +$20 cost of gas? on: February 07, 2021, 11:23:25 AM
ETH2.0 is going to make trx fees less as current Ethereum  Network can do only 15 trx per second that what is making te fees gets higher and higher, the new network on Ethereum 2.0 will upgrade this to 15 000 TPS this will make it less a pain the head to pay those gas fees.

When this change is scheduled to happen? February 2022 is a realistic date...
https://cointelegraph.com/news/when-will-ethereum-2-0-fully-launch-roadmap-promises-speed-but-history-says-otherwise

Lot of things can happen since.
85  Alternate cryptocurrencies / Altcoin Discussion / Re: What is the future of Ethereum smart contracts with +$20 cost of gas? on: February 07, 2021, 11:03:10 AM
I don't know, I find it hard to predict this. many believe the current situation is temporary, and will end when the new network is fully prepared. but many also think this too is meaningless. gas fee will not be suppressed, it will slowly increase.

Maybe it is time, the projects that are on the ethereum network rethink. and start switching to a friendlier platform.

Yes but what platforms are reliable, have a good reputation and can guarantee a low gas price on the long term?
86  Alternate cryptocurrencies / Altcoin Discussion / Re: What is the future of Ethereum smart contracts with +$20 cost of gas? on: February 07, 2021, 10:05:13 AM
Interesting article on the subject: https://news.bitcoin.com/sky-high-bitcoin-and-ethereum-fees-while-prices-jump-the-cost-to-transfer-follows-suit/
87  Alternate cryptocurrencies / Altcoin Discussion / Re: What is the future of Ethereum smart contracts with +$20 cost of gas? on: February 07, 2021, 09:59:08 AM
 If it was a fiat currency, they would devaluate. The problem is how much traction up the ETH is having.
Being the 2nd after Bitcoin, I guess it is the second choice for the whales who are thinking that Bitcoin is not going to be as much profitable as it was, doing 100% with Bitcoin is harder than doing it with Ethereum.
To devaluate that mean that the team has to crash their own currency to save it.
They will try I think, that means they need to sell all at the same time, or somehow mint a lot of ETH if possible and sell them all at the same time.
But if the traction up is too strong, it might fail which is a dead sentence for Smart Contracts.
The ripple of that will probably reach all the crypto world.
I would be careful of not being too much optimistic with this problem ahead. Wall Street is going up, and if something is worrying the whales in the crypto, it will take an hour to crash it again.
88  Alternate cryptocurrencies / Altcoin Discussion / Re: What is the future of Ethereum smart contracts with +$20 cost of gas? on: February 07, 2021, 09:44:27 AM
I understand, but all the Smart Contract are having problems right now. It does not make sense for all the Defi to loan sums less than $20,000 and a lot of projects are no able to function correctly.
89  Alternate cryptocurrencies / Altcoin Discussion / Re: Remember when ETH was $1400 a few years ago then crashed to $70 as BTC crashed? on: February 07, 2021, 09:39:38 AM
With a gas price $20 a transaction, all the smart contract (specially defi) are non functional. The ETH have no choice than crashing their own currency to keep it working.
Stable coins are already moving to new smart contract blockchains, they are buying now in order to crash the ETH very soon.
If ETH continues to go up, then it will become a sub Bitcoin trading only currency, which I don't think will work.
90  Alternate cryptocurrencies / Altcoin Discussion / What is the future of Ethereum smart contracts with +$20 cost of gas? on: February 07, 2021, 08:22:48 AM
https://ycharts.com/indicators/ethereum_average_transaction_fee

Today the cost for 1 transaction reached +$20!
How can all these smart contracts continue to operate? How these Defi projects can continue to be functional?

Are we heading to a crypto crash? Any feedback and comment about this situation? How this is affecting you or your business?
91  Bitcoin / Development & Technical Discussion / Re: Calculate how many BTC an address own from RPC calls on: February 07, 2021, 06:57:53 AM
It'll be the way that the Windows "shell" is interpreting the characters... are you using cmd.exe/"command prompt" or powershell? Huh

The format for using scantxoutset on the Windows command prompt seems to be:
Code:
bitcoin-cli.exe scantxoutset start [\"addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2)\"]

Actually you are right, it is working, I am using cmd because I call it from PHP and that's what it does.,
Here is the solution:

From the command prompt, no " or ' are accepted.

Code:
bitcoin-cli.exe scantxoutset start [\"addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2)\"]

From PHP retval is an array with the response and $r is the return code true or false

Code:
$address="1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2";
$s='bitcoin-cli.exe scantxoutset start [\"addr('.$address.')\"] ';
exec($s,$retval,$r);

This solution is working but it sucks because it is really slow compared to RPC.
I could not get a positive result with any JSON formatted submission to RPC.  Kiss Cry
92  Bitcoin / Development & Technical Discussion / Re: Calculate how many BTC an address own from RPC calls on: February 06, 2021, 10:07:59 AM
It seems that there is a problem specific to windows.

For example

This is working on Unix
Code:
./bitcoin-cli scantxoutset start  '["addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2)"]'

But this is not on windows

Code:
bitcoin-cli.exe scantxoutset start  '["addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2)"]'

error: Error parsing JSON:'[addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2)]'

Escaping like this bitcoin-cli.exe scantxoutset start  '[\"addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2)\"]'
does not change anything, it fails.

Any clue?
93  Bitcoin / Development & Technical Discussion / Re: Calculate how many BTC an address own from RPC calls on: February 05, 2021, 10:18:49 AM
Have you tried it without the \ escape characters within the PHP? Huh

I suspect that they are not required... the \" stuff seems to be a "console" requirement... I would expect that the json_encode() function would take care of the escaping/formatting required, so maybe try something like:
Code:
    $method= "start";
    $params= "addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2";

    // request is converted in JSON
    $request = json_encode(array(
        'method' => $method,
        'params' => $params,
    ));

Failing that... debug and just dump out the value of $request before executing it... you'll likely see some weird escaping happening would be my guess... like, it'll be escaping the \'s or something stupid like that.

Not working, the resulting JSON is like this:

Code:
{"method":"scantxoutset","params":["\"start\" \"addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2\""]}

This drives me crazy, there should be JSON examples in the Bitcoin documentation.
94  Bitcoin / Development & Technical Discussion / Re: Calculate how many BTC an address own from RPC calls on: February 05, 2021, 09:27:44 AM
I use PHP this way

Code:
        $method='"start";
        $params= "[\"addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2)\"]";

        // request is converted in JSON
        $request = json_encode(array(
            'method' => $method,
            'params' => $params,
        ));


95  Bitcoin / Development & Technical Discussion / Re: Calculate how many BTC an address own from RPC calls on: February 04, 2021, 11:57:38 PM
I have a small problem but very boring.
I cannot find a way to code the scantxoutset command in a json valid format.

While the format
Code:
scantxoutset "start" "[\"addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2)\"]" 

is working in the console, encoding it like this

Code:
{"method":"scantxoutset","params":["\"start\" [\"addr(1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX)\"]"]}

is a correct json format, but it is returning Invalid Method error.

Anyone see what is wrong?
96  Bitcoin / Development & Technical Discussion / Re: Calculate how many BTC an address own from RPC calls on: February 04, 2021, 02:33:58 PM
Note listunspent "address" will list all the unspent UTXO from the wallet. Can be entered into the console. Sum of them will give the total of the unspent UTXO available.
97  Bitcoin / Development & Technical Discussion / Re: Calculate how many BTC an address own from RPC calls on: February 04, 2021, 10:06:06 AM
Ok I get it!

Let's do it with pseudo code.

Step 1 saving all the VOUT received by addresses in a database.

Code:
foreach tx {
  //save in a SQL database every VOUT and and its addresses
  $raw = getrawtransaction($txid)
  save (addresses, value)
}


Step 2 scan all addresses previously saved and do a scantxout

Code:
// use the addresses from the SQL database 
foreach address {
    $sum= sum(value)
    $scan=scantxoutset "start" "[\"addr(address)\"]"
    $owned = $sum-$scan("total_amount")
    save(address, $sum)
    save(address, $owned)
}


This should do the job. Now in the SQL database you can query an address, and get the money received, spent and owned.
98  Bitcoin / Development & Technical Discussion / Re: Calculate how many BTC an address own from RPC calls on: February 04, 2021, 09:55:17 AM
The simplest is addr():
Code:
scantxoutset "start" "[\"addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2)\"]"

Code:
{
  ...,
  "unspents": [
    {
      "txid": "f9a7240ad23bc84044ab83b593e11dd6686a2cfbc13731944259a6ee0f10295f",
      "vout": 1,
      "scriptPubKey": "76a9147ddb236e7877d5040e2a59e4be544c65934e573a88ac",
      "desc": "addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2)#nsvz5zvh",
      "amount": 2.15076162,
      "height": 668945
    },
    {
      "txid": "4aa8d886f4a799b08b0063562f76dfd1bbe200ca3dc2bf39935f341fa9e44ffa",
      "vout": 1,
      "scriptPubKey": "76a9147ddb236e7877d5040e2a59e4be544c65934e573a88ac",
      "desc": "addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2)#nsvz5zvh",
      "amount": 1.14902796,
      "height": 668944
    }
  ],
  "total_amount": 3.29978958
}


This does not answer to the question: "how to know how much an address own" or at least "how to know the source of a transaction".
It only gives you the sum of all the BTC spent by an address (in the case of the 'addr' command)

It looks to me like it gives you the amount of unspent. Isn't that what you want?

If I do the math on a real wallet, the total_amount is the sum of all VOUT which is not what is left unspent in the wallet, but what was spent (out) of the wallet.
I am working on a stacking system where I want to check how much an address is holding in order to reward a %APR for the BTC holders.
What I need yes is the unspent, but this command is not doing this, it lists all the transaction OUT using this address, but not sum of the transactions IN

I guess that with using getrawtransaction and save all the VOUT and the addresses, that would be possible to sum up all the BTC received from the specific address and then substract the total_amount to these numbers to get what is left holded by the address.
I will make some tests and post the result here.
99  Alternate cryptocurrencies / Altcoin Discussion / Re: Latest improvement of CalculateNextWorkRequired and smoothing the difficulty? on: February 04, 2021, 01:08:37 AM
And what about waiting 10 min, then share with who got a correct block in the interval?

For example store each block found this way:

blockfound[second]
rewardresult = (reward/number of seconds) // sliced reward for each second

blockfound is a list of address that found a block at current diff and deserve a share of the reward

I don't see anything wrong with this. You're free to implement whichever you like as its your coin but bear in mind that since the difficulty is still really small from using a large decaying factor, there will possibly be several valid results and as a result the block reward each node will get will be very small, since this change basically puts mining pool code in the consensus.

You are right, stratum would have to be modified in the pools, which is not something easy to ask.
100  Bitcoin / Development & Technical Discussion / Re: Calculate how many BTC an address own from RPC calls on: February 04, 2021, 12:57:47 AM
Do you have example of command that works? I read the description of scantxoutset, but there's no example and i'm confused about 2nd parameter.

Which bit is confusing you?

Code:
Scans the unspent transaction output set for entries that match certain output descriptors.
Examples of output descriptors are:
    addr(<address>)                      Outputs whose scriptPubKey corresponds to the specified address (does not include P2PK)
    raw(<hex script>)                    Outputs whose scriptPubKey equals the specified hex scripts
    combo(<pubkey>)                      P2PK, P2PKH, P2WPKH, and P2SH-P2WPKH outputs for the given pubkey
    pkh(<pubkey>)                        P2PKH outputs for the given pubkey
    sh(multi(<n>,<pubkey>,<pubkey>,...)) P2SH-multisig outputs for the given threshold and pubkeys

In the above, <pubkey> either refers to a fixed public key in hexadecimal notation, or to an xpub/xprv optionally followed by one
or more path elements separated by "/", and optionally ending in "/*" (unhardened), or "/*'" or "/*h" (hardened) to specify all
unhardened or hardened child keys.
In the latter case, a range needs to be specified by below if different from 1000.
For more information on output descriptors, see the documentation in the doc/descriptors.md file.

More reading on descriptors as indicated in the descriptors.md file: https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md


The simplest is addr():
Code:
scantxoutset "start" "[\"addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2)\"]"

Code:
{
  "success": true,
  "txouts": 70264820,
  "height": 668945,
  "bestblock": "00000000000000000008fa308c94179d3b6c4d4501cde114d14b33593bbeae59",
  "unspents": [
    {
      "txid": "f9a7240ad23bc84044ab83b593e11dd6686a2cfbc13731944259a6ee0f10295f",
      "vout": 1,
      "scriptPubKey": "76a9147ddb236e7877d5040e2a59e4be544c65934e573a88ac",
      "desc": "addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2)#nsvz5zvh",
      "amount": 2.15076162,
      "height": 668945
    },
    {
      "txid": "4aa8d886f4a799b08b0063562f76dfd1bbe200ca3dc2bf39935f341fa9e44ffa",
      "vout": 1,
      "scriptPubKey": "76a9147ddb236e7877d5040e2a59e4be544c65934e573a88ac",
      "desc": "addr(1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2)#nsvz5zvh",
      "amount": 1.14902796,
      "height": 668944
    }
  ],
  "total_amount": 3.29978958
}


This does not answer to the question: "how to know how much an address own" or at least "how to know the source of a transaction".
It only gives you the sum of all the BTC spent by an address (in the case of the 'addr' command)
Ideally, it would be great to start from an address like 1CUTyyxgbKvtCdoYmceQJCZLXCde5akiX2 and then have a list of RPC calls that will get how much this address owns. If the wallet can do it, it should be also possible to do it from RPC.


Thanks for pointing that command that is not very well known though.
Pages: « 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!