为什么网络会忽略我的烘焙块?
-
-
我也很感兴趣,因为我有相同的案例!I am interested as well, because I had the same case ones!
- 0
- 2019-02-07
- jdsika
-
3 个回答
- 投票数
-
- 2019-02-07
这是它的工作原理:为了简单起见,假设链(到目前为止包括的所有区块)的适应度为100.换句话说,该区块中的所有区块都包含100个总认可.链.现在,您的面包师拥有优先权0来烘烤下一个块(块#5),并且您的内存池中有30个对上一个块(块#4)的认可.
您继续在5高处烘烤一个块,该块的总适应度为130(以前的适应度加上您能够包括的所有新认可).
优先级1的面包师对其内存池中的上一个区块有32个认可,这可能是因为他们具有更好的同级连接,或者可能比您了解的认可多了2个认可.
优先级1的面包师看到您的区块到达,并注意到它具有130的适应度.在T + 15秒(您烘烤优先级0的块+ 15秒的时间)时,优先级1的面包师意识到,可以通过包含您没有的2个背书来构建一个具有132适应性的块,因此它们继续进行,并注入块.
网络的其余部分看到优先级1块的适应度为132,而您的优先级0块的适应度仅为130,因此网络更改了分支以使优先级1块成为链的新头.
因此,总而言之,这里有一些常见的误解:
- 面包师是否认可您的广告块决定了该广告块是否被接受.直到块被烘烤之后,背书才到位,只会增加添加块的链条的适用性,而不是块本身.
- 优先级1的面包师必须再等待30秒才能烘烤出成为链条新头的块.他们真的只需要等待15秒钟,就可以注入比您的健身更适合的健身垫.
Here is how it works: Just to keep things simple, let's say that the chain (all the blocks included up to now) has a fitness of 100. In other words, 100 total endorsements were included on all the blocks in the chain. Your baker now has priority 0 rights to bake the next block (block #5), and you have 30 endorsements in your mempool for the previous block (block #4).
You go ahead and bake a block at height 5 which has a total fitness of 130 (the total of previous fitness + all new endorsements you were able to include).
The priority 1 baker has 32 endorsements for the previous block in their mempool, maybe because they have better peer connectivity, or perhaps learned of 2 more endorsements than you did.
The priority 1 baker sees your block arrive and notices it has 130 fitness. At T+15 seconds (the time you baked your priority 0 block + 15 seconds), the priority 1 baker realizes that it can construct a block that has 132 fitness by including the 2 endorsements that you didn't, so they go ahead and inject the block.
The rest of the network sees that the priority 1 block has fitness of 132, and your priority 0 block only has fitness 130, so the network changes branch to make the priority 1 block the new head of the chain.
So, to summarize, there are a couple common misconceptions here:
- Whether bakers endorse your block determines whether it gets accepted or not. Endorsements never arrive until after your block is baked, and only increase the fitness of the chain you added your block to, not the block itself.
- A priority 1 baker has to wait an additional 30 seconds before they can bake a block that becomes the new head of the chain. They really only need to wait 15 seconds before they can inject a block that has a higher fitness than yours.
-
- 2019-02-07
该外壳当前忽略新头如果它不如假想的下一个头那么合适-则在记忆池中背书所有背书.假设的下一个适应度在此处的代码中称为
context_fitness
.这意味着,如果您烘焙的区块所包含的背书少于其在成员池中看到的背书,则他们将忽略您的区块并等待优先级为1的区块.
The shell currently ignores a new head if it is less fit than the hypothetical next head -- baked with all the endorsements in the mempool. This hypothetical next fitness is called
context_fitness
in the code there.This means that if your baked block includes fewer endorsements than endorsers see in their mempool, they will ignore your block and wait for the priority 1 block.
-
这个逻辑背后的原因是什么?我的烘焙精美的块会被忽略,因为下一个块可能会发生什么?可以采取什么措施来防止/克服这种情况?What is the reasoning behind this logic? My perfectly-fine-baked block is ignored because of what might happen for the next block? What can be done to prevent this/overcome this?
- 0
- 2019-02-09
- utdrmac
-
我不知道原因,对不起.它是在主网https://gitlab.com/tezos/tezos/commit/613e14a297e2f75ef8a6715c22cd86b7f296b5de中的此提交中引入的.我想知道这是否可以减轻恶意面包师可以尝试的一些潜在干扰,但是我不知道...I don't know the reasoning, sorry. It was introduced in this commit in mainnet https://gitlab.com/tezos/tezos/commit/613e14a297e2f75ef8a6715c22cd86b7f296b5de . I wonder if it mitigates some potential disturbances a malicious baker could try, but I don't know...
- 1
- 2019-02-10
- Tom
-
- 2019-02-07
最有可能与同龄人或至少在某个时间点关系重大的同龄人(您的块的背书人,以及下一个面包师的背书人)之间的联系较差.
背书者将以更高的适应度来背书该区块,但是他们不能双重背书.这意味着,如果他们看到并认可了您的障碍物,那么当p1障碍物出现时,他们就不会改变主意(即使其适应性更高).
在您的情况下,背书人从来没有足够快地收到您的块,从而可能背书p1块.该p1区块具有较高的适用性,因此认可者认可该区块.
为什么背书人会选择更高的优先级?因为它更有可能成为规范区块,并且背书者只有在背书成功的情况下才能获得报酬.
Most likely poor connection to peers, or at least the ones that mattered at the point in time (the endorsers for your block, and baker of the next).
Endorsers will endorse the block with the higher fitness, but they can't double endorse. That means if they saw your block and endorsed it, they can't change their mind when the p1 block came along (even if it had a higher fitness level).
In your case, the endorsers never received your block fast enough allowing the potential of endorsing the p1 block. That p1 block had a higher fitness, so the endorsers endorsed that block.
Why would endorsers go with a higher priority block? Because it has a higher chance of being the canonical block, and endorsers only get paid if the block the endorse succeeds.
-
这有点不准确.背书者不背书特定的区块,而是背书链.认可进入内存池,并包含在下一个区块中,并且每个认可基本上为给定链的适用性增加1. 因此,未选择您的阻止的原因不是因为它没有得到足够多的认可,因为这些认可至少在一分钟后发生,直到下一个阻止才被包括在内.未选择您的区块的原因是,优先级1的面包师能够构建一个包含更多来自其内存池的认可的区块.This is slightly inaccurate. Endorsers don't endorse a particular block, they endorse a chain. Endorsements go into the mempool and get included on the next block, and each endorsement basically adds 1 to the fitness of a given chain. So, the reason your block wasn't selected wasn't because it didn't get as many endorsements, because those happen at least a minute later and don't get included until the following block. The reason your block wasn't selected was because the priority 1 baker was able to construct a block that included more endorsements from their mempool.
- 0
- 2019-02-07
- Luke Youngblood
-
我不同意-我已经看到两个块处于同一级别,优先级0具有比优先级1高的适应性,但是优先级1块仍然成功.假设有问题的块级别是x.可以在级别x上认可优先级0块(然后包含在级别x + 1中)的认可者可以在看到它们后立即对其进行认可.一旦获得认可,他们就不能再为另一个具有相同级别x的块进行认可,如果它具有更高的优先级(在这种情况下,优先级为1块),因为这将是双重认可.I disagree - I've seen two blocks at one level, priority 0 having a higher fitness than priority 1, but the priority 1 block still succeeding. Lets say the block level in question is x. The endorsers who can endorse the priority 0 block at level x (which are then included in level x + 1) can endorse it as soon as they see it. Once endorsed, they can't then endorse another block at the same level x if it has a higher priority (in this case, the priority 1 block) as this would be a double endorsement.
- 0
- 2019-02-07
- Stephen Andrews
我的烘烤优先级为0.我成功烘烤了该块.我成功地将我的区块注入了网络(如下面的贝克日志所示).但是,由于某种原因,优先级为1的面包师实际上是在烘焙该块并获得了奖励.为什么?
我知道我的区块的适用性比优先级1的区块低,但仍然想知道它是如何发生的.据我了解,在我60多岁的时候,优先级1甚至无法"尝试"注入他的障碍.这不是协议的工作方式吗?优先级0/1/2/3/N是否都同时注入,并由背书人确定他们首先背书优先级0的区块?
看来这就是我的情况.日志清楚地表明我的优先级为0,但出于任何原因,背书者决定背书优先级1的区块,而不是我的.我想让协议开发者回答的问题是"为什么"?如果实际上我在指定时间内注入了优先级0块,为什么背书人选择了优先级1?