-
Notifications
You must be signed in to change notification settings - Fork 222
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
[AV-1855] Simplify build script to place binary in avalanchego plugin directory #81
Conversation
@@ -38,8 +38,10 @@ source "$SUBNET_EVM_PATH"/scripts/constants.sh | |||
|
|||
if [[ $# -eq 1 ]]; then | |||
binary_path=$1 | |||
elif [[ $# -eq 0 ]]; then | |||
binary_path="$GOPATH/src/github.com/ava-labs/avalanchego/build/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy" |
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 should print this binary path when built with default paths. If someone does not use this path for their avalanchego, then this may be lost. Personally I think the simpler way is to put that binary under subnet-evm folder i.e ./build/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy
. Plus this is probably safer than assuming that avalanchego path exists.
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.
Will add a printout of the path. People can still pass in a binary path if they want, but I'd much prefer to have this functionality to make it easier to use with the expected setup.
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.
Should we try to infer the avalanchego path as the parent directory of the current repo instead ie, ../avalanchego/
?
Or maybe add a check for the existence of the directory?
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.
I'd prefer to only take advantage of this happy path if avalanchego is in the expected location. If the expected directory is not there, then we would want to error either way and it currently already provides a readable error message in this case, so I don't think this is necessary. If it's not there, users will need to specify the binary path.
* Add COPYING file from geth (#83) * Add COPYING file from geth * Add COPYING.LESSER file * Add version to code (#136) * Add version to code * bump version * Add version to goreleaser * Remove version from code in favor of setting at compile time * use version env * use v prefix in the version Co-authored-by: Aaron Buchwald <aaron.buchwald56@gmail.com> * [AV-1855] Simplify build script to place binary in avalanchego plugin directory (#81) * Simplify build script to place binary in avalanchego plugin directory * echo binary path * split shutdown into network stop and client stop, call network stop after each test, call client stop after suite ends * add check for network up after stop * switch to ANR * bump script to ANR 1.1.3 * fix cluster status check * minor fix * cleanup of health/status check * lint * nits Co-authored-by: Ceyhun Onur <ceyhun.onur@avalabs.org> Co-authored-by: Felipe Madero <felipe.madero@gmail.com>
* init fee config precompile * add fee config manager precompile * complete precompile internal functions * nits * add fee config provider * init cache with limit * added getFeeConfig func to precompile * add fee config tasks to hardhat * add getFeeConfigs for apis * add unit tests * update tx pool only if fee config is activated * Update plugin/evm/block_verification.go Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org> * fix for reviews * add initial fee config to precompile & default back to chain config * rename functions in tests * add deployer allow list test suit * add last accepted at * add last accepted test to precompile test * Revert selectBigWithinBounds changes * use big int cmp * move precompile test to last * fix unit tests * remove flaky test & ensure tx pool is reorged * move local rpc into new file * add comment to cachableFeeConfig * add timestamp to block context * add error to newOracle * fix moar nits * Nits * revert allowlist setter helpers * increase SetFeeConfigGasCost for setting last changed * add configure validation to fee precompiles * Address nits * increase gas cost for wagmi * Remove fee config from fee config manager config * Update contract-examples/README.md Co-authored-by: aaronbuchwald <aaron.buchwald56@gmail.com> * add license to tests * remove log * add err check * Update precompile/utils.go Co-authored-by: aaronbuchwald <aaron.buchwald56@gmail.com> * Remove no longer necessary test * contract example nits * fix contract tests * lower fees & split into two tests * use explicit fees * Nits * feeconfig nits * nit * Fee config precompile nits (#145) * Add COPYING file from geth (#83) * Add COPYING file from geth * Add COPYING.LESSER file * Add version to code (#136) * Add version to code * bump version * Add version to goreleaser * Remove version from code in favor of setting at compile time * use version env * use v prefix in the version Co-authored-by: Aaron Buchwald <aaron.buchwald56@gmail.com> * [AV-1855] Simplify build script to place binary in avalanchego plugin directory (#81) * Simplify build script to place binary in avalanchego plugin directory * echo binary path * split shutdown into network stop and client stop, call network stop after each test, call client stop after suite ends * add check for network up after stop * switch to ANR * bump script to ANR 1.1.3 * fix cluster status check * minor fix * cleanup of health/status check * lint * nits Co-authored-by: Ceyhun Onur <ceyhun.onur@avalabs.org> Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org> Co-authored-by: Aaron Buchwald <aaron.buchwald56@gmail.com>
This PR simplifies the build script to take in either zero or one parameters, where one argument specifies the location to build the plugin binary and zero arguments will attempt to place the plugin binary in the default location within the default build directory of AvalancheGo in the gopath.