Home Blog

Poland Continues its Aggression Towards Crypto, But the Community Shows Force

0


On May 10, Polish Financial Supervision Authority (KNF) held a tender order of 615,000 zloty (around $170,000) to plan and conduct a social media campaign that will focus on the risks associated with cryptocurrencies, pyramid schemes, and forex trading.

That sum is hardly impressive, but represents another gesture against crypto by the conservative Polish government, which has already admitted to its investments in FUD media activities in February. Nevertheless, the local crypto community has stood up for itself in an educational response.

Winter disclosures

Poland officially recognizes trading and mining of cryptocurrencies, however the state’s overall views toward crypto seemed to become more skeptical in the past months, as a trend of suspicion toward cryptocurrencies in Poland emerged alongside the news about the Bitfinex situation, the government’s rumored interest in Petro, and the dismissal of Anna Streżyńska, the former crypto-friendly Minister of Digital Affairs.

In February 2018, Polish journalists reported that the Central Bank of Poland paid about 91,000 zloty (around $25,000) to produce an anti-crypto video. The video was carried out in conjunction with Polish YouTube partner network Gamellon, Google Ireland Limited, and Facebook Ireland Limited, who allegedly helped to distribute the video.

Dubbed “I LOST ALL THE MONEY?!,” the not-so-subtle clip contained no signs indicating that it was paid for by the government or sponsored at all. A popular Polish blogger, Marcin Dubiela, played a Gucci-wearing, Corvette-riding cryptoenterprenuer who had invested all his money in a single token, and, by the end of the video, had hit rock bottom: wearing shorts and flip flops, he takes fiat coins out of a public fountain.

Previously, Polish journalist and YouTube blogger Karol Paciorek provided more details on the campaign for Cointelegraph:

“There was a product placement deal between NBP and three large YouTube channels: Marcin Dubiel – 937,000 subscribers; Wiśnia – 818,000 subscribers; and Planeta Faktów – 1 mln subscribers. It’s an educational campaign paid from a government-based organization. Someone asked NBP how much they have paid for the campaign, and got an answer.”

Although the video garnered more than half a million views on Dubiela’s channel alone, its effect seems doubtful. Jacek Walewski, the secretary of Polish Bitcoin Association (PBA) told Cointelegraph that the clip failed to stigmatize the perception of crypto among casual users in Poland, as it was “unprofessional and stupid”.

Central bank hired popular YouTubers among teenagers [for this activity]. But they aren’t economic authorities.

Justyna Laskowska of BitBay, the largest exchange platform in Poland, says that while their service didn’t experience any client loss after the video aired, the official campaign seems toxic for the environment, as it “lacked educational value”.

We are happy to have over 800,000 loyal users, and thus we did not feel the increase in the number of closing accounts. However, the campaign made by the government certainly scared off people who wanted to learn more about cryptocurrency, and caused an unfavorable atmosphere around it.

Mature response from the community

On May 6 a small film studio uploaded a documentary on YouTube called “Krypto”, with the declared goal of educating the Polish public with basic facts about crypto and blockchain technology.

The documentary’s director and screenwriter, cryptocurrency and blockchain enthusiast Piotr Pacewicz, told Cointelegraph that he saw Krypto as a “brick [for building] a better world, [one] with a financial system where everybody is equal”.

“My main aim [was to] educate, educate and educate. Because [almost] no one knows the fundamentals about Bitcoin and blockchain.”

Pacewicz says that the production “was cheaper than the NBP campaign”, although he wouldn’t disclose precise figures. To make the film, Pacewicz consulted with Szczepan Bentyn, a local crypto enthusiast and YouTuber who helped him with the contacts.  

The NBP-funded video came out around the time Pacewicz started shooting Krypto. Shocked by its propagandistic tone (he referred to the video as “shit” and “a piece of crap” in the comment), Pacewicz held an “anti-fiat campaign” with “funny t-shirts” and continued working on the documentary. Now that Krypto has been publically released, he seems satisfied with the results.  

We decided to publish “Krypto” on YouTube for free and we still received very good feedback. Krypto wasn’t made as a direct response for [that] shitty anti-crypto campaign, but it’s a mature answer [nonetheless].

At the time of publication, “Krypto” has just over 22,000 views on YouTube.

Rhetoric aside, negotiations are underway

Despite this interchange, Polish Bitcoin Association is currently negotiating with the government on future tax regulations for cryptocurrencies, which are currently non-existent.  The task appears to be even more complex as Jacek Walewski, the head of PBA, argues that Polish politicians don’t understand cryptocurrencies at all:

Maybe just very few Polish politicians understand what Blockchain is. For example, our Prime Minister Mr. Mateusz Morawiecki compared cryptocurrencies to Amber Gold [when speaking in Davos]. Amber Gold was a big ponzi scheme [in Poland]…

Nevertheless, local reports show that representatives of right-wing parties in the country, including Alliance and the dominant Law and Justice, seem to favor blockchain and cryptocurrencies. Thus, Wojciech Murdzek of Law and Justice said:

Regulation of the cryptocurrency market is necessary because of the country’s interests. It is essential that cryptocurrency-oriented businesses remain in Poland rather than move abroad.

The liberal-conservative Civic Party seems to be supportive of crypto as well, while the leftist party Razem does not seem to have a clear stance on cryptos at the moment, however highlighting that “mining consumes a lot of energy in the era of Climate Change”.

Justyna Laskowska also told Cointelegraph that BitBay representatives “are actively engaged” in discussions with the Polish government regarding the taxation of cryptocurrencies as well, as “misunderstandings and contradictory interpretations of tax regulations” have recently affected their users. After meeting with Under Secretary of State Paweł Gruza from the Ministry of Finance, the exchange moved closer toward reaching a reasonable solution.

Although one coherent version of the regulations hasn’t  been yet established, we can already see a big step forward. The unfavorable way of calculating tax for cryptocurrency traders has been withdrawn.

On May 21, Poland’s Ministry of Finance announced that it will temporarily suspend tax collection for cryptocurrencies. The Ministry states it will conduct an “in-depth analysis” of the crypto space to inform better regulation and taxation policies going forward. Previously, the Ministry of Finance had released a statement clarifying that taxation for cryptocurrency transactions fell into two income tax brackets of 18 and 32 percent. An additional one percent levy tax due to civil law agreements was also applied, as the agency considered crypto transactions as the transfer of property rights.

The community is ready to cooperate

Jacek Walewski of Polish Bitcoin Association sees regulation as inevitable but by no means a positive development:

“I think that cryptocurrencies will become regularized. But [in that case] Polish companies (for example, the biggest market, BitBay) [might] move their headquarters to other countries. Why? Because they have problems with Polish banks that denounce their contracts. The number of followers of Bitcoin [in the country] is growing, but it’s a very difficult time for cryptocurrency businesses.”

In her turn, BitBay’s Laskowska remains positive and business-minded. “It can still be fixed,” she believes, and the community has its force and value for the country:

“[Poland has] an influential community of cryptocurrency users, who are not only traders but also specialists regarding blockchain usage. All these people can cooperate with the government to regulate the industry and make it grow. I believe that the government will see this opportunity for our country.”





Source link

Bitcoin Adoption is Real. Was Shopping around for my future Lambo and decided to give it a shot. : Bitcoin

0


Bitcoin is the currency of the Internet: a distributed, worldwide, decentralized digital money. Unlike traditional currencies such as dollars, bitcoins are issued and managed without any central authority whatsoever: there is no government, company, or bank in charge of Bitcoin. As such, it is more resistant to wild inflation and corrupt banks. With Bitcoin, you can be your own bank.

If you are new to Bitcoin, check out We Use Coins and Bitcoin.org. You can also explore the Bitcoin Wiki:

Community guidelines

  • Do not use URL shortening services: always submit the real link.
  • Begging/asking for bitcoins is absolutely not allowed, no matter how badly you need the bitcoins. Only requests for donations to large, recognized charities are allowed, and only if there is good reason to believe that the person accepting bitcoins on behalf of the charity is trustworthy.
  • News articles that do not contain the word “Bitcoin” are usually off-topic. This subreddit is not about general financial news.
  • Submissions that are mostly about some other cryptocurrency belong elsewhere. For example, /r/CryptoCurrency is a good place to discuss all cryptocurrencies.
  • Promotion of client software which attempts to alter the Bitcoin protocol without overwhelming consensus is not permitted.
  • No referral links in submissions.
  • No compilations of free Bitcoin sites.
  • Trades should usually not be advertised here. For example, submissions like “Buying 100 BTC” or “Selling my computer for bitcoins” do not belong here. /r/Bitcoin is primarily for news and discussion.
  • Please avoid repetition — /r/bitcoin is a subreddit devoted to new information and discussion about Bitcoin and its ecosystem. New merchants are welcome to announce their services for Bitcoin, but after those have been announced they are no longer news and should not be re-posted. Aside from new merchant announcements, those interested in advertising to our audience should consider Reddit’s self-serve advertising system.
  • Do not post your Bitcoin address unless someone explicitly asks you to.
  • Be aware that Twitter, etc. is full of impersonation.

Related communities

Sorted roughly by decreasing popularity.

Non-Bitcoin communities

Join us on IRC

chat.freenode.net #bitcoin

Other Bitcoin sites

Bitcoin Forum
Bitcoin Google+ Community
Bitcoin Stack Exchange
Bitcoin Magazine

Download Bitcoin Core

Bitcoin Core is the backbone of the Bitcoin network. Almost all Bitcoin wallets rely on Bitcoin Core in one way or another. If you have a fairly powerful computer that is almost always online, you can help the network by running Bitcoin Core. You can also use Bitcoin Core as a very secure Bitcoin wallet.

Style sheet credits

The CSS used by this subreddit is the Erdune Theme modified by /u/Annihilia and /u/konkedas. Logo design by /u/Annihilia. Check out his other work here.

Ad campaign:

We previously collected donations to fund Bitcoin advertising efforts, but we no longer accept donations. The funds already donated will be spent on some sort of advertising, as intended. As of now, 10.35799117 BTC was spent out of 22.51357574. If you have ideas for the remaining BTC, see here for more info.



Source link

Bitfury-Backed Group Mined 800 Bitcoins in Q1

0


Share This

Tags

Hut 8 Mining Group raised $70 million CAD to invest in mining machines, and mined 828 bitcoins in the first quarter of 2018.

Read more –> click here all content is copyright Coin Desk.

Need Bitcoin marketing and PR? Bitcoin PR Buzz has been proudly serving the PR and marketing needs of Bitcoin and digital currency tech start-ups for over 2 years. Get your own professional Bitcoin or cryptocurrency press release CLICK HERE.

Powered by ABITCO.IN





Source link

address – ELI5: What is Base58Check encoding?

0


Can someone explain what it is and why it’s called Base58Check encoding?

There are two parts to the name “Base58Check”. The first part is “Base58“. This is fairly self explanatory, the encoding uses Base 58. This means that there are 58 digits which are represented by 58 characters. One digit is a number between 0 and 57, just like how in the decimal system (or base 10) we have which are a number between 0 and 9. Since each digit is supposed to be one character, we need to have a different “alphabet” for each digit. For base 58, we use the alphabet 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz with the number 0 being represented by the character 1 and the number 57 represented by the character z. For comparison, the decimal alphabet is 0123456789 with the number 0 represented by the character 0 and the number 9 represented by the character 9.

The second part of the name is “Check“. This refers to a checksum. The SHA256 double of the data that we want to encode is calculated, and the first four bytes of that hash is used as a checksum. This is an error detection method to help ensure that the data we received is correct and not corrupted. Those four bytes are appended to the data that we are encoding before we perform a base conversion to generate the base 58 string.

As with any piece of data in a computer, the entire pre-base58 byte string can be interpreted as a very large integer. From there, it is easy to perform a base conversion to base 58 and thus produce the final base 58 string.

Are addresses generated without going over those steps still valid in Bitcoin?

You cannot generate an address without going over those steps, so it is impossible to not go over these steps to produce an address.

To further this question, what do npm packages like bs58check do exactly? The description is as so

They implement the entire conversion from bytes to Base58Check encoded string.



Source link

Diamond Industry Giants Partner With Blockchain Startup to Tokenize Gems

0


Two leading diamond industry players have agreed to work with blockchain startup D1 Mint Limited to tokenize diamonds, according to a May 23 press release shared with Cointelegraph.

D1 Mint Limited, the creator of the diamond-backed crypto asset D1 Coin, has signed its first purchase agreement to buy 1,500 investment-grade diamonds, worth $20 mln, from global veteran KGK Diamonds, part of the De Beers group. The raw diamonds were supplied by the largest diamond mining company in the world, Alrosa.

Alexei Chekunkov, a member of Alrosa’s Board of Directors, said the company believes that the innovation of blockchain can transform the precious gem industry by making natural diamonds into an investment asset class with wider appeal across “various investor groups, driv[ing] higher demand.”

The diamond industry has seen stagnating demand among retailers, with spending on diamond jewelry staying flat at around $80 bln a year since 2014, according to a De Beers study.

D1 uses a pricing algorithm to determine the price at which crypto investors can redeem their tokens for selected diamonds from their diamond reserve at any given time, using the new technology to translate traditional industry parameters of value – such as shape, carat, cut and clarity.

Beyond broadening investment appeal, the diamond industry is making use of blockchain to achieve transparency across the gem supply chain. Earlier this month, global diamond giant De Beers successfully used blockchain technology to track 100 diamonds from mine to retailer. The company said that blockchain can be used to secure public confidence that their supply chain is free of so-called “conflict diamonds” – uncut diamonds mined in war-zones that are illicitly traded to fund fighting.

Also this spring, IBM partnered with gold and diamond industry leaders to develop a similar blockchain network to trace the origin of precious metals.





Source link

Isn’t this US investigation into manipulation very positive for Bitcoin? : Bitcoin

0


Bitcoin is the currency of the Internet: a distributed, worldwide, decentralized digital money. Unlike traditional currencies such as dollars, bitcoins are issued and managed without any central authority whatsoever: there is no government, company, or bank in charge of Bitcoin. As such, it is more resistant to wild inflation and corrupt banks. With Bitcoin, you can be your own bank.

If you are new to Bitcoin, check out We Use Coins and Bitcoin.org. You can also explore the Bitcoin Wiki:

Community guidelines

  • Do not use URL shortening services: always submit the real link.
  • Begging/asking for bitcoins is absolutely not allowed, no matter how badly you need the bitcoins. Only requests for donations to large, recognized charities are allowed, and only if there is good reason to believe that the person accepting bitcoins on behalf of the charity is trustworthy.
  • News articles that do not contain the word “Bitcoin” are usually off-topic. This subreddit is not about general financial news.
  • Submissions that are mostly about some other cryptocurrency belong elsewhere. For example, /r/CryptoCurrency is a good place to discuss all cryptocurrencies.
  • Promotion of client software which attempts to alter the Bitcoin protocol without overwhelming consensus is not permitted.
  • No referral links in submissions.
  • No compilations of free Bitcoin sites.
  • Trades should usually not be advertised here. For example, submissions like “Buying 100 BTC” or “Selling my computer for bitcoins” do not belong here. /r/Bitcoin is primarily for news and discussion.
  • Please avoid repetition — /r/bitcoin is a subreddit devoted to new information and discussion about Bitcoin and its ecosystem. New merchants are welcome to announce their services for Bitcoin, but after those have been announced they are no longer news and should not be re-posted. Aside from new merchant announcements, those interested in advertising to our audience should consider Reddit’s self-serve advertising system.
  • Do not post your Bitcoin address unless someone explicitly asks you to.
  • Be aware that Twitter, etc. is full of impersonation.

Related communities

Sorted roughly by decreasing popularity.

Non-Bitcoin communities

Join us on IRC

chat.freenode.net #bitcoin

Other Bitcoin sites

Bitcoin Forum
Bitcoin Google+ Community
Bitcoin Stack Exchange
Bitcoin Magazine

Download Bitcoin Core

Bitcoin Core is the backbone of the Bitcoin network. Almost all Bitcoin wallets rely on Bitcoin Core in one way or another. If you have a fairly powerful computer that is almost always online, you can help the network by running Bitcoin Core. You can also use Bitcoin Core as a very secure Bitcoin wallet.

Style sheet credits

The CSS used by this subreddit is the Erdune Theme modified by /u/Annihilia and /u/konkedas. Logo design by /u/Annihilia. Check out his other work here.

Ad campaign:

We previously collected donations to fund Bitcoin advertising efforts, but we no longer accept donations. The funds already donated will be spent on some sort of advertising, as intended. As of now, 10.35799117 BTC was spent out of 22.51357574. If you have ideas for the remaining BTC, see here for more info.



Source link

transactions – P2SH signature verification in python

0


I am trying to understand and verify P2SH script by writing a python code to parse real transaction in blockchain. I have chosen below Transaction randomly.
TxID: 7edb32d4ffd7a385b763c7a8e56b6358bcd729e747290624e18acdbe6209fc45

I am getting BadSignatureError.

Raw transaction:

bitcoin-cli getrawtransaction 7edb32d4ffd7a385b763c7a8e56b6358bcd729e747290624e18acdbe6209fc45
0100000001c8cc2b56525e734ff63a13bc6ad06a9e5664df8c67632253a8e36017aee3ee40000000009000483045022100ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf88302200b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b79001455141042f90074d7a5bf30c72cf3a8dfd1381bdbd30407010e878f3a11269d5f74a58788505cdca22ea6eab7cfb40dc0e07aba200424ab0d79122a653ad0c7ec9896bdf51aefeffffff0120f40e00000000001976a9141d30342095961d951d306845ef98ac08474b36a088aca7270400

Decode above Raw transaction and get Transaction ID of locking script:

bitcoin-cli decoderawtransaction $(bitcoin-cli getrawtransaction 7edb32d4ffd7a385b763c7a8e56b6358bcd729e747290624e18acdbe6209fc45)
{
  "txid": "7edb32d4ffd7a385b763c7a8e56b6358bcd729e747290624e18acdbe6209fc45",
  "hash": "7edb32d4ffd7a385b763c7a8e56b6358bcd729e747290624e18acdbe6209fc45",
  "version": 1,
  "size": 229,
  "vsize": 229,
  "weight": 916,
  "locktime": 272295,
  "vin": [
    {
      "txid": "40eee3ae1760e3a8532263678cdf64569e6ad06abc133af64f735e52562bccc8",
      "vout": 0,
      "scriptSig": {
        "asm": "0 3045022100ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf88302200b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b790[ALL] 5141042f90074d7a5bf30c72cf3a8dfd1381bdbd30407010e878f3a11269d5f74a58788505cdca22ea6eab7cfb40dc0e07aba200424ab0d79122a653ad0c7ec9896bdf51ae",
        "hex": "00483045022100ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf88302200b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b79001455141042f90074d7a5bf30c72cf3a8dfd1381bdbd30407010e878f3a11269d5f74a58788505cdca22ea6eab7cfb40dc0e07aba200424ab0d79122a653ad0c7ec9896bdf51ae"
      },
      "sequence": 4294967294
    }
  ],
  "vout": [
    {
      "value": 0.00980000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 1d30342095961d951d306845ef98ac08474b36a0 OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a9141d30342095961d951d306845ef98ac08474b36a088ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "13fLLox43yXYvfoZadXpGbkTUXkW8bhqut"
        ]
      }
    }
  ]
}

Get Decoded Transaction of locking script:

bitcoin-cli decoderawtransaction $(bitcoin-cli getrawtransaction 40eee3ae1760e3a8532263678cdf64569e6ad06abc133af64f735e52562bccc8)
{
  "txid": "40eee3ae1760e3a8532263678cdf64569e6ad06abc133af64f735e52562bccc8",
  "hash": "40eee3ae1760e3a8532263678cdf64569e6ad06abc133af64f735e52562bccc8",
  "version": 1,
  "size": 189,
  "vsize": 189,
  "weight": 756,
  "locktime": 0,
  "vin": [
    {
      "txid": "42a3fdd7d7baea12221f259f38549930b47cec288b55e4a8facc3c899f4775da",
      "vout": 0,
      "scriptSig": {
        "asm": "3044022048d1468895910edafe53d4ec4209192cc3a8f0f21e7b9811f83b5e419bfb57e002203fef249b56682dbbb1528d4338969abb14583858488a3a766f609185efe68bca[ALL] 031a455dab5e1f614e574a2f4f12f22990717e93899695fb0d81e4ac2dcfd25d00",
        "hex": "473044022048d1468895910edafe53d4ec4209192cc3a8f0f21e7b9811f83b5e419bfb57e002203fef249b56682dbbb1528d4338969abb14583858488a3a766f609185efe68bca0121031a455dab5e1f614e574a2f4f12f22990717e93899695fb0d81e4ac2dcfd25d00"
      },
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 0.00990000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_HASH160 e9c3dd0c07aac76179ebc76a6c78d4d67c6c160a OP_EQUAL",
        "hex": "a914e9c3dd0c07aac76179ebc76a6c78d4d67c6c160a87",
        "reqSigs": 1,
        "type": "scripthash",
        "addresses": [
          "3P14159f73E4gFr7JterCCQh9QjiTjiZrG"
        ]
      }
    }
  ]
}

We need to evaluate unlocking script + locking script.

unlocking script:

00483045022100ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf88302200b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b79001455141042f90074d7a5bf30c72cf3a8dfd1381bdbd30407010e878f3a11269d5f74a58788505cdca22ea6eab7cfb40dc0e07aba200424ab0d79122a653ad0c7ec9896bdf51ae

Evaluate unlocking script:

step 1: stack -> 0x00 (OP_0)
step 2: stack -> 0x00, 0x3045022100ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf88302200b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b79001
step 3: stack -> 0x00, 
0x3045022100ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf88302200b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b79001, 
0x5141042f90074d7a5bf30c72cf3a8dfd1381bdbd30407010e878f3a11269d5f74a58788505cdca22ea6eab7cfb40dc0e07aba200424ab0d79122a653ad0c7ec9896bdf51ae

Copy this stack as stack_copy

locking script:

a914e9c3dd0c07aac76179ebc76a6c78d4d67c6c160a87

Evaluate locking script now with the stack:

step 4: 0xa9 (OP_HASH160)
stack -> 0x00,
0x3045022100ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf88302200b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b79001,
0xe9c3dd0c07aac76179ebc76a6c78d4d67c6c160a

step 5: 0x14 (pushdata 20 bytes) 0xe9c3dd0c07aac76179ebc76a6c78d4d67c6c160a
stack -> 0x00,
0x3045022100ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf88302200b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b79001,
0xe9c3dd0c07aac76179ebc76a6c78d4d67c6c160a,
0xe9c3dd0c07aac76179ebc76a6c78d4d67c6c160a

step 6: 87 OP_EQUAL
stack -> 0x00,
0x3045022100ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf88302200b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b79001,
0x01

Since OP_EQUAL returned True and it is P2SH we evaluate redeem script against copied stack

stack = stack_copy

redeem script = stack.pop():

0x5141042f90074d7a5bf30c72cf3a8dfd1381bdbd30407010e878f3a11269d5f74a58788505cdca22ea6eab7cfb40dc0e07aba200424ab0d79122a653ad0c7ec9896bdf51ae

Evaluate redeem script:

step 7: 0x51 (OP_1)
stack -> 0x00,
0x3045022100ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf88302200b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b79001,
0x01

step 8: 0x41 (Pushdata 65 bytes) 042f90074d7a5bf30c72cf3a8dfd1381bdbd30407010e878f3a11269d5f74a58788505cdca22ea6eab7cfb40dc0e07aba200424ab0d79122a653ad0c7ec9896bdf
stack -> 0x00,
0x3045022100ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf88302200b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b79001,
0x01,
0x042f90074d7a5bf30c72cf3a8dfd1381bdbd30407010e878f3a11269d5f74a58788505cdca22ea6eab7cfb40dc0e07aba200424ab0d79122a653ad0c7ec9896bdf

step 9: 0x51 (OP_1)
stack -> 0x00,
0x3045022100ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf88302200b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b79001,
0x01,
0x042f90074d7a5bf30c72cf3a8dfd1381bdbd30407010e878f3a11269d5f74a58788505cdca22ea6eab7cfb40dc0e07aba200424ab0d79122a653ad0c7ec9896bdf,
0x01

step 10: 0xae (OP_CHECKMULTISIG)
We have 1 sig and 1 pubkey. To check multisig we need to get transaction which was signed. We will come back to this step once we have transaction which was signed.

scriptsig from stack:

0x3045022100ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf88302200b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b79001

Parse scriptsig:

0x30 DER
0x45 Length
0x02 Type Integer
0x21 Length of r
00 (ignore) ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf883 (r)
02 Type Integer
20 Length of s
0b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b790 (s)
01 SIGHASH_ALL

Since sig type is SIGHASH_ALL we replace only unlocking script with locking script. This also gives us r and s. sig = r||s

sig we will need in multisig:
ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf8830b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b790

Parsing raw transaction of unlocking script:

01 00 00 00 Version
01 input count
c8 cc 2b 56 52 5e 73 4f f6 3a 13 bc 6a d0 6a 9e 56 64 df 8c 67 63 22 53 a8 e3 60 17 ae e3 ee 40 Previous transaction
00 00 00 00 Previous transaction out index
--------- replace this [
90 
00 48 30 45 02 21 00 ad 08 51 c6 9d d7 56 b4 51 
90 b5 a8 e9 7c b4 ac 3c 2b 0f a2 f2 aa e2 3a ed 
6c a9 7a b3 3b f8 83 02 20 0b 24 85 93 ab c1 25
95 12 79 3e 7d ea 61 03 6c 60 17 75 eb b2 36 40 
a0 12 0b 0d ba 2c 34 b7 90 01 45 51 41 04 2f 90 
07 4d 7a 5b f3 0c 72 cf 3a 8d fd 13 81 bd bd 30 
40 70 10 e8 78 f3 a1 12 69 d5 f7 4a 58 78 85 05 
cd ca 22 ea 6e ab 7c fb 40 dc 0e 07 ab a2 00 42 
4a b0 d7 91 22 a6 53 ad 0c 7e c9 89 6b df 51 ae
------------- ]
fe ff ff ff sequence
01 out count
20 f4 0e 00 00 00 00 00 value 
19 script size
76 a9 14 1d 30 34 20 95 96 1d 95 1d 30 68 45 ef 98 ac 08 47 4b 36 a0 88 ac script pubkey
a7 27 04 00 lock time
---> Add SIGHASH_ALL here

After replacing locking script with unlocking script:

01 00 00 00 Version
01 input count
c8 cc 2b 56 52 5e 73 4f f6 3a 13 bc 6a d0 6a 9e 56 64 df 8c 67 63 22 53 a8 e3 60 17 ae e3 ee 40 Previous transaction
00 00 00 00 Previous transaction out index
------- locking script [
17
a914e9c3dd0c07aac76179ebc76a6c78d4d67c6c160a87
------- ]
fe ff ff ff sequence
01 out count
20 f4 0e 00 00 00 00 00 value 
19 script size
76 a9 14 1d 30 34 20 95 96 1d 95 1d 30 68 45 ef 98 ac 08 47 4b 36 a0 88 ac 
a7 27 04 00 lock time
01 00 00 00 SIGHASH_ALL

Now performing OP_CHECKMULTISIG:
So we have transaction which is signed:

0100000001c8cc2b56525e734ff63a13bc6ad06a9e5664df8c67632253a8e36017aee3ee400000000017a914e9c3dd0c07aac76179ebc76a6c78d4d67c6c160a87feffffff0120f40e00000000001976a9141d30342095961d951d306845ef98ac08474b36a088aca727040001000000

Sig already obtained above:
ad0851c69dd756b45190b5a8e97cb4ac3c2b0fa2f2aae23aed6ca97ab33bf8830b248593abc1259512793e7dea61036c601775ebb23640a0120b0dba2c34b790

step 10: On stack we Sig which is already parsed and pubkey :

0x042f90074d7a5bf30c72cf3a8dfd1381bdbd30407010e878f3a11269d5f74a58788505cdca22ea6eab7cfb40dc0e07aba200424ab0d79122a653ad0c7ec9896bdf

0x04 denote uncompressed. Removing that we have:

0x2f90074d7a5bf30c72cf3a8dfd1381bdbd30407010e878f3a11269d5f74a58788505cdca22ea6eab7cfb40dc0e07aba200424ab0d79122a653ad0c7ec9896bdf

Python code to perform sigcheck is used for sig and pubkey pair:

def sigcheck(sig_b: bytes, pubkey_b: bytes, raw_txn_b: bytes):
        txn_sha256_b = hashlib.sha256(raw_txn_b).digest()

        prefix = pubkey_b[0:1]
        print('prefix = %s' % prefix)
        print('input pubkey = %s' % bytes.decode(binascii.hexlify(pubkey_b)))
        if prefix == b'x02' or prefix == b'x03':
                pubkey_b = getFullPubKeyFromCompressed(pubkey_b)[1:]
        elif prefix == b'x04':
                pubkey_b = pubkey_b[1:]

        try:
                print("full public key = %s" % bytes.decode(binascii.hexlify(pubkey_b)))
                vk = ecdsa.VerifyingKey.from_string(pubkey_b, curve=ecdsa.SECP256k1)
                if vk.verify(sig_b, txn_sha256_b, hashlib.sha256) == True:
                        print('valid')
                        return 1
                else:
                        print('sigcheck: invalid')
                        return 0
        except ecdsa.BadSignatureError:
                print('sigcheck: Bad Signature')
                return 0

This program works perfectly to checksig in P2PKH scenario but it is failing here and I have no clue.
Running this program I am getting BadSignatureError.

I have given in great detail what I am doing.
Please help me understand and solve this.



Source link

Top Ethereum Token Protocols Which May Replace ERC20

0


Disclaimer: The views expressed here are the author’s own and do not necessarily represent the views of Cointelegraph.com

Today, anyone can create a smart contract based on the Ethereum blockchain and release their own tokens. Until recently, the implementation of a particular coin was entirely entrusted to the developer of that coin, and it had rather an experimental nature often accompanied by a number of related problems – including the freezing of investors’ funds, hacking of contracts or unpredictable network operation.

In this ‘Wild West’ atmosphere, new Ethereum protocols are being created – which are designed to correct the errors of previous versions. Perhaps one of them will replace the ERC20 by the end of the year, making working with the blockchain even more reliable and simple for users.

ERC20: The king of dApps

User friendly logics and simplified structure turned Ethereum into a highly demanded framework, with almost 83 percent of projects choosing the Ethereum blockchain for the underlying structure.

Image source: ICOWatchList

More than a dozen major tokens are based on ERC20 standard, and around 400 new coins are issued every day. While these figures may sound unreal, the Coinmarketcap rating and the Ethereum Tokens Chart demonstrate that the total market capitalization of such tokens is around $52.6 bln. Furthermore, this process seems to be totally uncontrolled since no legislation exists to regulate the frequency or initiator of the issue.

Image source: Ethplorer

You may see references to “ERC20” when reading information about Ethereum (ETH). ERC20 is a standard which is the most common and widely used within the Ethereum platform. Wikipedia gives the standard the following definition:

ERC stands for Ethereum Request for Comment, and 20 is the number that was assigned to this request.

The ERC20 standard was introduced in 2015. While it initially saw active use only by programmers, the standard has gained widespread adoption in just two years. The standard describes the rules for the creation and operation of coins developed on its basis. Such specifications were an innovative solution in the crypto industry, since until then there were no unified programming standards – and it solved the main problem encountered by the creators of new tokens.

The issue was that all coins issued before the introduction of this standard were completely unique, which greatly complicated the work of exchanges, wallets and other applications used to interact with new tokens. Each time developers had to change or add a layer to their software, so that the new coin could work stably and was compatible with their system.

In 2017, the ERC20 standard started to be used everywhere thanks to the uniformity of the code and simplified integration with various apps and platforms. It triggered the explosive growth of initial coin offering (ICO) startups which now had the necessary tools for entering exchanges and overcoming liquidity problems.

Image source: Smith&Crown

Right after implementation of ERC20, the number of ICO startups in the cryptocurrency market increased substantially with almost 86,000 tokens issued as of May 2018. Not surprisingly, projects no longer needed to invent their own specifications and rules for the issue and operation of tokens, or to develop standards for their compatibility with the separate blockchain. All this has already been described in the ERC20 standard with introduction of six main functions:

  • Total amount of coins;
  • Number of coins on the balance of a specific address;
  • Functions for transferring tokens from the primary address to the address of the individual user or ICO participant;
  • Functions for transferring tokens between users;
  • Functions for checking the residual amount of tokens on a smart contract with the ability to withdraw funds;
  • Functions ensuring that the sender has enough tokens to complete the transaction at the time of sending.

Smart contracts: birth of a new economy

The main secret of the success of the ERC20 standard is the introduction of smart contracts. Though the basic principles of smart contracts have been already implemented in the Bitcoin blockchain, their capabilities were severely limited and were not suitable for creating tokens for individual dApps. That’s why Ethereum can be considered the first platform that fully developed the concept of smart contracts and implemented it.

Image source: Openxcell.com

The main idea of the smart contract is as follows – when a user sends tokens to the address of a recipient, the sender’s address balance reduces while the recipient’s one increases for the same amount. What is special about this? No one technically sends anything to anyone. In fact, the smart contract is informed about the change in the balance of the owner for a definite amount of tokens. As a result tokens disappear from the sender’s wallet, appearing in the recipient’s address. Thanks to this system, nodes in the network no longer need to constantly check with the database. All that they are required to do now is to verify the accuracy of all the contract terms, since the parties – the sender and the receiver – interact exclusively through smart contracts.

Calling for changes

Since the ERC20 standard was the first version of the Ethereum-based protocol, over time a number of problems and shortcomings have been revealed. For example, users accidentally sent tokens to the address of a smart contract, and reversing the transaction was impossible. This is due to the fact that the standard implementation of the ERC20 token involves two ways of transferring tokens:

  • The transfer function, which allows to send tokens from one address to another;
  • A combination of functions (approve + transferFrom) for sending tokens to a smart contract.

It should be noted that event processing is a well known and standard practice in programming. Therefore, the transfer of funds in the Ethereum network works as follows – the transfer is processed with the possibility of detecting errors. In this case, the transaction is considered to be completed only after a successful transfer of funds and in the absence of any errors. Otherwise, the smart contract cancels the transaction. If you send ETH to a smart contract that doesn’t work with it, this event processing will help to avoid losing funds, since this transaction will be rejected on the recipient’s side.

According to the ERC20 standard, token transmissions should be considered as an event, but the transfer function does not allow processing this transaction, because it simply increases the receiver’s balance without any pre-check. This can lead to a problem when the contract doesn’t recognize the transaction if the recipient is a smart contract and the tokens were sent using the “transfer” function. This causes an unexpected behavior of the transfer function and leads to an unpredictable result – i.e. tokens can be lost and permanently frozen.

How did the creators of Ethereum solve this problem? The answer was simple – developers who introduced the approve and transferFrom functions, giving the user the right to allow the smart contract to withdraw their funds when sending a transaction. Any errors have since been excluded.

It is noteworthy that the developers themselves do not consider this a mistake:

This is not a bug, but a user error. It’s not a bug or vulnerability, it’s a feature of the standard ERC20 design.

However, this problem still persists –  with over $4 mln lost by ICO participants during the last year. A significant example is the EOS tokensale smart contract which has received about $2.1 mln from the users who were unable to recover their funds.

Among other contracts which pocketed investors’ funds are ones belonging to Tronix – $400,000, Golem and ZRX – more than $200,000 each, and OmiseGo having more than $150,000 frozen to date. It seems that new users are not learning from others’ mistakes.

ERC223: Correction of ERC20 errors

Creator: Dexaran

Type: standard token

To solve the vulnerability of the first version of the Ethereum protocol, a user named Dexaran developed the ERC223 standard, which forced the ERC20 standard to behave in the same way as when transferring ETH to smart contracts. Now, in case of an error in the transfer function, when the smart contract does not support this cryptocurrency, the transaction is cancelled. For this, two new functions were introduced:

  • The transfer function replacing the old transfer and transferFrom;
  • The tokenFallBack function for the destination smart contract, which determines the type of coins sent.

Quite often new standards are proposed for tokens. As a rule, they are carefully examined by both crypto community and blockchain developers. Some of them, not very well-known, still have a potential to replace ERC20.

ERC721: CryptoKitties and other collections

Creator: Dieter Shirley

Type: collectible token

Tokens created with the help of the ERC20 standard are interchangeable. In other words, each token is the same as the other one. If one is considering it as a currency, this property is simply necessary, but from the point of view of “cryptocurrency collectibles” such a token does not fit at all.

Thanks to ERC721, each token becomes unique. Mike Raitsyn, a co-founder of SnowFox platform, which helped projects with issuing over 30 tokens, including ERC721, sees the potential in this kind of protocol:

“Combined with Layer 2 scaling solutions (sharding, Plazma and state channels) we get the ultimate vehicle for putting every significant asset on a public (or hybrid if you please) blockchain with 100 percent immutability and security”.

The developers of the “Ethereum’s killer” online game CryptoKitties were one of the first to use this standard. It is based on the use of unique attributes: age, color, breed. Some mixture of attributes can become incredibly rare, making a kitten very expensive. Not surprisingly, this idea was picked up by other entertainment projects such as CryptoPuppies, CryptoPets, and even CryptoPunks.

ERC827: New ERC20

Creator: Augusto Lemble

Type: standard token

ERC827 is one of the latest versions of the Ethereum protocols and was called by blockchain journalist Dariusz R Jakubowski “a new ERC20”. Unlike its predecessor, this standard can transfer not only the cost, but also the transaction data. Developers managed to add this useful function into a relatively small code fragment with a size of less than 100 lines. This functionality expands the horizons of the Ethereum network use on a nationwide scale and allows moving data around the world in a matter of seconds. In addition, this standard allows verifying a transaction by a third party, for example, a broker or agent, without an access to a private key. The safety and reliability of the blockchain are at the same time unchanged.

ERC948: Paradise for B2C businessmen

Creator: Kevin Owocki

Type: token for subscription

The “subscription” model has become extremely popular in the digital world with over 11 mln customers attracted only last year. A study of the McKinsey company showed that 15 percent of all buyers had subscribed to e-commerce in 2017.

The ERC948 protocol gives developers an opportunity for building a platform where companies can leverage an economic model that has proven valuable in the retail and software industry in the past decade. Furthermore, the model of subscription may gain a wider spread in 2018 by uniting blockchain projects with their customers.

ERC884: “White list” for investors

Creator: Dave Sag

Type: standard token

Based on the 2017 draft law, The Delaware General Corporation Law (DGCL) officially allowed the use of blockchains to register shareholders. ERC884 was created for assets released by any public or private company in Delaware, and contains several add-ons beyond the capabilities of ERC20. This includes the requirement to identify and whitelist the owners of tokens as an integral part of the very token.

Evolution of protocols

The growing competition among leading cryptocurrencies boosts the evolution in the development of new protocols. Every new Ethereum token standard offers a more advanced set of functions which excel the existing ones. The introduction of these new standards allows developers to solve the backlog of vulnerability, misuse or inefficiency, and gives birth to more mature blockchain dApps. The opportunity is ripe for 2018 to see new protocols, and only time will tell whether the industry will witness ERC20000 or other innovative tools that will emerge as a result of the arms race between Ethereum and EOS.





Source link

Crypto ban in Zimbabwe is lifted : Bitcoin

0


Bitcoin is the currency of the Internet: a distributed, worldwide, decentralized digital money. Unlike traditional currencies such as dollars, bitcoins are issued and managed without any central authority whatsoever: there is no government, company, or bank in charge of Bitcoin. As such, it is more resistant to wild inflation and corrupt banks. With Bitcoin, you can be your own bank.

If you are new to Bitcoin, check out We Use Coins and Bitcoin.org. You can also explore the Bitcoin Wiki:

Community guidelines

  • Do not use URL shortening services: always submit the real link.
  • Begging/asking for bitcoins is absolutely not allowed, no matter how badly you need the bitcoins. Only requests for donations to large, recognized charities are allowed, and only if there is good reason to believe that the person accepting bitcoins on behalf of the charity is trustworthy.
  • News articles that do not contain the word “Bitcoin” are usually off-topic. This subreddit is not about general financial news.
  • Submissions that are mostly about some other cryptocurrency belong elsewhere. For example, /r/CryptoCurrency is a good place to discuss all cryptocurrencies.
  • Promotion of client software which attempts to alter the Bitcoin protocol without overwhelming consensus is not permitted.
  • No referral links in submissions.
  • No compilations of free Bitcoin sites.
  • Trades should usually not be advertised here. For example, submissions like “Buying 100 BTC” or “Selling my computer for bitcoins” do not belong here. /r/Bitcoin is primarily for news and discussion.
  • Please avoid repetition — /r/bitcoin is a subreddit devoted to new information and discussion about Bitcoin and its ecosystem. New merchants are welcome to announce their services for Bitcoin, but after those have been announced they are no longer news and should not be re-posted. Aside from new merchant announcements, those interested in advertising to our audience should consider Reddit’s self-serve advertising system.
  • Do not post your Bitcoin address unless someone explicitly asks you to.
  • Be aware that Twitter, etc. is full of impersonation.

Related communities

Sorted roughly by decreasing popularity.

Non-Bitcoin communities

Join us on IRC

chat.freenode.net #bitcoin

Other Bitcoin sites

Bitcoin Forum
Bitcoin Google+ Community
Bitcoin Stack Exchange
Bitcoin Magazine

Download Bitcoin Core

Bitcoin Core is the backbone of the Bitcoin network. Almost all Bitcoin wallets rely on Bitcoin Core in one way or another. If you have a fairly powerful computer that is almost always online, you can help the network by running Bitcoin Core. You can also use Bitcoin Core as a very secure Bitcoin wallet.

Style sheet credits

The CSS used by this subreddit is the Erdune Theme modified by /u/Annihilia and /u/konkedas. Logo design by /u/Annihilia. Check out his other work here.

Ad campaign:

We previously collected donations to fund Bitcoin advertising efforts, but we no longer accept donations. The funds already donated will be spent on some sort of advertising, as intended. As of now, 10.35799117 BTC was spent out of 22.51357574. If you have ideas for the remaining BTC, see here for more info.



Source link

New Strain of Malware Hijacks Apple Macs to Mine Monero

0


Share This

Tags

A monero cryptominer based on XMRig is hijacking Macs, causing high CPU and fan usage.

Read more –> click here all content is copyright Coin Desk.

Need Bitcoin marketing and PR? Bitcoin PR Buzz has been proudly serving the PR and marketing needs of Bitcoin and digital currency tech start-ups for over 2 years. Get your own professional Bitcoin or cryptocurrency press release CLICK HERE.

Powered by ABITCO.IN





Source link