Comments (5)
@ensi321 Thank you for describing the technical context of this.
So, I try to crop the codes and functionalize them, and apply the 2 points you suggested.
from lodestar.
I pick the issue as a good first issue.
from lodestar.
I'm locating where should I change.
Should we move this into a function somewhere and be re-used in gossip + here + state transition? In a way to signal that this logic must be consistent between those three places
Is this right place?
https://github.com/ChainSafe/lodestar/blob/unstable/packages/beacon-node/src/chain/validation/attestation.ts#L478
from lodestar.
Shamely, I could not find where should I change the state-transition code.
Do you mind if you give me some hints?
from lodestar.
@HiroyukiNaito Hey! Thanks for picking this up.
Just want to share some background about this issue. Feel free to skip to tldr.
The related change is for implementing Deneb EIP EIP-7045, which is to extend the admissible range of attestation from [n - 32, n] slots to [(Math.floor(n / 32) - 1) * 32, n] slots. You can check out our implementation #5731 and also the consensus spec here.
The attestation validation logic in p2p we want to refactoring in Lodestar is to limit to lower bound of the slot in attestation by calculating earliestPermissableSlot
. However, during state-transition, specifically during process_attestation
, there is already an assertion in the spec and lodestar to limit the attestation to be within current or previous epoch, which has the same effect as setting lower (and upper) bound of the attestation slot. Therefore, the attestation validation logic in p2p is not needed in state-transition.
Shamely, I could not find where should I change the state-transition code.
Do you mind if you give me some hints?
tldr; The original comment is not quite accurate about state-transition. No refactoring needs to be made for state-transition. Only beacon_aggregate_and_proof
and beacon_attestation_{subnet_id}
Is this right place?
https://github.com/ChainSafe/lodestar/blob/unstable/packages/beacon-node/src/chain/validation/attestation.ts#L478
Yes. Should be a straightforward change. Let me know if you have further questions
from lodestar.
Related Issues (20)
- Delayed block production on builder flow
- Add grafana panel for reorg related metrics
- Lodestar stopped keeping up with head on mainnet HOT 25
- Convenience script to further simplify binary installation
- Historical block / state pruning HOT 2
- Docs: Use a link checker to prevent publishing broken links HOT 2
- Redirects to new docs pages do not work HOT 2
- Add v2 attestation APIs to support EIP-7549 HOT 1
- Revisit chain.archiveStateEpochFrequency hidden status HOT 3
- Specific timeouts per validator duties http request
- Unnecessary log during EL Sync HOT 2
- Event loop lag by slot second HOT 1
- Update sepolia bootnodes HOT 2
- Error fetching UnavailableBlockInput: Cannot read properties of undefined (reading 'data')
- Finalized header not updated during sync committee change HOT 1
- Archive state optimization HOT 2
- ethpanda images vs lodestar images HOT 2
- Improve key decryption times for validator client keystores HOT 1
- Set proper user-agent in validator client http requests
- Validator process checks beacon sync state too infrequently HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lodestar.