Skip to content
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: add tests for gov proposer #11633

Merged
merged 7 commits into from
Feb 3, 2025
Merged

chore: add tests for gov proposer #11633

merged 7 commits into from
Feb 3, 2025

Conversation

just-mitch
Copy link
Collaborator

@just-mitch just-mitch commented Jan 30, 2025

Key changes:

  • Add an e2e and spartan test for proposing a new payload to the governance proposer, and executing it (i.e. passing it up to governance); follow-on work is needed to test execution by governance.
  • Use forge to generate an artifact for the rollup contract's storage, which we copy into the l1-artifacts project; use this artifact to when overriding the slot for blob checks.
  • The typescript helper for the forwarder contract now explicitly takes a ref to the rollup in use to aid in error extraction.
  • Improvement made in extracting nested error codes from forward functions

Fix #11681

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@just-mitch just-mitch force-pushed the 01-30-gov-upgrade-test branch from abb2f9d to 0b76c15 Compare January 30, 2025 20:05
@just-mitch just-mitch marked this pull request as ready for review January 30, 2025 20:06
@just-mitch just-mitch marked this pull request as draft January 30, 2025 20:58
@just-mitch just-mitch force-pushed the 01-30-gov-upgrade-test branch 4 times, most recently from 2a2efa5 to 19600db Compare January 31, 2025 18:46
@@ -434,7 +434,7 @@ contract Rollup is EIP712("Aztec Rollup", "1"), Ownable, ValidatorSelection, IRo
}

/**
* @notice Validate blob transactions against given inputs.
* @notice Validate blob transactions against given inputs
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Trigger a rebuild of the cache. I didn't think it necessarily prudent to include the bootstrap script in the rebuild patterns generally.

@@ -23,3 +23,17 @@ validator:
bootNode:
validator:
disabled: true

ethereum:
Copy link
Collaborator Author

@just-mitch just-mitch Feb 1, 2025

Choose a reason for hiding this comment

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

We really ought not be hardcoding the default values in values.yaml: I can't run on my local machine with them as they stand.

@just-mitch just-mitch force-pushed the 01-30-gov-upgrade-test branch from 97a1671 to 2d2b8a6 Compare February 1, 2025 22:00
@just-mitch just-mitch marked this pull request as ready for review February 1, 2025 22:00
@just-mitch just-mitch force-pushed the 01-30-gov-upgrade-test branch from 2d2b8a6 to 7298fdc Compare February 2, 2025 12:49
@just-mitch just-mitch changed the title chore: add tests for gov upgrade chore: add tests for gov proposer Feb 2, 2025
@@ -0,0 +1,175 @@
import { EthAddress, type NodeInfo, type PXE, createCompatibleClient, sleep } from '@aztec/aztec.js';
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to run this masterly

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Doing stuff like that is kind of blocked by #11153 I think

});
ETHEREUM_HOST = `http://127.0.0.1:${config.HOST_ETHEREUM_PORT}`;

await startPortForward({
Copy link
Member

Choose a reason for hiding this comment

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

is this needed if not doing a metrics check type test

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh indeed no it is not.


# Extract the free ports from the list
pxe_port=$(echo $free_ports | awk '{print $1}')
anvil_port=$(echo $free_ports | awk '{print $2}')
metrics_port=$(echo $free_ports | awk '{print $3}')
node_port=$(echo $free_ports | awk '{print $4}')
Copy link
Member

Choose a reason for hiding this comment

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

name to forwarded*, easier to decipher what it is

functionName: string;
abi: Abi;
address: Hex;
},
blobInputs?: L1BlobInputs & { maxFeePerBlobGas: bigint },
blobInputs: (L1BlobInputs & { maxFeePerBlobGas: bigint }) | undefined,
stateOverride: {
Copy link
Member

Choose a reason for hiding this comment

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

stateOverrides: StateOverride = [],

abi: RollupAbi,
address: this.rollupContract.address,
});
const errorMsg = await this.l1TxUtils.tryGetErrorFromRevertedTx(
Copy link
Member

Choose a reason for hiding this comment

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

    /*blobInputs*/ undefined,
    /*stateOverrides*/ [],

});
this.logger?.info('Simulated blob tx', { blobInputs });
Copy link
Member

Choose a reason for hiding this comment

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

logs

@@ -45,6 +45,14 @@ export type EpochProofQuoteViemArgs = {
export class RollupContract {
private readonly rollup: GetContractReturnType<typeof RollupAbi, PublicClient<HttpTransport, Chain>>;

static get checkBlobSlot(): bigint {
Copy link
Member

Choose a reason for hiding this comment

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

checkBlobStorageSlot

At first glance i conflated this with time slots


const mockRollupAddress = EthAddress.random().toString();
const mockGovernanceProposerAddress = EthAddress.random().toString();
// const mockSlashingProposerAddress = EthAddress.random().toString();
Copy link
Member

Choose a reason for hiding this comment

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

leftover

Copy link
Member

@Maddiaa0 Maddiaa0 left a comment

Choose a reason for hiding this comment

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

charming chap

@just-mitch just-mitch force-pushed the 01-30-gov-upgrade-test branch from 9c5fd75 to 34e0ea5 Compare February 3, 2025 12:10
@just-mitch just-mitch merged commit 5c6a48a into master Feb 3, 2025
53 checks passed
@just-mitch just-mitch deleted the 01-30-gov-upgrade-test branch February 3, 2025 14:14
sklppy88 pushed a commit that referenced this pull request Feb 4, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.74.0</summary>

##
[0.74.0](aztec-package-v0.73.0...aztec-package-v0.74.0)
(2025-02-04)


### Miscellaneous

* Ensure new kv-store is used on the server
([#11662](#11662))
([aee1420](aee1420))
</details>

<details><summary>barretenberg.js: 0.74.0</summary>

##
[0.74.0](barretenberg.js-v0.73.0...barretenberg.js-v0.74.0)
(2025-02-04)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>aztec-packages: 0.74.0</summary>

##
[0.74.0](aztec-packages-v0.73.0...aztec-packages-v0.74.0)
(2025-02-04)


### ⚠ BREAKING CHANGES

* time library
([#11542](#11542))

### Features

* `u128.ts` accepting string on input
([#11664](#11664))
([bb25992](bb25992))
* Add network, better drawer performance
([#11694](#11694))
([1f61822](1f61822))
* Skip calculation of partial sums when simulating blobs
([#11257](#11257))
([aca66f7](aca66f7))
* Time library
([#11542](#11542))
([3b463f9](3b463f9)),
closes
[#11520](#11520)
* UltraHonkZK contract
([#11553](#11553))
([a68369f](a68369f))


### Bug Fixes

* Add bootstrap.sh to rebuild_patterns
([#11683](#11683))
([e84a81a](e84a81a))
* **archiver:** Do not attempt to decode blob before filtering
([#11668](#11668))
([961cbdd](961cbdd))
* Barretenber/stdlib/logic bugs
([#11651](#11651))
([dddab22](dddab22))
* Barretenberg/stdlib/logic bugs (redo)
([#11691](#11691))
([6d0bad7](6d0bad7))
* **docs:** Keys docs update
([#11665](#11665))
([ce3d92c](ce3d92c))
* Revert "barretenberg/stdlib/logic bugs"
([#11689](#11689))
([b99570d](b99570d))
* Solidity verifier caching
([#11712](#11712))
([2ba1e71](2ba1e71))
* Use eth-execution label
([#11713](#11713))
([d3c31d8](d3c31d8))


### Miscellaneous

* Add tests for gov proposer
([#11633](#11633))
([5c6a48a](5c6a48a)),
closes
[#11681](#11681)
* **bb-prover:** Avm test skip and split
([#11717](#11717))
([1778867](1778867))
* Benchmark sha256 number of instructions executed in AVM
([#11253](#11253))
([aaf0d8c](aaf0d8c))
* Delete MerkleTrees implementation in JS
([#11697](#11697))
([1db7b78](1db7b78))
* Ensure new kv-store is used on the server
([#11662](#11662))
([aee1420](aee1420))
* Field encoding should use `fromString` instead of `fromHexString`
([#11585](#11585))
([43fdbb1](43fdbb1)),
closes
[#10331](#10331)
* Improve boxes
([#11656](#11656))
([46a3e85](46a3e85))
* Increase node pool count and don't use a release channel
([#11687](#11687))
([65a3f11](65a3f11))
* Mark contracts as pub
([#11241](#11241))
([b168601](b168601))
* Reduce memory requests on prover node
([#11678](#11678))
([a720151](a720151))
* Remove profiler cache fallback
([#11680](#11680))
([a305aef](a305aef))
* Remove some templates in templates
([#11698](#11698))
([61614b1](61614b1))
* Remove unused functions from public side effect trace
([#11600](#11600))
([54e9602](54e9602))
* Replace relative paths to noir-protocol-circuits
([739151e](739151e))
* Replace relative paths to noir-protocol-circuits
([bbd526c](bbd526c))
* **sequencer:** Add InvalidArchive to canProposeAtNextEthBlock ignored
errors
([#11682](#11682))
([eea4bd3](eea4bd3))
* **spartan:** Remove hardcoded keys and addresses - derive all from
mnemonic
([#11672](#11672))
([65f0e48](65f0e48))
* Turn off auto-upgrade in node-pools
([#11679](#11679))
([09f98a9](09f98a9))
* Turn on masking in ultra and mega zk + oink clean-up
([#11693](#11693))
([08e96fe](08e96fe))


### Documentation

* Update mig notes release version
([#11685](#11685))
([46a30b5](46a30b5))
</details>

<details><summary>barretenberg: 0.74.0</summary>

##
[0.74.0](barretenberg-v0.73.0...barretenberg-v0.74.0)
(2025-02-04)


### Features

* UltraHonkZK contract
([#11553](#11553))
([a68369f](a68369f))


### Bug Fixes

* Barretenber/stdlib/logic bugs
([#11651](#11651))
([dddab22](dddab22))
* Barretenberg/stdlib/logic bugs (redo)
([#11691](#11691))
([6d0bad7](6d0bad7))
* Revert "barretenberg/stdlib/logic bugs"
([#11689](#11689))
([b99570d](b99570d))


### Miscellaneous

* Ensure new kv-store is used on the server
([#11662](#11662))
([aee1420](aee1420))
* Remove some templates in templates
([#11698](#11698))
([61614b1](61614b1))
* Turn on masking in ultra and mega zk + oink clean-up
([#11693](#11693))
([08e96fe](08e96fe))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
AztecBot added a commit to AztecProtocol/barretenberg that referenced this pull request Feb 5, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.74.0</summary>

##
[0.74.0](AztecProtocol/aztec-packages@aztec-package-v0.73.0...aztec-package-v0.74.0)
(2025-02-04)


### Miscellaneous

* Ensure new kv-store is used on the server
([#11662](AztecProtocol/aztec-packages#11662))
([aee1420](AztecProtocol/aztec-packages@aee1420))
</details>

<details><summary>barretenberg.js: 0.74.0</summary>

##
[0.74.0](AztecProtocol/aztec-packages@barretenberg.js-v0.73.0...barretenberg.js-v0.74.0)
(2025-02-04)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>aztec-packages: 0.74.0</summary>

##
[0.74.0](AztecProtocol/aztec-packages@aztec-packages-v0.73.0...aztec-packages-v0.74.0)
(2025-02-04)


### ⚠ BREAKING CHANGES

* time library
([#11542](AztecProtocol/aztec-packages#11542))

### Features

* `u128.ts` accepting string on input
([#11664](AztecProtocol/aztec-packages#11664))
([bb25992](AztecProtocol/aztec-packages@bb25992))
* Add network, better drawer performance
([#11694](AztecProtocol/aztec-packages#11694))
([1f61822](AztecProtocol/aztec-packages@1f61822))
* Skip calculation of partial sums when simulating blobs
([#11257](AztecProtocol/aztec-packages#11257))
([aca66f7](AztecProtocol/aztec-packages@aca66f7))
* Time library
([#11542](AztecProtocol/aztec-packages#11542))
([3b463f9](AztecProtocol/aztec-packages@3b463f9)),
closes
[#11520](AztecProtocol/aztec-packages#11520)
* UltraHonkZK contract
([#11553](AztecProtocol/aztec-packages#11553))
([a68369f](AztecProtocol/aztec-packages@a68369f))


### Bug Fixes

* Add bootstrap.sh to rebuild_patterns
([#11683](AztecProtocol/aztec-packages#11683))
([e84a81a](AztecProtocol/aztec-packages@e84a81a))
* **archiver:** Do not attempt to decode blob before filtering
([#11668](AztecProtocol/aztec-packages#11668))
([961cbdd](AztecProtocol/aztec-packages@961cbdd))
* Barretenber/stdlib/logic bugs
([#11651](AztecProtocol/aztec-packages#11651))
([dddab22](AztecProtocol/aztec-packages@dddab22))
* Barretenberg/stdlib/logic bugs (redo)
([#11691](AztecProtocol/aztec-packages#11691))
([6d0bad7](AztecProtocol/aztec-packages@6d0bad7))
* **docs:** Keys docs update
([#11665](AztecProtocol/aztec-packages#11665))
([ce3d92c](AztecProtocol/aztec-packages@ce3d92c))
* Revert "barretenberg/stdlib/logic bugs"
([#11689](AztecProtocol/aztec-packages#11689))
([b99570d](AztecProtocol/aztec-packages@b99570d))
* Solidity verifier caching
([#11712](AztecProtocol/aztec-packages#11712))
([2ba1e71](AztecProtocol/aztec-packages@2ba1e71))
* Use eth-execution label
([#11713](AztecProtocol/aztec-packages#11713))
([d3c31d8](AztecProtocol/aztec-packages@d3c31d8))


### Miscellaneous

* Add tests for gov proposer
([#11633](AztecProtocol/aztec-packages#11633))
([5c6a48a](AztecProtocol/aztec-packages@5c6a48a)),
closes
[#11681](AztecProtocol/aztec-packages#11681)
* **bb-prover:** Avm test skip and split
([#11717](AztecProtocol/aztec-packages#11717))
([1778867](AztecProtocol/aztec-packages@1778867))
* Benchmark sha256 number of instructions executed in AVM
([#11253](AztecProtocol/aztec-packages#11253))
([aaf0d8c](AztecProtocol/aztec-packages@aaf0d8c))
* Delete MerkleTrees implementation in JS
([#11697](AztecProtocol/aztec-packages#11697))
([1db7b78](AztecProtocol/aztec-packages@1db7b78))
* Ensure new kv-store is used on the server
([#11662](AztecProtocol/aztec-packages#11662))
([aee1420](AztecProtocol/aztec-packages@aee1420))
* Field encoding should use `fromString` instead of `fromHexString`
([#11585](AztecProtocol/aztec-packages#11585))
([43fdbb1](AztecProtocol/aztec-packages@43fdbb1)),
closes
[#10331](AztecProtocol/aztec-packages#10331)
* Improve boxes
([#11656](AztecProtocol/aztec-packages#11656))
([46a3e85](AztecProtocol/aztec-packages@46a3e85))
* Increase node pool count and don't use a release channel
([#11687](AztecProtocol/aztec-packages#11687))
([65a3f11](AztecProtocol/aztec-packages@65a3f11))
* Mark contracts as pub
([#11241](AztecProtocol/aztec-packages#11241))
([b168601](AztecProtocol/aztec-packages@b168601))
* Reduce memory requests on prover node
([#11678](AztecProtocol/aztec-packages#11678))
([a720151](AztecProtocol/aztec-packages@a720151))
* Remove profiler cache fallback
([#11680](AztecProtocol/aztec-packages#11680))
([a305aef](AztecProtocol/aztec-packages@a305aef))
* Remove some templates in templates
([#11698](AztecProtocol/aztec-packages#11698))
([61614b1](AztecProtocol/aztec-packages@61614b1))
* Remove unused functions from public side effect trace
([#11600](AztecProtocol/aztec-packages#11600))
([54e9602](AztecProtocol/aztec-packages@54e9602))
* Replace relative paths to noir-protocol-circuits
([739151e](AztecProtocol/aztec-packages@739151e))
* Replace relative paths to noir-protocol-circuits
([bbd526c](AztecProtocol/aztec-packages@bbd526c))
* **sequencer:** Add InvalidArchive to canProposeAtNextEthBlock ignored
errors
([#11682](AztecProtocol/aztec-packages#11682))
([eea4bd3](AztecProtocol/aztec-packages@eea4bd3))
* **spartan:** Remove hardcoded keys and addresses - derive all from
mnemonic
([#11672](AztecProtocol/aztec-packages#11672))
([65f0e48](AztecProtocol/aztec-packages@65f0e48))
* Turn off auto-upgrade in node-pools
([#11679](AztecProtocol/aztec-packages#11679))
([09f98a9](AztecProtocol/aztec-packages@09f98a9))
* Turn on masking in ultra and mega zk + oink clean-up
([#11693](AztecProtocol/aztec-packages#11693))
([08e96fe](AztecProtocol/aztec-packages@08e96fe))


### Documentation

* Update mig notes release version
([#11685](AztecProtocol/aztec-packages#11685))
([46a30b5](AztecProtocol/aztec-packages@46a30b5))
</details>

<details><summary>barretenberg: 0.74.0</summary>

##
[0.74.0](AztecProtocol/aztec-packages@barretenberg-v0.73.0...barretenberg-v0.74.0)
(2025-02-04)


### Features

* UltraHonkZK contract
([#11553](AztecProtocol/aztec-packages#11553))
([a68369f](AztecProtocol/aztec-packages@a68369f))


### Bug Fixes

* Barretenber/stdlib/logic bugs
([#11651](AztecProtocol/aztec-packages#11651))
([dddab22](AztecProtocol/aztec-packages@dddab22))
* Barretenberg/stdlib/logic bugs (redo)
([#11691](AztecProtocol/aztec-packages#11691))
([6d0bad7](AztecProtocol/aztec-packages@6d0bad7))
* Revert "barretenberg/stdlib/logic bugs"
([#11689](AztecProtocol/aztec-packages#11689))
([b99570d](AztecProtocol/aztec-packages@b99570d))


### Miscellaneous

* Ensure new kv-store is used on the server
([#11662](AztecProtocol/aztec-packages#11662))
([aee1420](AztecProtocol/aztec-packages@aee1420))
* Remove some templates in templates
([#11698](AztecProtocol/aztec-packages#11698))
([61614b1](AztecProtocol/aztec-packages@61614b1))
* Turn on masking in ultra and mega zk + oink clean-up
([#11693](AztecProtocol/aztec-packages#11693))
([08e96fe](AztecProtocol/aztec-packages@08e96fe))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test: execute proposal through governance proposer
2 participants