feat(ui): Add --max-fee and --max-fee-per-gas parameters#61
Conversation
|
This protects against wiping out a wallet when sending a lot of requests, resulting in escalating fees Entirely vibe-coded with opencode's Big Pickle. The resulting code may indeed not be pretty, and no worries if this PR is rejected for it. Tested on Hoodi while another entity also mass-consolidated. Example run: |
|
Replacement now also logs fees |
|
Hi @yorickdowne , I might need to close this PR as you do not follow our contribution guidelines. Since we use semantic-release for version determination this is mandatory. Furthermore your code might fail our formatting tests. Did not test yet. So I might use your code as base and adapt where necessary. This way the expected code quality is met. This might be faster as correcting your code, commit messages etc. |
That it shouldn't. I've used your CLAUDE.md and the test suite was run I hear you on CONTRIBUTING.md, I did indeed not follow that. I can take a look at whether I can fix this PR to be more in line. If you need to close it, no worries. It does what I need it to do over here. |
--max-fee and --max-fee-per-gas parameters
|
See whether those edits make it work better re your contribution guidelines if the concern is code quality then yeah, it's likely faster to redo it the way you want it, than to try and fix this thing |
--max-fee and --max-fee-per-gas parameters--max-fee and --max-fee-per-gas parameters
|
One note, I am deliberately not hard-coding 12s slot length here. When you redo, that's worth paying attention to. You have at least one other place in the codebase where 12s is hard-coded. As soon as Hegota, we may see 8s slots. See https://stakemap.org/ and "quick slots". 6s possibly after, and endgame might be 4s. The fewer assumptions the code makes about slot length, the easier down the road. |
|
Thanks again for the PR and for testing this on Hoodi. The feature is useful, but after going through the code I think it is cleaner if I implement it in our own structure instead of trying to reshape this PR. My main concern is the layering. I want fee estimation, request-fee caps, and execution policy to stay separate. Here the fee options are passed through quite a few layers, and I also want to avoid a couple of edge cases: request-fee waits without a bound, I will reuse the ideas that fit well: block-aware waiting, better fee logging, and your point about not hard-coding slot length. Let me keep the PR open for now until everything is in place from my side. Edit: I will also not implement |
|
Love it, thank you! A cleaner structure is amazing. I created this so I could consolidate, and it did that. Maintainable code that allows others to do the same is the right move. |
That was a choice, and it worked great for what I needed. stakely has a Ledger withdrawal address and would post 400 consolidations at a time. Fee would decay, they'd post another 400. By not having a bound, the tool waited until the fee had decayed to 1 wei and stakely had gone home for the night. No human to press Ledger buttons + fee decay, we got to submit a few. Then fees would be high again in the morning. After 7 days, all our consolidations were in. If you want this to abort after a while, the calling script would need to handle that. Maybe create another parameter so people can run indefinitely or with a specific max retry. The fee will always come back down to 1 wei. There is no such thing as "forever consolidations". This is unlike gas fee, which could stay above a limit forever. That's why "wait until the max fee constraint can be met, however long that is" seemed like good UX to me here. |
I will make Some users might want more control and only give it a chance for x blocks to conclude, hence the wait blocks feature. But I understand that for your case this was not what you wanted. |
--max-fee/-xand--max-fee-per-gas/-gas global options.--max-feedefaults to1weiand--max-fee-per-gasdefaults to15gwei. Values can be given aswei,gweioreth.--max-fee-per-gasshould not impact itImplements #60
Closes #33
Closes #9