-
Notifications
You must be signed in to change notification settings - Fork 316
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
docs: updating key docs in concepts section #6387
Merged
LHerskind
merged 16 commits into
master
from
05-14-docs_updating_key_docs_in_conepts_section
May 16, 2024
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
8fb09a2
docs: updating key docs in conepts section
benesjan abb7bad
WIP
benesjan edc1a68
WIP
benesjan b3efe72
WIP
benesjan 51fd420
WIP
benesjan 459621a
fmt fix
benesjan 1b47348
Apply suggestions from code review
benesjan f331a98
Addressing comments
benesjan 49161d5
WIP
benesjan 858b971
better complete address example
benesjan a60e1ab
no spendable
benesjan ae687b4
removing a lie
benesjan 090dfaf
Scoped keys cleanup
benesjan 8045ac0
no bellow
benesjan b72b972
fun with conflicts
benesjan 2a458f2
fixing links after rebase
benesjan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
import { getSchnorrAccount } from '@aztec/accounts/schnorr'; | ||
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. I wanted to include some code of this test in docs and I felt that the use of ctx instead of destructuring made it harder to read so I changed that. |
||
import { | ||
type AccountManager, | ||
type AztecNode, | ||
type DebugLogger, | ||
type DeployL1Contracts, | ||
ExtendedNote, | ||
Fr, | ||
NativeFeePaymentMethod, | ||
Note, | ||
type PXE, | ||
PrivateFeePaymentMethod, | ||
PublicFeePaymentMethod, | ||
Schnorr, | ||
|
@@ -25,14 +28,7 @@ import { | |
|
||
import { jest } from '@jest/globals'; | ||
|
||
import { | ||
type BalancesFn, | ||
type EndToEndContext, | ||
expectMapping, | ||
getBalancesFn, | ||
publicDeployAccounts, | ||
setup, | ||
} from './fixtures/utils.js'; | ||
import { type BalancesFn, expectMapping, getBalancesFn, publicDeployAccounts, setup } from './fixtures/utils.js'; | ||
import { GasPortalTestingHarnessFactory, type IGasBridgingTestHarness } from './shared/gas_portal_test_harness.js'; | ||
|
||
const TOKEN_NAME = 'BananaCoin'; | ||
|
@@ -43,8 +39,11 @@ const BRIDGED_FPC_GAS = BigInt(10e12); | |
jest.setTimeout(1_000_000); | ||
|
||
describe('e2e_fees_account_init', () => { | ||
let ctx: EndToEndContext; | ||
let logger: DebugLogger; | ||
let aztecNode: AztecNode; | ||
let pxe: PXE; | ||
let teardown: () => Promise<void>; | ||
|
||
let sequencer: Wallet; | ||
let sequencersAddress: AztecAddress; | ||
let alice: Wallet; | ||
|
@@ -84,22 +83,24 @@ describe('e2e_fees_account_init', () => { | |
} | ||
|
||
beforeAll(async () => { | ||
ctx = await setup(2, {}, {}, true); | ||
logger = ctx.logger; | ||
[sequencer, alice] = ctx.wallets; | ||
let wallets: Wallet[]; | ||
let wallet: Wallet; | ||
let deployL1ContractsValues: DeployL1Contracts; | ||
({ logger, wallets, wallet, aztecNode, pxe, deployL1ContractsValues } = await setup(2, {}, {}, true)); | ||
[sequencer, alice] = wallets; | ||
sequencersAddress = sequencer.getAddress(); | ||
|
||
await ctx.aztecNode.setConfig({ | ||
await aztecNode.setConfig({ | ||
feeRecipient: sequencersAddress, | ||
}); | ||
|
||
gasBridgeTestHarness = await GasPortalTestingHarnessFactory.create({ | ||
aztecNode: ctx.aztecNode, | ||
pxeService: ctx.pxe, | ||
publicClient: ctx.deployL1ContractsValues.publicClient, | ||
walletClient: ctx.deployL1ContractsValues.walletClient, | ||
wallet: ctx.wallet, | ||
logger: ctx.logger, | ||
aztecNode, | ||
pxeService: pxe, | ||
publicClient: deployL1ContractsValues.publicClient, | ||
walletClient: deployL1ContractsValues.walletClient, | ||
wallet, | ||
logger, | ||
mockL1: false, | ||
}); | ||
|
||
|
@@ -122,15 +123,15 @@ describe('e2e_fees_account_init', () => { | |
gasBalances = getBalancesFn('⛽', gas.methods.balance_of_public, logger); | ||
}); | ||
|
||
afterAll(() => ctx.teardown()); | ||
afterAll(() => teardown()); | ||
|
||
beforeEach(() => { | ||
gasSettings = GasSettings.default(); | ||
maxFee = gasSettings.getFeeLimit().toBigInt(); | ||
actualFee = 1n; | ||
bobsSecretKey = Fr.random(); | ||
bobsPrivateSigningKey = Fq.random(); | ||
bobsAccountManager = getSchnorrAccount(ctx.pxe, bobsSecretKey, bobsPrivateSigningKey, Fr.random()); | ||
bobsAccountManager = getSchnorrAccount(pxe, bobsSecretKey, bobsPrivateSigningKey, Fr.random()); | ||
bobsAddress = bobsAccountManager.getCompleteAddress().address; | ||
}); | ||
|
||
|
@@ -292,7 +293,7 @@ describe('e2e_fees_account_init', () => { | |
const completeAddress = CompleteAddress.fromSecretKeyAndInstance(bobsSecretKey, instance); | ||
|
||
// alice registers the keys in the PXE | ||
await ctx.pxe.registerRecipient(completeAddress); | ||
await pxe.registerRecipient(completeAddress); | ||
|
||
// and deploys bob's account, paying the fee from her balance | ||
const publicKeysHash = deriveKeys(bobsSecretKey).publicKeys.hash(); | ||
|
@@ -339,6 +340,6 @@ describe('e2e_fees_account_init', () => { | |
const note = new Note([new Fr(amount), secretHash]); | ||
// this note isn't encrypted but we need to provide a registered public key | ||
const extendedNote = new ExtendedNote(note, owner, bananaCoin.address, storageSlot, noteTypeId, txHash); | ||
await ctx.pxe.addNote(extendedNote); | ||
await pxe.addNote(extendedNote); | ||
} | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Below