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

fix: cli fixes #7543

Merged
merged 146 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
acc1c8f
chore: 1st attempt at automatic devnet deployment
spypsy Jun 20, 2024
d3b6a29
fix FULL_IMAGE var
spypsy Jun 21, 2024
e214015
fix missing vars
spypsy Jun 21, 2024
1a45de7
rm contract address vars
spypsy Jun 21, 2024
368cb6e
fix deploy p2p
spypsy Jun 21, 2024
d38fe6e
fix ecs name
spypsy Jun 24, 2024
26fd7e6
hardcode fork url
spypsy Jun 24, 2024
80253eb
force new deployments
spypsy Jun 24, 2024
16fe39b
hardcode aztec-dev in tf file
spypsy Jun 24, 2024
4ed2e5b
separate node - prover terraforms
spypsy Jun 25, 2024
cdfd127
add data resources
spypsy Jun 25, 2024
7e20a58
add provider block
spypsy Jun 26, 2024
b88a3ea
merge with master
spypsy Jun 26, 2024
a5d45bf
Merge branch 'master' into devnet
spypsy Jun 26, 2024
c19aae1
undo formatting
spypsy Jun 26, 2024
38bc061
undo formatting again
spypsy Jun 26, 2024
a04678a
cancel-in-progress
spypsy Jun 26, 2024
cf32b29
fix ecs task def name
spypsy Jun 26, 2024
2aa4eb0
fix aws_ecs_service name ref
spypsy Jun 26, 2024
b400d3b
fix container names
spypsy Jun 26, 2024
bf8c939
PR fixes
spypsy Jun 28, 2024
543f660
remove ref from main.tf
spypsy Jun 28, 2024
898388c
use deploy_tag again for fork url
spypsy Jun 28, 2024
ce09a75
feat: deploy L1 contracts on GA (#7262)
spypsy Jul 2, 2024
e1a9b5d
chore: redeploy L1 contracts (#7263)
spypsy Jul 2, 2024
2bd87c1
fix: fetch-depth 0 (#7264)
spypsy Jul 2, 2024
7afe0d6
chore: redeploy devnet (#7265)
spypsy Jul 2, 2024
987ba1a
chore: redeploy & log (#7266)
spypsy Jul 2, 2024
1227447
fix: use result key (#7267)
spypsy Jul 2, 2024
49170e4
fix: setup-action (#7268)
spypsy Jul 2, 2024
8c3fcc6
fix: action ordering (#7270)
spypsy Jul 2, 2024
e3c45ec
fix: publish cli image to dockerhub (#7274)
spypsy Jul 2, 2024
dbde910
fix: checkout depth on setup (#7275)
spypsy Jul 2, 2024
0f7e6ec
fix: typo (#7276)
spypsy Jul 2, 2024
d574047
fix: input script's file_path (#7278)
spypsy Jul 2, 2024
9c512c0
chore: redeploy l1 contracts (#7295)
spypsy Jul 3, 2024
b46079a
fix: docker run cmd (#7296)
spypsy Jul 3, 2024
ea3102c
fix: taint EFS on l1 redeploy (#7300)
spypsy Jul 3, 2024
dbdb71e
fix: master conflicts (#7303)
spypsy Jul 3, 2024
56c52f9
fix: init terraform in all cases (#7304)
spypsy Jul 3, 2024
b26dd72
merge with master
spypsy Jul 3, 2024
3f37de6
fix merge
spypsy Jul 3, 2024
7afe45f
undo noir changes
spypsy Jul 3, 2024
5e33a6b
fix ETHEREUM_HOST in terraform
spypsy Jul 4, 2024
6451d7c
chore: deploy mainnet-fork, update devnet chainID
spypsy Jul 5, 2024
4685126
redeploy l1
spypsy Jul 5, 2024
f6bf309
use aztecprotocol account
spypsy Jul 5, 2024
f2c24f2
fix fork working-directory
spypsy Jul 5, 2024
dc33049
try jsonencode
spypsy Jul 5, 2024
55b3da3
fix node_data_store count reference
spypsy Jul 5, 2024
8ded39b
remove count from mount targets
spypsy Jul 5, 2024
c204257
redeploy l1 contracts
spypsy Jul 8, 2024
62a6b36
merge with master
spypsy Jul 9, 2024
65b504f
pass aws secrets
spypsy Jul 9, 2024
51aecb6
remove unnecessary ref
spypsy Jul 9, 2024
307cc83
Redeploy L1
spypsy Jul 9, 2024
7d986e6
remove duplicate tasks
spypsy Jul 9, 2024
bcec415
keep artifacts folder
spypsy Jul 9, 2024
3946297
fix typo
spypsy Jul 9, 2024
ea01532
Redeploy L1 again
spypsy Jul 9, 2024
a888e25
fix mnemonic issue
spypsy Jul 9, 2024
8b81f08
debug mnemonic issue
spypsy Jul 9, 2024
e21f530
redeploy fork, contracts
spypsy Jul 9, 2024
b17c018
fix deploy-l1-contracts cmd
spypsy Jul 9, 2024
7e9cad3
fix build
spypsy Jul 9, 2024
f275b02
fix fn call
spypsy Jul 9, 2024
b25a0f5
fix chainId type
spypsy Jul 9, 2024
bf8742f
remove old apiKey ref
spypsy Jul 10, 2024
56e02ff
fix test issue
spypsy Jul 10, 2024
f31926b
redeploy
spypsy Jul 10, 2024
dfc82cd
pass chainId in cli command
spypsy Jul 10, 2024
ee12c95
only use chainId chainInfo
spypsy Jul 10, 2024
267c767
redeploy
spypsy Jul 10, 2024
a8fe490
convert chainId to number in cli
spypsy Jul 10, 2024
3428f96
taint fork efs
spypsy Jul 10, 2024
7c84351
use replace instead of taint
spypsy Jul 10, 2024
26268f8
wait for fork deployment
spypsy Jul 10, 2024
f284e8d
unique ecs volume root_directory
spypsy Jul 10, 2024
cb1ffbb
bool vars in quotes
spypsy Jul 10, 2024
bff5b13
use tostring
spypsy Jul 10, 2024
a336b56
fix common EFS volume
spypsy Jul 11, 2024
d0c19bc
redeploy
spypsy Jul 11, 2024
b1f496f
use descriptive option names
spypsy Jul 11, 2024
c715472
Merge branch 'master' into devnet
spypsy Jul 11, 2024
ad33b3a
PR Fixes
spypsy Jul 11, 2024
4804493
merge with master
spypsy Jul 15, 2024
55c88fb
Remove old index.ts
spypsy Jul 15, 2024
5fe445b
clarify L1 chain ID
spypsy Jul 15, 2024
13e2f22
Merge branch 'master' into devnet
spypsy Jul 15, 2024
a76cb2d
don't pass secrets
spypsy Jul 15, 2024
0910078
pass chainId in bootstrap
spypsy Jul 16, 2024
04a57ee
redeploy fork, contracts
spypsy Jul 16, 2024
2c982d6
build & deploy fork image
spypsy Jul 16, 2024
39450a9
merge with master
spypsy Jul 16, 2024
770fe02
fix chain-id arg
spypsy Jul 16, 2024
95a0230
Merge branch 'master' into devnet
spypsy Jul 16, 2024
1c300ac
redeploy
spypsy Jul 16, 2024
d1b7029
fix options.l1ChainId
spypsy Jul 16, 2024
e165800
ensure number chainId
spypsy Jul 16, 2024
9ec7eee
fix req chainId
spypsy Jul 16, 2024
cd61415
missing config val
spypsy Jul 16, 2024
85c4063
Merge branch 'master' into devnet
spypsy Jul 16, 2024
2f216f1
Merge branch 'master' into devnet
spypsy Jul 16, 2024
566ad70
fix note selector serialization
spypsy Jul 16, 2024
78959e9
add NoteSelector to rpc server
spypsy Jul 16, 2024
aa72522
disable devnet proving
spypsy Jul 16, 2024
4bacf87
fix: prover JSON RPC
spypsy Jul 16, 2024
9142364
merge with master + prover fix
spypsy Jul 16, 2024
c7ae6b8
fix cli bootstrap
spypsy Jul 16, 2024
c790732
deploy PXE & bootstrap on CI
spypsy Jul 17, 2024
a7426ba
fix noir-contracts.js imports
spypsy Jul 18, 2024
d375bac
full PXE URL
spypsy Jul 18, 2024
fac90ad
wait for pxe to be available
spypsy Jul 18, 2024
262a5df
test bootstrap flow
spypsy Jul 18, 2024
53fabfc
separate wait step
spypsy Jul 18, 2024
99e1ae9
formatting
spypsy Jul 18, 2024
e690342
step ordering
spypsy Jul 18, 2024
9d403c0
try explicit if, remove token deploy for now
spypsy Jul 18, 2024
83e0725
log already deployed L2 conracts
spypsy Jul 18, 2024
48a2f1b
try deploying p2p bootnode first
spypsy Jul 18, 2024
11ca2ff
redeploy
spypsy Jul 18, 2024
6deefe0
pk for --private-key
spypsy Jul 18, 2024
a4c0211
Merge branch 'master' into devnet
spypsy Jul 18, 2024
b63fb87
bootstrapping & extracting results in CI
spypsy Jul 19, 2024
de5787c
redeploy L1 contracts by default
spypsy Jul 19, 2024
e45b197
fix script perm
spypsy Jul 19, 2024
8883ee0
fix typos
spypsy Jul 19, 2024
4617fe8
fix typo
spypsy Jul 19, 2024
95ff9ec
fix backslashes
spypsy Jul 19, 2024
a23608f
skip build for testing
spypsy Jul 19, 2024
bb469a8
deploy new image
spypsy Jul 19, 2024
a2f9c0a
redeploy fork
spypsy Jul 19, 2024
85cd6c0
always redeploy fork, some debugging
spypsy Jul 19, 2024
9a4edea
fix GA syntax
spypsy Jul 19, 2024
d32808f
Remove build step for test
spypsy Jul 19, 2024
adb80c0
export vars from script
spypsy Jul 19, 2024
e043a8f
source extract scripts
spypsy Jul 19, 2024
3caecae
rpc urls for deploys
spypsy Jul 19, 2024
e7f49e3
add class registration
spypsy Jul 19, 2024
4e9c51e
log address
spypsy Jul 19, 2024
352aeb3
restore build job
spypsy Jul 19, 2024
44afb88
Merge branch 'master' into devnet
spypsy Jul 19, 2024
1d318af
undo test changes
spypsy Jul 20, 2024
79d02eb
fix: allow salts smaller than 32 bytes
alexghr Jul 22, 2024
d73cd29
fix: streamline deploy options
alexghr Jul 22, 2024
83f13a9
Merge branch 'master' into ag/cli-fixes
PhilWindle Jul 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions yarn-project/cli/src/cmds/pxe/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: DebugL
'<artifact>',
"A compiled Aztec.nr contract's artifact in JSON format or name of a contract artifact exported by @aztec/noir-contracts.js",
)
.option('--initialize <string>', 'The contract initializer function to call', 'constructor')
.option('--no-initialize')
.option('--init <string>', 'The contract initializer function to call', 'constructor')
.option('--no-init', 'Leave the contract uninitialized')
.option('-a, --args <constructorArgs...>', 'Contract constructor arguments', [])
.addOption(pxeOption)
.option(
Expand All @@ -88,10 +88,8 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: DebugL
// `options.wait` is default true. Passing `--no-wait` will set it to false.
// https://github.com/tj/commander.js#other-option-types-negatable-boolean-and-booleanvalue
.option('--no-wait', 'Skip waiting for the contract to be deployed. Print the hash of deployment transaction')
.option('--class-registration', 'Register the contract class. Only has to be done once')
.option('--no-class-registration', 'Skip registering the contract class')
.option('--public-deployment', 'Deploy the public bytecode of contract')
.option('--no-public-deployment', "Skip deploying the contract's public bytecode");
.option('--no-class-registration', "Don't register this contract class")
.option('--no-public-deployment', "Don't emit this contract's public bytecode");
addOptions(deployCommand, FeeOpts.getOptions()).action(async (artifactPath, opts) => {
const { deploy } = await import('./deploy.js');
const {
Expand All @@ -103,7 +101,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: DebugL
wait,
privateKey,
classRegistration,
initialize,
init,
publicDeployment,
universal,
} = opts;
Expand All @@ -115,10 +113,10 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: DebugL
rawArgs,
salt,
privateKey,
typeof initialize === 'string' ? initialize : undefined,
typeof init === 'string' ? init : undefined,
!publicDeployment,
!classRegistration,
typeof initialize === 'string' ? false : initialize,
typeof init === 'string' ? false : init,
universal,
wait,
FeeOpts.fromCli(opts, log),
Expand Down
19 changes: 19 additions & 0 deletions yarn-project/cli/src/utils/commands.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Fr } from '@aztec/circuits.js';

import { parseFieldFromHexString } from './commands.js';

describe('parseFieldFromHexString', () => {
it.each<[string, Fr]>([
['0', Fr.ZERO],
['0x0', Fr.ZERO],
['0x1', new Fr(1)],
['0x00', Fr.ZERO],
['fa', new Fr(0xfa)],
['123', new Fr(0x0123)],
['0xff', new Fr(255)],
['0x0000000000000000000000000000000000000000000000000000000000000003', new Fr(3)],
['0x00000000000000000000000000000000000000000000000000000000000000003', new Fr(3)],
])('parses the field %s correctly', (str, expected) => {
expect(parseFieldFromHexString(str)).toEqual(expected);
});
});
9 changes: 8 additions & 1 deletion yarn-project/cli/src/utils/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,16 @@ export function parseFieldFromHexString(str: string): Fr {
// pad it so that we may read it as a buffer.
// Buffer needs _exactly_ two hex characters per byte
const padded = hex.length % 2 === 1 ? '0' + hex : hex;
let buf = Buffer.from(padded, 'hex');
if (buf.length > Fr.SIZE_IN_BYTES) {
buf = buf.subarray(buf.length - Fr.SIZE_IN_BYTES);
}

const fr = Buffer.alloc(Fr.SIZE_IN_BYTES, 0);
fr.set(buf, Fr.SIZE_IN_BYTES - buf.length);

// finally, turn it into an integer
return Fr.fromBuffer(Buffer.from(padded, 'hex'));
return Fr.fromBuffer(fr);
}

/**
Expand Down
Loading