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

Eosdac working master #204

Merged
merged 16 commits into from
Feb 14, 2020
Merged

Conversation

dallasjohnson
Copy link
Contributor

@dallasjohnson dallasjohnson commented Feb 11, 2020

This PR includes several changes I have made for a local version of Lamington to extend functionality for my needs on EOSDAC. Changes include:

  • Adding the ability to add custom build flags to the contract compiler by adding a <contract_name>.lamflags file containing the build flags to add eg. -DTRANSFER_DELAY=3 to add a build flag for TRANSFER_DELAY = 3 to the contract compilation for testing purpose only.
  • Added debug as a debug level of 0 for none, 1 for minimal which would display the brief output of of each action. 2 for verbose output displaying all the EOSIO transaction output and verbose errors.
  • Added a debugPromise as a wrapper for any promise to enable which debugging logs (depending on the above debug level).
  • Added the ability to copy eosio configs into the docker image at startup. This is useful to be able to inject a custom genesis.json file.
  • Added the ability to create an EOSIO account in the AccountManager with a specified account name rather than a randomly generated name which helps with debugging tests.
  • Added helper functions to update auths on an account and linking the auths to specific actions.
  • Added a config option for bailOnFailure so the tests can exit on the first failure as an option.
  • Added a config option for include for an array of source code files in include rather than having to manually exclude .cpp which should not be compiled as separate contracts.
  • Logging has been further enhanced by adding a timer to log the time taken for individual transactions and adding chalk to help colouring parts of the log output.
  • Also added some more tests to the typegenerator but in order to be able to unit test this I needed to move some of the code logic around a bit.

* master: (38 commits)
  Bump commander from 3.0.2 to 4.0.1
  Bump prettier from 1.18.2 to 1.19.1
  Bump @types/node from 12.12.3 to 12.12.7
  Bump auto-changelog from 1.16.1 to 1.16.2
  Bump @types/node from 12.11.7 to 12.12.3
  Bump @types/rimraf from 2.0.2 to 2.0.3
  Bump @types/node from 12.11.1 to 12.11.7
  Bump mocha from 6.2.1 to 6.2.2
  Bump @types/chai from 4.2.3 to 4.2.4
  Bump glob from 7.1.4 to 7.1.5
  Bump @types/node from 12.7.12 to 12.11.1
  Bump dotenv from 8.0.0 to 8.2.0
  Addressed PR comments.
  changes after running `npm run format` - include only formatting changes
  Refactor of the error check assertion to remove duplicate code in the assertions by creating a private function for other assertions to call into.
  Adds an assertion `assertEOSErrorIncludesMessage` that will assert the error message for an expected `eosio_assert_message_exception` includes the given description.
  Bump @types/ncp from 2.0.1 to 2.0.2
  Formatting changes after running npm run format
  Build is timing out, but building the docker container takes a while, so let's wait for it.
  Bump typescript from 3.6.3 to 3.6.4
  ...

# Conflicts:
#	src/cli/utils.ts
#	src/configManager.ts
#	src/contracts/contract.ts
#	src/contracts/typeGenerator.ts
* master:
  Bump typescript from 3.6.4 to 3.7.3
…le `exclude`. Both would be applied while filtering source .cpp files.
…the contract to compile in the form `<contractName>.lamflags` in the same directory and the contract .cpp file.
…r code to allow easier unit testing. Also removes `verbose_logging` from the argsv since it wasn't used.
"axios": "0.19.0",
"chai": "4.2.0",
"chalk": "^3.0.0",
"clarify": "2.1.0",
"colors": "1.4.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

We do already use colors, but that's okay, might consolidate to only using one in the future

/** @hidden Maximum number of EOS connection attempts before fail */
const MAX_CONNECTION_ATTEMPTS = 8;
const MAX_CONNECTION_ATTEMPTS = 20;
Copy link
Collaborator

Choose a reason for hiding this comment

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

How come all of these timeouts and attempts need to be so high? Are you hitting these numbers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did have have some errors early using the tools which were hard to diagnose since they wouldn't happen on every run. Perhaps this could be set back to 8.

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.

2 participants