Conflux-Chain / conflux-rust

The official Rust implementation of Conflux protocol. https://doc.confluxnetwork.org
https://doc.confluxnetwork.org
GNU General Public License v3.0
647 stars 197 forks source link

Add receipt log for EVM triggered transfer #1283

Open yangzhe1990 opened 4 years ago

yangzhe1990 commented 4 years ago

Block receipts captures important outcomes of the transaction. I think vm triggered transfer, such as balance withdrawal from contract, contract destruction refunds, gas sponsor refund, storage sponsor refund are are important. This can be done at the level of evm transact function.

yangzhe1990 commented 4 years ago

From @ChenxingLi: log is user defined, so it's rational with or without log for balance withdrawal.

I think for our defined behavior, such as contract destruction refund and in internal contract, it's still good to have log for triggered transactions.

User and conflux-scan may find it useful.

fanlong commented 4 years ago

@yangzhe1990 , after my experience with the block reward record. I am not sure whether we should put it into receipt/log. Or alternatively, we can just maintain some full node data to enable queries.

The only advantage of log is to perform Merkel proof for a light node. I do not see this is necessary for event triggered transfer histories.

yangzhe1990 commented 4 years ago

Let's say if confluxscan displays more information for a contract destruction, and so it need to make some queries, I think the blockreceipt/log is still the place for such information.

What's your take away of trying add block reward record? Is it inconvenient to put data into log?