Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions eest_stateful_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,25 @@ def preparation_getpayload(
"amount": hex((1 << 64) - 1),
}]

sender_addresses_path = Path("sender_addresses.txt")
if sender_addresses_path.exists():
sender_lines = [
ln.strip()
for ln in sender_addresses_path.read_text(encoding="utf-8").splitlines()
if ln.strip()
]
Comment on lines +1201 to +1207
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this a good idea to pre-calculate all the withdraw account in sender_addresses.txt, we could use some addr calculation package here.

next_index = len(withdrawals) + 2
next_validator = len(withdrawals) + 1
for addr in sender_lines:
withdrawals.append({
"index": hex(next_index),
"validatorIndex": hex(next_validator),
"address": addr,
"amount": hex((1 << 64) - 1),
})
next_index += 1
next_validator += 1

payload_attributes = {
"timestamp": hex(new_ts),
"prevRandao": parent_hash,
Expand Down
Loading
Loading