-
Notifications
You must be signed in to change notification settings - Fork 265
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
chore: More logs cleanup #10630
chore: More logs cleanup #10630
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -304,7 +304,7 @@ export const deployL1Contracts = async ( | |
if (res.error) { | ||
throw new Error(`Error setting block interval: ${res.error.message}`); | ||
} | ||
logger.info(`Set block interval to ${args.ethereumSlotDuration}`); | ||
logger.warn(`Set block interval to ${args.ethereumSlotDuration}`); | ||
} | ||
|
||
logger.verbose(`Deploying contracts from ${account.address.toString()}`); | ||
|
@@ -315,21 +315,21 @@ export const deployL1Contracts = async ( | |
const govDeployer = new L1Deployer(walletClient, publicClient, args.salt, logger); | ||
|
||
const registryAddress = await govDeployer.deploy(l1Artifacts.registry, [account.address.toString()]); | ||
logger.info(`Deployed Registry at ${registryAddress}`); | ||
logger.verbose(`Deployed Registry at ${registryAddress}`); | ||
|
||
const feeAssetAddress = await govDeployer.deploy(l1Artifacts.feeAsset, [ | ||
'FeeJuice', | ||
'FEE', | ||
account.address.toString(), | ||
]); | ||
logger.info(`Deployed Fee Juice at ${feeAssetAddress}`); | ||
logger.verbose(`Deployed Fee Juice at ${feeAssetAddress}`); | ||
|
||
const stakingAssetAddress = await govDeployer.deploy(l1Artifacts.stakingAsset, [ | ||
'Staking', | ||
'STK', | ||
account.address.toString(), | ||
]); | ||
logger.info(`Deployed Staking Asset at ${stakingAssetAddress}`); | ||
logger.verbose(`Deployed Staking Asset at ${stakingAssetAddress}`); | ||
|
||
// @todo #8084 | ||
// @note These numbers are just chosen to make testing simple. | ||
|
@@ -340,29 +340,29 @@ export const deployL1Contracts = async ( | |
quorumSize, | ||
roundSize, | ||
]); | ||
logger.info(`Deployed GovernanceProposer at ${governanceProposerAddress}`); | ||
logger.verbose(`Deployed GovernanceProposer at ${governanceProposerAddress}`); | ||
|
||
// @note @LHerskind the assets are expected to be the same at some point, but for better | ||
// configurability they are different for now. | ||
const governanceAddress = await govDeployer.deploy(l1Artifacts.governance, [ | ||
feeAssetAddress.toString(), | ||
governanceProposerAddress.toString(), | ||
]); | ||
logger.info(`Deployed Governance at ${governanceAddress}`); | ||
logger.verbose(`Deployed Governance at ${governanceAddress}`); | ||
|
||
const coinIssuerAddress = await govDeployer.deploy(l1Artifacts.coinIssuer, [ | ||
feeAssetAddress.toString(), | ||
1n * 10n ** 18n, // @todo #8084 | ||
governanceAddress.toString(), | ||
]); | ||
logger.info(`Deployed CoinIssuer at ${coinIssuerAddress}`); | ||
logger.verbose(`Deployed CoinIssuer at ${coinIssuerAddress}`); | ||
|
||
const rewardDistributorAddress = await govDeployer.deploy(l1Artifacts.rewardDistributor, [ | ||
feeAssetAddress.toString(), | ||
registryAddress.toString(), | ||
governanceAddress.toString(), | ||
]); | ||
logger.info(`Deployed RewardDistributor at ${rewardDistributorAddress}`); | ||
logger.verbose(`Deployed RewardDistributor at ${rewardDistributorAddress}`); | ||
|
||
logger.verbose(`Waiting for governance contracts to be deployed`); | ||
await govDeployer.waitForDeployments(); | ||
|
@@ -375,7 +375,7 @@ export const deployL1Contracts = async ( | |
feeAssetAddress.toString(), | ||
args.l2FeeJuiceAddress.toString(), | ||
]); | ||
logger.info(`Deployed Fee Juice Portal at ${feeJuicePortalAddress}`); | ||
logger.verbose(`Deployed Fee Juice Portal at ${feeJuicePortalAddress}`); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just checking whether this is on L1? If so, I believe current consensus is to name that "Fee Asset". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fun fact: "fee juice" (or feeJuice, or fee-juice, etc) appears exactly 500 times on our codebase. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, that was just across typescript. It's actually 796 times. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will be a fun PR to try and separate fee juice from fee asset in the code. Also I meant to comment on line 325 🤦🏼♂️ |
||
|
||
const rollupConfigArgs = { | ||
aztecSlotDuration: args.aztecSlotDuration, | ||
|
@@ -394,10 +394,10 @@ export const deployL1Contracts = async ( | |
rollupConfigArgs, | ||
]; | ||
const rollupAddress = await deployer.deploy(l1Artifacts.rollup, rollupArgs); | ||
logger.info(`Deployed Rollup at ${rollupAddress}`, rollupConfigArgs); | ||
logger.verbose(`Deployed Rollup at ${rollupAddress}`, rollupConfigArgs); | ||
|
||
await deployer.waitForDeployments(); | ||
logger.info(`All core contracts deployed`); | ||
logger.verbose(`All core contracts have been deployed`); | ||
|
||
const feeJuicePortal = getContract({ | ||
address: feeJuicePortalAddress.toString(), | ||
|
@@ -428,7 +428,7 @@ export const deployL1Contracts = async ( | |
|
||
{ | ||
const txHash = await feeAsset.write.setFreeForAll([true], {} as any); | ||
logger.info(`Fee asset set to free for all in ${txHash}`); | ||
logger.verbose(`Fee asset set to free for all in ${txHash}`); | ||
txHashes.push(txHash); | ||
} | ||
|
||
|
@@ -464,7 +464,7 @@ export const deployL1Contracts = async ( | |
// @note This is used to ensure we fully wait for the transaction when running against a real chain | ||
// otherwise we execute subsequent transactions too soon | ||
await publicClient.waitForTransactionReceipt({ hash: mintTxHash }); | ||
logger.info(`Funding fee juice portal contract with fee juice in ${mintTxHash}`); | ||
logger.verbose(`Funding fee juice portal contract with fee juice in ${mintTxHash}`); | ||
|
||
if (!(await feeJuicePortal.read.initialized([]))) { | ||
const initPortalTxHash = await feeJuicePortal.write.initialize([]); | ||
|
@@ -474,7 +474,7 @@ export const deployL1Contracts = async ( | |
logger.verbose(`Fee juice portal is already initialized`); | ||
} | ||
|
||
logger.info( | ||
logger.verbose( | ||
`Initialized Fee Juice Portal at ${feeJuicePortalAddress} to bridge between L1 ${feeAssetAddress} to L2 ${args.l2FeeJuiceAddress}`, | ||
); | ||
|
||
|
@@ -504,15 +504,15 @@ export const deployL1Contracts = async ( | |
// Set initial blocks as proven if requested | ||
if (args.assumeProvenThrough && args.assumeProvenThrough > 0) { | ||
await rollup.write.setAssumeProvenThroughBlockNumber([BigInt(args.assumeProvenThrough)], { account }); | ||
logger.warn(`Set Rollup assumedProvenUntil to ${args.assumeProvenThrough}`); | ||
logger.warn(`Rollup set to assumedProvenUntil to ${args.assumeProvenThrough}`); | ||
} | ||
|
||
// Inbox and Outbox are immutable and are deployed from Rollup's constructor so we just fetch them from the contract. | ||
const inboxAddress = EthAddress.fromString((await rollup.read.INBOX([])) as any); | ||
logger.info(`Inbox available at ${inboxAddress}`); | ||
logger.verbose(`Inbox available at ${inboxAddress}`); | ||
|
||
const outboxAddress = EthAddress.fromString((await rollup.read.OUTBOX([])) as any); | ||
logger.info(`Outbox available at ${outboxAddress}`); | ||
logger.verbose(`Outbox available at ${outboxAddress}`); | ||
|
||
// We need to call a function on the registry to set the various contract addresses. | ||
const registryContract = getContract({ | ||
|
@@ -562,6 +562,8 @@ export const deployL1Contracts = async ( | |
governanceAddress, | ||
}; | ||
|
||
logger.info(`Aztec L1 contracts initialized`, l1Contracts); | ||
|
||
return { | ||
walletClient, | ||
publicClient, | ||
|
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.
Could this swallow a fundamental error?
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.
Thing is tx hash computation is going to change soon, so I didn't want to mess up with the
getTxHash
method