Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing StakeUpdated event for changed height #276

Open
ldeffenb opened this issue Nov 12, 2024 · 0 comments
Open

Missing StakeUpdated event for changed height #276

ldeffenb opened this issue Nov 12, 2024 · 0 comments

Comments

@ldeffenb
Copy link

ldeffenb commented Nov 12, 2024

According to my observations on the stakeUpdated transactions on the sepolia testnet staking contract (v0.9.2-rc7), it seems that StakeUpdated events are only emitted for invocations that change the stake amount. However, if the height is changed, the effective stake of the node is also affected. The suppression of this event makes actual event-log-based stake tracking impossible.

if (_addAmount > 0) {
if (!ERC20(bzzToken).transferFrom(msg.sender, address(this), _addAmount)) revert TransferFailed();
emit StakeUpdated(
msg.sender,
updatedCommittedStake,
updatedPotentialStake,
_newOverlay,
block.number,
_height
);
}

NoLogs: https://sepolia.etherscan.io/tx/0xfbad8fc68e0651191086a9583768472b10b8eba4ee718f02e4099af9e594e435
vs
WithLogs: https://sepolia.etherscan.io/tx/0x43be676c04c0fcf18496b3452c1fdff8877c22d797c20d04fc186193fa9e5132

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant