仅在与当前的NONCE交易后,不仅是开采的,与下一个NONCE的交易仅在交易后才被开采吗?

发布于 2025-01-31 08:32:24 字数 369 浏览 1 评论 0原文

当我们从单个帐户将交易发送到以太坊区块链(公共或私人)时,我们提交了前两项使用Nonces 0和1的交易:

与Nonce 1的交易仅在与Nonce 0交易后才执行”。确认“(这意味着将不会孤立),或者在与Nonce 0进行交易之后仅开采(然后其块可能变成孤儿)? - 在后一种情况下,有可能与Nonces 0和1的交易最终以区块链的相反顺序结束,或者仅执行Nonce 1的交易,而使用Nonce 0的交易不会,这会破坏可能破坏两项交易的最初业务意图都是预期的。

通常,在公共以太坊进行了六个障碍确认后,将视为“确认”交易。因此,这个问题归结为:以太坊是否等待与先前的Nonce进行交易以开始处理下一个Nonce的交易? (例如,如果这两项交易进入单独的块)。如果这样做,以太坊将使用什么确认阈值?

When we send transactions with incremental nonce from a single account to Ethereum blockchain (public or private), for example we submitted very first two transactions with nonces 0 and 1:

Would the transaction with nonce 1 be executed only after transaction with nonce 0 was "confirmed" (meaning its block won't be orphaned), or after transaction with nonce 0 was merely mined (and then its block could become orphaned)? - In the latter case, there is a possibility that transactions with nonces 0 and 1 will end up in the reverse order on the blockchain, or only transaction with nonce 1 will be executed, while transaction with nonce 0 won't, which can undermine the original business intent of both transactions being in the intended sequence.

Generally, a transaction is considered "confirmed" after six block confirmations in public Ethereum. So the question boils down to: Does Ethereum wait for such confirmation for a transaction with a previous nonce in order to start processing transaction with the next nonce? (for example if these two transactions get into separate blocks). If it does, what confirmation threshold does Ethereum use for this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

虫児飞 2025-02-07 08:32:24

是的。直到处理较低的NONCE的交易,无论是在网络之前广播的,交易将被忽略。

下面的引号来自“ “由Gavin Wood博士。第101页:

没有nonce,那将是
随机接受哪个被接受和拒绝。但是,与
包括NONCE,您发送的第一个交易将具有3,例如3,
虽然8-醚事务具有下一个NONCE值(即4)。所以,那个变形
直到与0到3的nonces交易已被忽略
即使首先收到。 ph!

Yes. Transactions will be ignored until the transaction with lower nonce is processed, no matter which one is broadcasted earlier to the network.

Below quotes is from the book "Mastering Ethereum" by Dr.Gavin Wood. Page 101 :

Without the nonce, it would be
random as to which one gets accepted and which rejected. However, with the
nonce included, the first transaction you sent will have a nonce of, let’s say, 3,
while the 8-ether transaction has the next nonce value (i.e., 4). So, that transac‐
tion will be ignored until the transactions with nonces from 0 to 3 have been pro‐
cessed, even if it is received first. Phew!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文