Filecoin official: There is no such thing as "double spending" at all!

Filecoin official: There is no such thing as "double spending" at all!

This article was originally written by IPFS Force Zone

It was reported that on March 18, 2021, a "double spend" problem occurred due to a "serious bug" in Filecoin's remote procedure call (RPC) code. These claims are incorrect and misleading.
The Lotus team conducted a thorough investigation of the report and did not find any issues with the Filecoin network or RPC API code. There were no double spends on the blockchain itself, and there were no bugs in the API code. The exchange in question has already restored the erroneous transaction in its accounting system and is reviewing its deposit processing logic to correct the use of the API.
What happened
  • Issue Report. Earlier today, the Lotus team received a report that an exchange was incorrectly using the Lotus API to evaluate transfers/deposits in the Filecoin network. This incorrect API usage was reported by a user when their account was incorrectly credited twice for a deposit in the exchange's accounting system. This was later restored in the exchange's accounting - there is no double-spending issue on the Filecoin blockchain itself.

  • API abuse by the exchange. The exchange in question did not properly check the chain state to de-duplicate multiple messages with the same sender and receiver. The root cause was incorrect use of the Lotus API (not a bug in the API itself) - which did not work the way they were intended. This accounting error caused the exchange to display incorrect account deposit information. So far, we are only aware of one transaction affected by this API mix-up.

  • False reports make headlines: Inaccurate claims about "double spends" on the network spread across social media channels and made headlines. Many of the issues with these claims have been investigated and determined to be false. The team found no issues with the Filecoin network or RPC API code. Many groups and media outlets are correcting their reporting after learning the facts.

Action is being taken
  • Trading impact. The exchange discovered this incorrect use of the API and took immediate action to halt deposits, withdrawals, and transfers. They have since restored the incorrect transactions in question (so no funds were lost in this incident) and are correcting their use of the Lotus API to match recommended usage.

  • Other exchanges. Other exchanges have been alerted and are reviewing their code to ensure they are not affected. Many reviews have been completed - to our knowledge, no other exchanges have yet misused this API in this way.

  • The lotus team is actively working on all transactions to ensure this behavior is handled correctly, and improving the API documentation to ensure everyone else can correctly check the state of the Filecoin blockchain.

  • Community and media teams. Several organizations are working with the media to clarify details and facts about the alleged incident and help dispel misinformation.

  • Community Team. Community members are creating materials to help others report issues accurately and thoughtfully to avoid accidentally spreading misinformation.

Technical Details
  • Similar messages. The Lotus team understands that the problem is caused by two messages sharing the same sender/receiver details and the same nonce, but containing different gas parameters in the same tipset. Two similar messages is a common form of message substitution that changes the gas fee associated with a message. The Filecoin network security mechanism correctly handles this situation and does not result in two message executions: one of the two messages is executed and the other is ignored.

  • Incorrect API usage. However, depending on how the chain state is checked, this may show that the message is processed twice. Specifically, this transaction uses an incorrect way to process the chain state - calling ChainGetBlockMessages on each block in the tipset, and then calling StateGetReceipt on each message.

  • Incorrect API return expectations. The confusion is that when StateGetReceipt is called on two similar messages (one executed, the other skipped), it will provide the same result: both correspond to the message that was executed. This is obviously counter-intuitive, but is intended behavior. The primary use case for the StateGetReceipt method is in event handlers used by the Lotus Miner and the transaction making process. In the case of a replaced message, these modules do not care whether the returned receipt corresponds to the original message, or to the replaced message - they just want to know if the message was successfully executed on-chain. We document this here: https://github.com/filecoin-project/lotus/pull/5838 .

  • Use the correct APIs. Most exchanges correctly use ChainGetParentMessages and ChainGetParentReceipts for bookkeeping purposes to determine which messages were executed on-chain and succeeded. These are the APIs used by Lotus itself during state calculations, so the chain state is guaranteed to be correctly reflected in this way. Performing a StateReplay on each message will give you the full result of the call so that you can compare the MsgCid in the returned InvocResult with the CID of the query message. This is the recommended path for exchanges to correctly check chain state and keep their internal reporting systems in sync.

/End.

Statement: This article is an original article from IPFS Force District. The copyright belongs to IPFS Force District. It may not be reproduced without authorization. Violators will be held accountable according to law.
Tip: Investment is risky, so be cautious when entering the market. This article is not intended as investment and financial advice.

<<:  The price of graphics card air has doubled after it was released, and CCTV revealed that the profit margin of mining exceeds 90%

>>:  "Double Spending" or Farce: A Review of the Filecoin Double Spending Vulnerability Incident

Recommend

Eating snacks all day during the Spring Festival

The Spring Festival is a time that everyone looks...

BitFury CEO: Calm down, Bitcoin will keep moving forward

I grew up in Latvia and watched my parents’ life ...

What kind of people can't be close friends?

We all know that women are usually more reasonabl...

Is it good for a woman to have a mole on her left eyebrow?

Moles can be said to be a part of our body, becau...

What does it mean to have no marriage line? Do you have one?

We all know that there are many lines on the hand...

How to read women's eyebrows and facial features

In physiognomy, one can tell a person’s fate and ...

What kind of woman has a miserable face and bad fate?

We cannot control our fate. Many times, bad fate ...

Don't like eating junk food

Many times, junk food is emerging in our lives. A...

First Bitcoin Bank Announced

Bitcoin Media Release: NextBank is the first bank...

Coin Zone Trends: Bitcoin Price Trends Based on Big Data This Week (2016-10-28)

The direction of consolidation around 4700 needs ...

Which face will bring good luck after 30 years old?

In a person’s life, 30 years old is a critical ye...

Chin fortune telling: What does it mean when the chin is tilted upward?

If some women have an upturned chin, according to...

What are the effects of a deep wisdom line?

Although the wisdom line is not the most importan...