Bitcoin Forum
May 26, 2024, 07:46:37 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 35 36 37 38 39 40 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 ... 1151 »
1681  Bitcoin / Bitcoin Discussion / Re: US Presidential candidate announces plan to back the US dollar with Bitcoin on: July 21, 2023, 02:53:54 AM
That's the dumbest thing I've ever heard, although pretending to support bitcoin from candidate wannabes is not a new thing. It happened in the past elections in US too.

But this is dumbest because it is not even possible to do so. For starters POTUS is not capable of making such a fundamental change. The regime decides these things and they won't allow strengthening of bitcoin that threatens existence of the dollar.
Secondly due to the gigantic amount of dollar the the regime has printed so far the exchange rate they have to set for bitcoin (to be backing the dollar) has to be something like $10 million per bitcoin. That means shooting the price up and US is not capable of accumulating that much bitcoin to back its massive amount of worthless dollars.
Finally bitcoin is not gold that they can fool the world with by saying they have the backing gold safe and sound. They'd have to publish an address which anybody could verify and the world will know instantly if they break the ratio which we know they have no other choice but to do that. Over the past couple of months ever since the debt ceiling was raised they printed over a trillion dollars!!!
1682  Bitcoin / Bitcoin Discussion / Re: Will You Return Hardware Wallet That Contains 3+ BTC in a Hotel Room? on: July 21, 2023, 02:42:55 AM
Not returning someone else's money you've found is stealing in my books, so obviously I'd return such a thing but most importantly I don't want others to do something like this to me (not return my money if I lose it some day) so I don't do it to others.
1683  Bitcoin / Development & Technical Discussion / Re: Segwit transaction with no witness stack on: July 20, 2023, 01:19:12 PM
My question is, why is it like that? Is it not forbidden for segwit transactions to have zero-length witness stacks?
It's fine to have no witnesses (zero length).
In a transaction with witness you have to have the same number of witness stacks as your inputs so when you have 7 inputs you have to have 7 witness stacks but some of those outputs that are being spent (like first and second) are legacy so there is no witness needed hence the empty witnesses (OP_0) but the others (like the third) have a witness stack hence the 4 items in that stack.
1684  Bitcoin / Development & Technical Discussion / Re: Is OP_PUSHDATA* not allowed in Segwit outputs? on: July 20, 2023, 01:03:04 PM
That's not it.
I'd say this is a terrible code to have in a library because it is supposed to handle things that are different and are not supposed to be treated or handled the same way.
For starters it is handling scripts and witnesses which are entirely different things. Scripts are scripts! They contain OP codes including PUSHDATA and are supposed to be interpreted to "build" the stack with the "operations" you have to perform. Hence the 4 branches handling 0x4c,0x4d,0x4e.
On the other hand witness is already a stack, it is not-supposed to be interpreted and it does not include OP codes including PUSHDATA. It only has count and size. The code also assumes you have read and discarded the count.

In simple terms this method handles apples and oranges at the same time which is why it looks weird.

In a script you have OP_PUSHDATA1 so the first 4 branches handle those with a condition that it is not-witness so that they know what data to "push to the stack" while the last branch (the else part) is handling the witness (not SegWit output or address) so it has to read a var_int (aka compact_int) indicating the size of the item that is already on the stack.
1685  Bitcoin / Wallet software / Re: Wallets affected by low entropy mnemonic hack on: July 20, 2023, 05:25:04 AM
No one has compiled a list yet. You would probably have to look through the source code and see how they implement it and if its done according to standard.
A quick way to determine if a wallet is not using deterministic signing is to sign a transaction twice and see if the hash changes. If it did, the wallet is not using RFC6979 but if it didn't you still have to check the code to make sure.
Message signing should also work since the process is the same.
1686  Economy / Economics / Re: Russia and others, move to use Yuan instead of dollar. on: July 19, 2023, 06:43:50 PM
There is a thing that I don't understand. Some years ago I remember Apple or Barak Obama stated that Apple couldn't move factories from China to other country because Chinese laborers were highly qualified, efficient and fast. So, I don't really understand, if America is so dependent on China, why does China heavily invests in U.S. Treasury bonds and makes its own currency weak to keep low export fees? It could profit more if the USA is really dependent on China.
They "buy US debt" and keep their exchange rate low because they want to force US to be dependent on China. If we look at the history, like the past 40-50 years we have a very weak country with no economy to speak of and no production while the population is enormous (about 850 million) and 85% of them are living in absolute poverty. That is 720+ million people who had literary nothing.

40-50 years ago there were two powers the US and USSR and they were fighting. China took advantage and created that dependence, slowly but surely. That way they grew. US also had no choice but to give China all these benefits, from technologies to investment. Otherwise the communists China would have played a 100% USSR favored game.
But at some point US regime realized while they were busy trying to destroy their competitor USSR, China had been growing too much and US was already heavily depending on China.

Now here is the thing, this used to be China's strategy to grow. Today almost all countries have lots of relations with China so China no longer "needs" US like before. At the same time when US publicly announces that China's economic growth is a threat to US national security (ignore how absurd that is) they are in fact declaring war on China. So China also retaliates by screwing US, for example they dump $175 billion of the US bonds they were bag-holding, they join the dedollarisation wagon, they respond to the tariff war with tariff of their own, they disrupt exporting goods to US to disrupt their market, they manipulate the energy market to keep the prices up and damage US economy, they reduce or stop export of raw materials, and a lot more...

And there is another thing that I personally think is a huge bullshit. Why doesn't America produces goods in the USA? Labor is expensive? Then they shouldn't produce food, shouldn't provide postal service, shouldn't do tons of thing if we think that way. And labor isn't that cheap in China too. I think they are just exploiting their employees and they wont' be able to do the same in the USA. Or may be? Idk, I have heard that Amazon exploits its warehouse and delivery employees too.
It is super expensive to produce almost everything inside US because it is a capitalist democracy.
Certain things like food is a different matter, because US is massive and has lots of fertile land for farming so it is still possible to do domestically not to mention that food is considered a strategic good so there is no way in hell they'd let US be fully depended on another country for that.

Other things like "postal service" that you mentioned are "services" not products and sometimes they can not be outsourced, they have to remain domestic.
With products like a phone, there is always competition. If you manufacture a phone inside US and have to sell it for $5000 while China manufactures the same exact thing but for $500 you simply can not compete and nobody is going to buy the $5000 domestic phone! Not to mention that they won't even be able to afford to pay that much even if there were no alternative!!!
1687  Economy / Economics / Re: New currency from BRICS countries on: July 19, 2023, 05:44:04 PM
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.
I agree that a more decentralization of global currencies, it will be better and less shocks from any big change in the USA. and US dollar. However, new currency from multilateral union will have many challenge to increase and maintain their power as well as competitiveness in global economy.

In 2022, The Euro currency lost its parity with the US. dollar is example. BRICS currency will have same or even bigger challenge because it is a newborn currency and we have to think BRICS are stronger then the Euro zone or weaker.
Exactly. The bigger problem that sometimes is overlooked is that these currencies (BRICS or EURO) are considered as replacement for dollar which means United States regime will do everything in its power to prevent it from happening. In fact US is the only regime in the world that if you dump their currency they consider it as an act of war. They've bombed countries for less...

As for the fate of BRICS currency, I think the chances of success is higher than euro. One main reason is that members of BRICS are more independent than Europeans and unlike the time euro was created, today US is weak.
1688  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.
1689  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.
1690  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.
1691  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.
1692  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.
1693  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.
1694  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.
1695  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.
1696  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
1697  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.
1698  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.
1699  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.
1700  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.
Pages: « 1 ... 35 36 37 38 39 40 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 ... 1151 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!