-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feat/ag 202 #253
Feat/ag 202 #253
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Joe this isn't a frat house. we need to keep the codebase CLEEEEAAN. Pls go through and delete unused / commented out code. If something is commented out because you are going to do work on it in the future. create a branch with the code off this branch, then delete it from this branch pls.
inner: Arc<Mutex<T>>, | ||
lock: Arc<AtomicBool>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u can just use a unsafe cell instead of doing this
// tracing::debug!("deploying contracts to anvil"); | ||
// let uni_env = UniswapEnv::with_anvil(state_provider.provider()).await?; | ||
// let angstrom_env = AngstromEnv::new(uni_env).await?; | ||
// let rewards_env = | ||
// MockRewardEnv::with_anvil(state_provider.provider()).await?; | ||
|
||
// let sqrt_price_x96 = | ||
// SqrtPriceX96::from(get_sqrt_ratio_at_tick(100020).unwrap()); | ||
// let tick_spacing = I24::unchecked_from(60); | ||
// let pool_fee = U24::ZERO; | ||
// let snapshot = PoolSnapshot::new( | ||
// vec![LiqRange::new(99900, 100140, | ||
// 5_000_000_000_000_000_000_000_u128).unwrap()], sqrt_price_x96 | ||
// )?; | ||
// let pool_key = rewards_env | ||
// .create_pool_and_tokens_from_snapshot(tick_spacing, pool_fee, snapshot) | ||
// .await?; | ||
|
||
// tracing::info!("deployed contracts to anvil"); | ||
|
||
// let angstrom_addr = angstrom_env.angstrom(); | ||
// let pools = vec![pool_key]; | ||
let pools = vec![]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brother ew
#[clap(long, requires = "fork_block")] | ||
pub fork_url: Option<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just set the default to whatever our reth is. Makes it 100 times easier on startup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't necessarily need a fork url for the devnet, but otherwise i agree
// //! CLI definition and entrypoint to executable | ||
// use std::{collections::HashSet, path::PathBuf, sync::Arc}; | ||
|
||
// use alloy::network::{EthereumWallet, Network}; | ||
// use angstrom_metrics::{initialize_prometheus_metrics, METRICS_ENABLED}; | ||
// use angstrom_network::manager::StromConsensusEvent; | ||
// use angstrom_types::{primitive::PoolId as AngstromPoolId, | ||
// reth_db_wrapper::RethDbWrapper}; | ||
// use order_pool::{order_storage::OrderStorage, PoolConfig, PoolManagerUpdate}; | ||
// use reth_node_builder::{FullNode, NodeHandle}; | ||
// use secp256k1::{PublicKey, Secp256k1, SecretKey}; | ||
// use tokio::sync::mpsc::{ | ||
// channel, unbounded_channel, Receiver, Sender, UnboundedReceiver, | ||
// UnboundedSender }; | ||
// use validation::order::state::token_pricing::TokenPriceGenerator; | ||
|
||
// mod network_builder; | ||
// use alloy::{ | ||
// eips::{BlockId, BlockNumberOrTag}, | ||
// providers::{network::Ethereum, Provider, ProviderBuilder}, | ||
// signers::{k256::ecdsa::SigningKey, local::LocalSigner}, | ||
// transports::Transport | ||
// }; | ||
// use alloy_chains::Chain; | ||
// use alloy_primitives::{private::serde::Deserialize, Address, BlockNumber}; | ||
// use angstrom_eth::{ | ||
// handle::{Eth, EthCommand}, | ||
// manager::EthDataCleanser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sloppy. Just delete the entire file
} | ||
|
||
impl AngstromTestnetNodeInternals { | ||
pub async fn new( | ||
testnet_node_id: u64, | ||
strom_handles: StromHandles, | ||
strom_network_handle: StromNetworkHandle, | ||
secret_key: SecretKey, | ||
_secret_key: SecretKey, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if its not used, delete it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's going to be, i commented out a part of the consensus that uses it
config: AngstromTestnetConfig, | ||
initial_validators: Vec<AngstromValidator> | ||
) -> eyre::Result<Self> { | ||
_initial_validators: Vec<AngstromValidator>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if its not used, delete it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's going to be, i commented out a part of the consensus that uses it
Co-authored-by: Will Smith <[email protected]>
Co-authored-by: Will Smith <[email protected]>
No description provided.