Closed harisang closed 1 week ago
I only glanced over the changes and they look reasonable.
Is the changed code part of any test? Or is there a simple way to manually test this change?
I only glanced over the changes and they look reasonable.
Is the changed code part of any test? Or is there a simple way to manually test this change?
Not yet. I pushed a change in order to make existing tests pass. I will add some test so that we can confirm the flag works as expected.
I only glanced over the changes and they look reasonable.
Is the changed code part of any test? Or is there a simple way to manually test this change?
Following up on this, I am not sure how easy it would be to add clean tests for this, so don't know how soon i will address this. This is also meant for local testing so I would say this is not urgent so let's leave this PR open until i address the testing part
Not merging this might complicate other things like deploying on arbitrum. If you are confident that without the flag, results are not changed, we should proceed with merging.
Not merging this might complicate other things like deploying on arbitrum. If you are confident that without the flag, results are not changed, we should proceed with merging.
There are some issues when i did some local testing today and will try to figure out what is going on. I saw this alert
AssertionError: Slippage validation Failed with columns: {'slippage_usd', 'tx_hash', 'block_time', 'solver', 'slippage_wei'}
This error is probably due to the fact that the dummy slippage data frame does not have the required columns. Thus the check in validate_df_columns
fails.
The dataframe slippage_df
needs to have at least the columns SLIPPAGE_COLUMNS
, i.e. {"solver", "solver_name", "eth_slippage_wei"}
. The current code seems to miss solver_name
and eth_slippage_wei
in the case you checked.
This PR adds a flag to completely skip slippage calculations, if they are not needed.