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

NEAR EVM changes to Balancer Core #1

Merged
merged 19 commits into from
Dec 12, 2020
Merged

NEAR EVM changes to Balancer Core #1

merged 19 commits into from
Dec 12, 2020

Conversation

mikedotexe
Copy link

This PR includes all commits from:

The intention is for this branch to merged into https://github.com/balancer-labs/balancer-core giving instructions on how to run tests and migrate to the NEAR EVM.

Copy link

@artob artob left a comment

Choose a reason for hiding this comment

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

Needs a little more work still, methinks. Also, consider committing package-lock.json, as per our findings in near/nearcore#3665 (comment).

@artob
Copy link

artob commented Dec 7, 2020

@mikedotexe For our own branch, we should also disable (comment out) the exitswapExternAmountOut test case, so that this will keep working despite dependency tree matters: that is, whether installing dependencies from scratch using npm install, versus using your known-good package-lock.json. I will open an upstream bug report about that.

@ailisp
Copy link
Member

ailisp commented Dec 7, 2020

Needs a little more work still, methinks. Also, consider committing package-lock.json, as per our findings in near/nearcore#3665 (comment).

Just saw there's a yarn.lock, is that one reproduce passing tests?

@ilblackdragon
Copy link
Member

ilblackdragon commented Dec 9, 2020 via email

Copy link

@artob artob left a comment

Choose a reason for hiding this comment

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

Maybe add it to near-cli? And add a check that verifies there are test accounts present and if not - prints instructions to install near-cli and running the command to create test accounts.

Yes, this would be good. We need the test account creation in any number of situations, it'd be preferable it'd be available in easy, productized form.

@mikedotexe
Copy link
Author

I'm going to turn this into Draft until we merge aurora-is-near/near-web3-provider#64 as that will be necessary for how we interact with the NearProvider now

@mikedotexe mikedotexe marked this pull request as draft December 11, 2020 21:15
@artob artob marked this pull request as ready for review December 11, 2020 22:45
@artob
Copy link

artob commented Dec 11, 2020

@mikedotexe For our own branch, we should also disable (comment out) the exitswapExternAmountOut test case, so that this will keep working despite dependency tree matters: that is, whether installing dependencies from scratch using npm install, versus using your known-good package-lock.json. I will open an upstream bug report about that.

I feel odd about skipping a test and hoping our PR gets merged upstream. If I were a core dev on Balancer, I would not like seeing that. Do you think we can add a Troubleshooting section to the README about this bug instead? Let's continue discussion on this, and in the meantime I see there are three tests that have exitswapExternAmountOut and I'm not sure if all or one of them would be skipped, so would need that detail from someone whose computer fails.

That's why I said "for our own branch" :) I wouldn't submit that bit upstream as part of this PR. Which reminds me, I still need to open that bug report with upstream.

@artob artob marked this pull request as draft December 11, 2020 22:55
@artob
Copy link

artob commented Dec 11, 2020

@mikedotexe I think the main thing left to do is uncluttering the top level. If I were upstream, I wouldn't merge a PR that added vendor-specific files to the top level.

…ts betanet workflow, remove near tests scripts

truffle config to use NEAR_MASTER_ACCOUNT env variable
@mikedotexe mikedotexe marked this pull request as ready for review December 12, 2020 16:41
@mikedotexe
Copy link
Author

I actually think this is ready for review, however I ran into issues creating test accounts on betanet. I will paste the details I put in Discord here.
I'm trying to run Balancer tests on betanet (clean up the Balancer README from all the local development, and will link them to a page on docs for that instead) and something seems to be wrong with estimation.
env NEAR_ENV=betanet near evm-dev-init josh.betanet
This should basically say, "hey NEAR CLI, i'm using betanet, create the default (5) number of test subaccounts on josh.betanet, which should be .josh.betanet"
I get:

NotEnoughBalance [Error]: Sender josh.betanet does not have enough balance 99938411780848674000000000 for operation costing 8600000190240333500000000000
So it thinks I need 8,600 Ⓝ to do the account creations. The account has 99 Ⓝ.
This NEAR CLI command is about as easy as it gets:
https://github.com/near/near-cli/blob/master/commands/evm-dev-init.js#L22-L26

async function scheduleEVMDevInit(options) {
    const near = await connect(options);
    const account = await near.account(options.accountId);
    await utils.createTestAccounts(account, options.numAccounts);
}

Which then calls createTestAccounts located here:
https://github.com/near/near-web3-provider/blob/master/src/utils.js#L388
I'm having a hard time understanding why betanet thinks this is going to be so expensive. That seems to be a nearcore thing if I'm not mistaken, but before I open an issue wanted to check in with others.

Copy link

@artob artob left a comment

Choose a reason for hiding this comment

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

Nice, LGTM 👍 A couple of grammar nits, can be addressed later.

@artob artob added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 12, 2020
@artob
Copy link

artob commented Dec 12, 2020

I'm having a hard time understanding why betanet thinks this is going to be so expensive. That seems to be a nearcore thing if I'm not mistaken, but before I open an issue wanted to check in with others.

I don't know the answer, but this betanet fee issue isn't going to be due to these changes, so let's not let that hold us up.

This final pull is a lot cleaner now than the original pull. Good job, @mikedotexe 👏

@mikedotexe mikedotexe merged commit cb89dac into master Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants