Bitcoin Forum
June 19, 2024, 09:49:17 PM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 [91] 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 ... 1157 »
1801  Economy / Economics / Re: New currency from BRICS countries on: July 19, 2023, 05:33:09 AM
the fact that many countries have eliminated the dollar in international trade in recent years is showing that the dollar is gradually losing its position.
Keep in mind that they haven't "eliminated" dollar from their international trades, they have decreased its usage. For example China as the biggest bagholder of US debt has dumped $175 billion of it last year but they are still bagholding more of it.

As you correctly pointed out, this is a gradual move where every country goes through the dedollarisation process.

The 15th BRICS summit is going to be very interesting which will be held on 22 – 24 August (about a month from now) and some are saying the BRICS new currency will be revealed then. This could potentially have a significant effect on the ongoing dedollarisation around the globe.
1802  Bitcoin / Development & Technical Discussion / Re: How many combinations will there be? on: July 19, 2023, 04:55:47 AM
Quote
So we actually need to only compute 525*524*...*492*491 (roughly 35 multiplication) and 35! (roughly another 35 multiplication) then do a division.
Even better: we need to only compute 35 integers, that we prepare for final multiplication.

Because we have 35 concurrent numbers, it is guaranteed that one of them is divisible by 35, so we can reduce that before multiplying anything. And so on for 34. And then for 33. We can start reduction from prime numbers (or even express each number as a product of some prime numbers with their powers, and then reduce it).

Finally, we can reach a list of 35 numbers, that we can multiply in the end. That also means, we can safely use for example uint32 to store and prepare those 35 numbers, before using any BigInteger type.

Also, for bigger numbers, it is probably useful to see them in some simplified form. Depending on what is needed, it may be sufficient to just know that the answer is less than 10^N or 2^N, instead of knowing every single digit of that result.
There is always room for more improvement but the real question is how much time you want to dedicate to solving a problem and how much you want to improve. If we go from for example 10 minutes and 1 GB memory usage to 1 second and 1 kb memory, that is an improvement but if we go from 1 second to 0.9 second and 1 kb to 0.5 kb, that is not much of an improvement.

Take the code I posted above, the usage of C# BigInteger in a loop will create a lot of garbage for the garbage collector to collect (due to the underlying array allocated on the heap) hence it not only wastes memory but also slows down the code. But it is a short loop with low number of iterations and the whole thing takes less than a second so spending time trying to fix that is a waste of time.

Now about your suggestion, it has to be tested and benchmarked but the problem I see is that when you say a number has to be divisible by X, that is not something we just know but something we have to calculate that means extra steps or in other words possibility of adding additional bottlenecks instead of optimizing the existing code. Not to mention that division itself is generally a slow process.
1803  Economy / Economics / Re: Can CBDC users lose control of their money? on: July 18, 2023, 02:14:58 PM
This subject never made any sense to me specially with statements like this:
"Many in the cryptocurrency community have raised concerns that a CBDC has the potential to infringe on their financial freedom and encroach on their privacy."- This wording sounds in the article (from cointelegraph.com).

People in the "cryptocurrency community" should know better than other people that CBDC is not offering anything fundamentally different from the fiat that they are already using every day. CBDC is another currency issued by the banks and both controlled and used through the banks which is practically similar to fiat which is also issued and controlled by the banks and almost always used through the banks (except when you use cash but who is these days?).

You already don't have any privacy when you use banks and using CBDC isn't going to change that.
1804  Bitcoin / Bitcoin Discussion / Re: Beginners, you don't need Bitcoin first on: July 18, 2023, 02:01:42 PM
A good way to invest in bitcoin while having no extra money to spare is to start getting some extra money that you couldn't before!
This would make more sense with examples.
One way is to get extra money is to cut back on a bad habit like smoking and invest the money you were wasting before in bitcoin.
Another good way is to sell some stuff you don't need, something second hand you no longer need and is occupying space. You can sell them on Craigslist or the equivalent in your country or just a good ol' yard sale. Then you invest that money in bitcoin.
And of course as OP said a job or even a second job (could be online as freelance or something similar) would give you extra money too.
1805  Bitcoin / Bitcoin Discussion / Re: [Question] Bitcoin More decentralized than Ethereum? on: July 18, 2023, 01:38:56 PM
Technically, it is. Bitcoin never had ICO and there were no premined sales. But there is a nuance. But what about the early miners and investors, now called whales, who mined, bought, or otherwise accumulated a lot of BTC? Unequal distribution among the owners of bitcoin still exists (ever since), which is not entirely correct from the point of view of decentralization.
You can't even begin to compare premine with early adopters because there is a difference between an unequal distribution and unfair distribution.

As a rule of thumb if you can find a single unit in a cryptocurrency that YOU couldn't mine, that cryptocurrency has an unfair distribution. But if you can find some coins that YOU chose not to mine that is an unequal distribution not unfair.

That is why premine is unfair, the creator of that shitcoin is the only one who is capable of printing those coins making it unfair and centralized.
One being early or having invested more than others doesn't make it unfair, it just makes it unequal because there was no restrictions or preference being enforced on anybody preventing them from mining any of the bitcoins in circulation starting from block #1 and the very first block reward.

Quote
They even roll back and forked the coin. Ethereum isn't even in their original chain, Ethereum Classic is.
With Bitcoin, too, not everything is so simple. What about Bitcoin Cash? It's also a forked coin. At this point, there are similarities between ETH and BTC, right?
Again you are making a wrong comparison.
The fork that ethereum had was to roll back blocks, which is to effectively remove one of the main principles of cryptocurrencies called immutability of their blockchain. So ETC still is immutable while ETH is not.
On the other hand things like bcash are copies of bitcoin that have nothing to do with bitcoin. They just copied the code and the chain (history) to create a new coin.
1806  Economy / Speculation / Re: $30000 is becoming the resistant price on: July 18, 2023, 01:25:21 PM
This looks more like bitcoin may decrease more? That is what it seems to me if bitcoin can go below $29200.
Another way to look at this is that all the attempts to push the price below $30k has failed which means the chances of going lower is diminishing every day. And in my opinion that's the best speculation we can have since the market is uncertain. Only that the chances of a drop is decreasing every day.
1807  Bitcoin / Development & Technical Discussion / Re: How many combinations will there be? on: July 18, 2023, 01:17:54 PM
It is very computationally expensive; can't run it on my device, it kills it. The operation you want to calculate is:
Code:
n! / (k! * (n-k)!) => 525! / (35! * (525-35)!) => 525! / (35! * 490!)
Here is a math trick:
n! = n* (n-1)! = n*(n-1)* (n-2)! = n*(n-1)*(n-2)* (n-3)!
525! = 525*524*...*492*491 * 490!
Now the equation is simplified like this:
525*524*...*492*491 * 490! / 35! * 490!

So we actually need to only compute 525*524*...*492*491 (roughly 35 multiplication) and 35! (roughly another 35 multiplication) then do a division.
Code:
BigInteger dividend = 1;
for (int i = 491; i <= 525; i++)
{
    dividend *= i;
}
BigInteger divisor = 1;
for (int i = 2; i <= 35; i++)
{
    divisor *= i;
}
BigInteger result = dividend / divisor;
This code takes less than a second to run, it also doesn't consume memory.
1808  Bitcoin / Development & Technical Discussion / Re: How many combinations will there be? on: July 18, 2023, 04:27:51 AM
Your question sounds like a math problem, more specifically Combination. You want to select k items from a set containing n items which is denoted as Ckn and is calculated by computing factorials: n!/(k!(n-k)!)
Your k is 35 and your n is 525.
1809  Bitcoin / Bitcoin Technical Support / Re: Multisig question on: July 17, 2023, 03:57:58 PM
Isn't there any maximum limit for total number of cosigners?
As you know, electrum allow increasing the number of consigners up to 15. Isn't that the maximum number of cosigners we can have or that's just a limit enforced by electrum?

If I am not wrong, the p2sh script size can't be more than 520 bytes and that should limit the total number of cosigners we can have in a multi-signature address.
Technically the OP_CHECKMULTISIG(VERIFY) operations have a consensus critical check where they limit the number to 20 public keys[1][2] but the actual maximum number of public keys used in a multi-sig script depends on the type of the script and the public key length (compressed/uncompressed).
- For a P2MS script where the locking script is inside the scriptpub you can have up to 20 pubkeys regardless of the pubkey type since there is no size limit in consensus rules for scriptpubs.
- But for a P2SH script where there is a redeem script (containing pubkeys), the redeem script needs to be pushed to the stack as raw bytes, so the size is limited by that Push OP and to 520 bytes as you said. So it is 520/65=8 -extra bytes = 7 uncompressed pubkeys and 520/33=15 compressed pubkeys.

[1] https://github.com/bitcoin/bitcoin/blob/d09c8bc730d8d412ddc9b040cbeeb49dff3104de/src/script/interpreter.cpp#L1116
[2] https://github.com/bitcoin/bitcoin/blob/d09c8bc730d8d412ddc9b040cbeeb49dff3104de/src/script/script.h#L30

In taproot, OP_CHECKMULTISIG/OP_CHECKMULTISIGVERIFY are replaced with OP_CHECKSIGADD (0xba), which allows up to 999 keys.
Isn't that a standard rule? I can't see this enforced anywhere else:
https://github.com/search?q=repo%3Abitcoin%2Fbitcoin+MAX_PUBKEYS_PER_MULTI_A+&type=code
1810  Bitcoin / Bitcoin Discussion / Re: Bitcoin is not compared to Bitcoin with the best anyone on: July 17, 2023, 03:39:55 PM
Are they better to hold and invest than Bitcoin?
Hold altcoins? Definitely not.
Invest in altcoins? Depends on the time frame. Altcoins are known for getting pumped and dumped, all the shitcoins you mentioned here have had big pumps in the past and those who were capable of catching the pump early and were wise enough to jump off at the right time without becoming bag-holders have made a lot of profit.

Quote
Investing in bitcoins is better than spending money on a lover but it sounds ridiculous but it is true.
That's such a weird thing to say Cheesy

Quote
So I say investing in bitcoins is better than investing in other fields. Bitcoin is the best.
It depends on the "field" and what you want out of an investment. If it is maximum profit, bitcoin is not the best since there are a lot of other ways to make a ton of profit on your money even though bitcoin's long term profit has been fantastic.
1811  Economy / Speculation / Re: Should I buy now or I should still wait for the dip? on: July 17, 2023, 10:55:47 AM
I wanted to start my bitcoin investment journey but I look at it that the price is still high to start the investment and I am waiting for the price to go down to $20k to $25k or below. Is that a procrastination?
You are asking the wrong questions, the real question is why should you expect a drop in first place and why $20k to $25k and why not some other numbers?
You see there is a difference between analyzing the market and making an educated speculation about a drop then waiting for it to happen and to hope for a drop to make more profit then waiting for that instead!

For now price is fluctuating and is going sideways, we have no reason to expect any major rises or drops until the situation changes and we get more solid signals.

Quote
And we have spent 7 month in this year and the price of bitcoin right now is $30,277 that is, the price is sliding down compare to last week. So where do you think the price of bitcoin will end for the bear market before this year will end?
That is not what "sliding down" looks like. Sliding down would have been if price were $31k then $30k then $29k and so on. Not when it was $29k going to $31k then to $30k then to $31k. That is called going sideways and it is not a bear market, it is between bear and bull markets.
It is very difficult to predict when a sideways trend is going to end and it is hard to know if it leads to a bull run or a bear run although usually it is leading to a bull run.
1812  Bitcoin / Bitcoin Technical Support / Re: Multisig question on: July 17, 2023, 10:39:19 AM
pub_key OP_CHECKSIG
OP_IF (num of sig required) pub_key1 pub_key2 (total pubkeys) OP_CHECKMULTISIG
OP_ENDIF
OP_VERIFY

In your case, your P2SH would be:

A_Pubkey OP_CHECKSIG
OP_IF 1 B_PUBKEY C_PUBKEY D_PUBKEY 3 OP_CHECKMULTISIG
OP_ENDIF
OP_VERIFY
Anybody can spend these outputs by simply providing "OP_TRUE <fake_sig>" to the above redeem script.

The flaws in the script are:
- Using OP_CHECKSIG instead of OP_CHECKSIGVERIFY
When you use OP_CHECKSIG it will push the result of the verification to the stack when immediately after your OP_IF is going to pop an item from the stack which is the result of the signature verification. If it is false it won't even execute the branch under it which can be abused by passing a fake signature so that OP_CHECKSIG pushes OP_FALSE to the stack ergo the OP_IF that pops OP_FALSE is skipped. Which is where we reach OP_VERIFY which needs an item on the stack, hence the first OP_TRUE.
- Using OP_IF
Since we want another signature apart from A in any case, there is no need to put the OP_CHECKMULTISIG in a conditional branch that could be avoided. Specially since you don't have any OP_ELSE branch.
Even if we needed a conditional it should be preceded either by OP_CHECKSIGVERIFY or by an OP_SWAP to use the true/false value that the user provides in their scriptsig not the OP_CHECKSIG result.

The correct redeem script that does what OP wants is:
Code:
<A_pubkey> OP_CHECKSIGVERIFY 1 B_PUBKEY C_PUBKEY D_PUBKEY 3 OP_CHECKMULTISIG
Note that the last OP has to be OP_CHECKMULTISIG not OP_CHECKMULTISIGVERIFY since after evaluating the redeem script, the interpreter needs to check the stack and see at least one item* on the stack that evaluates to true.

* At least one item left if it is P2SH but one and only one item if it is P2WSH.
1813  Economy / Economics / Re: The impact of Russian and Ukrain war on world economy on: July 16, 2023, 06:38:47 PM
US-Russia conflict could enter a new phase very soon in the coming days or weeks but in a different battlefield in Syria.

As you may know US is illegally occupying Syria, more specifically the oil rich regions to steal Syrian energy; while both Iran and Russia are in Syria with the direct invitation of the country to help fight the US backed terrorists.

Recently US has been activating its terror cells inside Syria (more specifically the Takfiri terrorists in north and north-west Syria + separatists/terrorists in eastern Syria) while moving in more forces to their own illegal bases. There is also talks of air defense being sold to terrorist militia in the separatists occupied Northern Iraq (Kurdistan region).
Meanwhile there has been some "face off" between Russian air-force and USAF where they just put on a show for each other! as armed forces are increasing there with increasing tensions.
Such tensions on a smaller scale are not unusual but the other side is usually the resistance against illegal occupation and they end it very quickly using Shock and Awe. Like last month where USAF bombed one of their weapons storages so they retaliated by bombing 5-6 US bases in the region with over a hundred missiles, rockets, shells and loitering munitions.

The economic significance of this is on energy. With the tensions that US is increasing and as they keep destabilizing the most oil rich region, specially if Russia is pulled into the conflict and continues its air attacks against terrorist positions (or rather increases them) while giving air support to the resistance, it could free them up to focus on US occupiers.
As I said above this could prevent US from stealing Syrian energy that includes between 60k to 100k barrels of oil per day.  In today's oil market this amount going back to the energy starved Syria in addition to the conflict in the most oil rich region could significantly increase the oil price, could be even above $100.

Nothing is certain though, we have to wait and see what the next move is and what the scale of the upcoming conflicts are going to be like. It could be from small skirmishes that end abruptly with another Shock and Awe so no major effect on energy prices to a larger conflict that starts in both Syria and Iraq and ends up in the Persian Gulf specially since recently US announced sending some toy aircraft (ie. F-16 fighter jets) to The Persian Gulf where ~20 million barrels of oil pass every day.
1814  Other / Beginners & Help / Re: Is it possible to hack a blockchain? on: July 16, 2023, 05:37:18 PM
in my opinion it's impossible for a blockchain to be hacked because it's decentralized
Blockchain is the database, it is literary a chain of blocks. It is neither decentralized nor centralized on its own. The cryptocurrency project using the blockchain can use it in a centralized way or a decentralized way and neither of these affects the ability to hack it or not.
Of course when you say "hack" your definition is not clear, there are many different types of attacks. For example one of them is the 51% attack that was covered. Other attacks involve finding exploits in the protocol used in that cryptocurrency to do something you are not supposed to do like taking other people's money. This obviously depends on which cryptocurrency we are talking about. For example there has not been any such vulnerability in the Bitcoin protocol to allow people to do something like that, however altcoins are filled with such vulnerabilities. The most popular one is Ethereum that has a smart contract protocol that can easily be exploited like what happened with DAO and many others that came after it.
1815  Other / Beginners & Help / Re: Why non-trader beginners prefer to leave their BTC on CEX? on: July 16, 2023, 05:29:15 PM
From what I've seen the newbies who leave their bitcoins on exchanges aren't "buying bitcoin", they are buying an abstract idea to make a quick profit. They have no idea what bitcoin is, they don't care either. This is also why they end up buying a lot of shitcoins too, they hope to make profit and shitcoins advertise quick profitability (ie pumps and dumps). That means they want money, so they basically deposit their money (ie. fiat) into a website (ie. CEX) and then try to make a profit on that money.
Note that they don't necessarily have to trade to be like what I explained. They are making an investment, like buying stocks through a stock broker. They don't "withdraw their stock" nor do they trade it, they buy and hold it with them hoping for profit.

This is why I don't think this is about "digital education".
Compare that with someone who has informed themselves of what bitcoin truly is and is buying it because they liked this decentralized currency not because they wanted to make profit. Those people regardless of their understanding of computers and stuff like that will go through the process of educating themselves and use a real bitcoin wallet to store their coins.
1816  Economy / Speculation / Re: Bitcoin - The road to a SIX DIGIT price valuation on: July 16, 2023, 05:10:47 PM
I still believe that ETF effects on bitcoin price has been greatly exaggerated, although it will definitely have a positive effect on the price.

In any case when it comes to the next big rise, as I've said before the global economy is the major factor affecting the market for now. The rising inflation was excellent for bitcoin but then recession started and ruined its effects. Now they are trying to reach an equilibrium which is why we don't see rise (or fall) start.
But the inflation is still rising very fast and its effects on bitcoin price is growing. After all this fast growing national debt[1] due to nonstop money printing is bound to push bitcoin price up. $32.5 trillion US debt, $14.5 trillion Chinese debt, $13.5 trillion Japanese debt, and so on. US alone printed over a trillion in the past couple of months ever since the debt ceiling was raised.
In other words 6 digit price is definitely possible in the next major bull run.

[1] https://www.usdebtclock.org/world-debt-clock.html
1817  Bitcoin / Bitcoin Discussion / Re: [Question] Bitcoin More decentralized than Ethereum? on: July 16, 2023, 01:50:40 PM
To be clear Ethereum was centralized even when it was using the PoW algorithm. In fact we could say it was centralized from its inception and we had a lot of simple and very obvious hints. From the 72 million premined ethers before it was even released to the biggest disgrace any cryptocurrency can have with the centralized authority controlling ethereum rolling back blocks just because they lost some money in a gamble called DAO.

The move to PoS was the last nail in Ethereum's coffin that proved it has always been a centralized shitcoin. The recent decision to centralized the validators even more by significantly increasing the amount needed to be locked is just kicking an already dead horse.
1818  Bitcoin / Bitcoin Discussion / Re: Can Bitcoin leave to be decentralized on: July 16, 2023, 01:41:26 PM
It's not just about being centralized or decentralized. The centralized currency already exists in many different forms from fiat that we use day to day to online payment systems like PayPal. Each are solving a problem and providing a useful utility hence they have a "value". Creating another centralized currency can only be useful if it actually provides a useful utility. In fact this is one of the criticism of the CBDCs that are the hot topic these days, they don't seem to offer anything new.
In comparison bitcoin as the only decentralized currency offered a new form of money that didn't exist before. Which is why it gained popularity and a growing value.
1819  Economy / Economics / Re: Iran and Russia want to issue new stablecoin backed by gold on: July 15, 2023, 03:32:17 PM
Russia is suffering a military defeat in Ukraine, and in order to somehow mitigate such a shame for itself, they began to say that it is at war with NATO. But she is at war with the Ukrainians, who use the military assistance provided by NATO countries to Ukraine. In my opinion, it's not the same thing. And the Russian flagship of the Black Sea Fleet, the Moskva cruiser, was sunk by the Armed Forces of Ukraine with two Ukrainian-made Neptune missiles. And what does the NATO countries have to do with it then?
Months ago when I said that there were very few who were saying it, today even the Americans are saying the same thing Cheesy Even the US senators are saying "this is the best money they've spent and they will fight Russia to the last Ukrainian". Whether you admit it or not this has always been a fight between Russia and NATO or more specifically US dictating NATO aggression.

Quote
Iran is not involved in Russia's war against Ukraine? Almost every day on the territory of Ukraine, Russia launches Iranian-made drones and Iran is not involved in this? In Tehran, it is justified by the fact that long before the war they handed over to Russia a small batch of drones. But hundreds, if not thousands, of them have already been launched across Ukraine, and transport planes from Iran regularly fly to Moscow. Recently, these drones have been transported by sea.
Why aren't you ever talking about the Iranian weapons used by Armed Forces of Ukraine? Oh, I know it doesn't go with the ongoing propaganda. Here is one example showing Iranian made Fadak anti-armor rockets used by Ukraine's Mi-17 helicopters.




The fact is that Iran as one of the most advanced arms manufacturers have sold many defensive weapons to many countries including Europeans. Many of these weapons are resold to third parties like Ukraine and Russia.

P.S. Those living in glass houses shouldn't throw stones. Next time you wanted to accuse others of selling weapons to Russia first think about Ukraine's cooperation with bloodthirsty invaders such as US in Afghanistan, Syria and Iraq over the past two decades or the large amount of arms Ukraine sold others like Saudi dictatorship regime to help their genocide in Yemen. To this day the carcass of Ukrainian Practika made armored vehicles like Kozak-5 can be found in Yemen as a reminder of the Ukraine's help in the genocide.
1820  Economy / Economics / Re: The impact of Russian and Ukrain war on world economy on: July 15, 2023, 07:44:57 AM
The price of oil is going up, you can tell just by visiting your local gas station. Ruble is going down, that's a fact too. Mostly due to Prigozhin's mutiny. Prigozhin is a mercenary, so there's big chance he got paid to do it by some other "customer" if you know what I mean. Anyway, I think this effect is temporary and ruble will recover soon-ish. Prigozhin is already back in Putin's lap, planning some offensive from Belarus or whatever. 
Considering the outcome I don't think it was actually a "mutiny" to begin with Cheesy
Russia armed Belarus with nukes then sent these mercenaries there with the nukes. Before this so called mutiny, Wagner was nearly 400 km away from Kyiv, now they are 80 km away from Kyiv and a stones throw from Poland ready to do another possible "mutiny"; maybe shoot something in those directions while Russia claims they have no "control" over them referring to their shenanigans...

As for Ruble, I don't think it has to do with the recent shenanigans since the long term trend looks normal to me. Like majority of fiat currencies it is losing its value. Back in 2021 1 Ruble was 0.013 USD and then 2022 occurred where Europeans started purchasing Russian energy using Ruble instead of dollar so it was strengthened. Now in 2023 it is going back to normal and 1 Ruble is 0.011 USD with a 15% dump.
Most fiats are like this. Yen from 0.0095 to 0.0072 (-24%), Pound from 1.40 to 1.30 (-7%), Euro from 1.20 to 1.12 (-6.6%), Rupee from 0.014 to 0.012 (-14%), ...
Specially since US started mass exporting its inflation by printing trillions of dollars in the past year while increasing interest rate to keep the dollar exchange rate high, such dumps hastened. In fact this is one of the main incentives for dedollarisation.
Pages: « 1 ... 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 [91] 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 ... 1157 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!