etclabscore / tabs-paper

0 stars 1 forks source link

Q&A #1

Open meowsbits opened 2 years ago

meowsbits commented 2 years ago

Questions by @ziogaschr

meowsbits commented 2 years ago

cc @ziogaschr

Ancestor Hash Appended transactions. AHA/TABS is both. TABS softly requires some kind of scheme to achieve segment-specificity (aka chain exclusivity) for transactions, which AHA does.

Light clients won't be able to validate the field, but light client already can't validate state stuff, like stateRoot. Otherwise, for normal clients, this should not be a problem, though it will require a few more milliseconds. Geth removes transactions indexes by default now for past blocks, but for TABS we'll only need to read balances at the parent height of the block we're validating. If the client can validate the state root, they should be able to read the balances for the a subset of the touched accounts for the block.

Well, let's say the new account has a low balance, but non zero. They'll need some balance to pay for gas probably. In order to avoid a Balance Poisoning attack, miners will need to prefer transactions by balance to some extent, but probably not exclusively. Transactions with greater balance will improve their chance of producing a canon block, but the demand for transactions by balance will have a ceiling of immediately diminishing returns; once they beat the parent block's TABS score, there's no incentive to push the TAB score higher, and they can sort by gas fees again.

Pools, like solo miners, still need to use a single account as the coinbase for mined blocks.

First, note that we'll consider the aggregate balances of transactions constant; they can be uesd in any block regardless of the miners. Less the transactional balances, the miner balance will be the decisive score between blocks. And indeed, richer miners will win more blocks than poorer miners. We (will) show that extra win margin for richer miners is actually pretty low. TABS's role in the consensus scoring is basically to break difficulty ties that happen for near-simultaneous blocks.

We're not proposing to replace Chain ID, for that very reason. But we'll still need to do some dealable work to add the AHA field to the tooling you mention. The good news is we don't have to invent any patterns, only add a field. The chain/transaction tooling patterns already query blockchain state to get info like tx nonce, so we'll just need to piggy back on that.

Before. For simplicity's sake, it uses the balance of the address at the parent block.

ziogaschr commented 2 years ago
  • what happens when a new account (without balance) sends a TX in a full network? will miners prefer others?

Well, let's say the new account has a low balance, but non zero. They'll need some balance to pay for gas probably. In order to avoid a Balance Poisoning attack, miners will need to prefer transactions by balance to some extent, but probably not exclusively. Transactions with greater balance will improve their chance of producing a canon block, but the demand for transactions by balance will have a ceiling of immediately diminishing returns; once they beat the parent block's TABS score, there's no incentive to push the TAB score higher, and they can sort by gas fees again.

Good to add this in the spec.

  • will a pool that is able to attract the richest miners be able to manipulate the network?

First, note that we'll consider the aggregate balances of transactions constant; they can be uesd in any block regardless of the miners. Less the transactional balances, the miner balance will be the decisive score between blocks. And indeed, richer miners will win more blocks than poorer miners. We (will) show that extra win margin for richer miners is actually pretty low. TABS's role in the consensus scoring is basically to break difficulty ties that happen for near-simultaneous blocks.

Last sentence is also good to be added in the spec.

p.s.: sorry if above are already in the spec and I missed them, haven't re-read it after reading your comment above.

Thanks @meowsbits <3

meowsbits commented 2 years ago

First, note that we'll consider the aggregate balances of transactions constant; they can be uesd in any block regardless of the miners.

I have been using this logic for a lot of models (mental and code): removing or leaving out the aggregate balances of transactions, assuming they could be held constant. BUT.

A miner is just "an entity." They may or may not have greater on-chain capital than anybody else. They aren't all perfect hodlers; they have costs too. Let's say a miner balance represents 1/300 of the TABS score (because blocks fit up to, like, 400 transactions). 299/300 of the TABS score is going to depend on the transaction pool, which is out of any miner's control, and is highly variable.

In order for a rich miner to have a canonical edge under TABS, their balance needs to be decisive in pushing the TAB score of the current block above the parent's TABS score.

TABS's role in the consensus scoring is basically to break difficulty ties that happen for near-simultaneous blocks.

This is still true. If we assume that the rate of the network producing near-simultaneous blocks with equivalent difficulties under Ethash is around (generously) 10%, then maybe we can tentatively mentally model the chance that a rich miner gets an edge as 10%/300.

The natural variability in the aggregate balances of all the transactions in the pool dilutes whatever edge a rich miner has significantly.

EDIT: I just pushed code for this: https://github.com/etclabscore/tabs-paper/commit/e2cae811507d4e7d2df6d39af3a7bf43687669b2