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

Move to truffle 5 #82

Open
JakeOShannessy opened this issue Nov 7, 2018 · 5 comments
Open

Move to truffle 5 #82

JakeOShannessy opened this issue Nov 7, 2018 · 5 comments
Assignees
Labels
P-low Low priority S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work. T-evm Target system: Ethereum EVM

Comments

@JakeOShannessy
Copy link
Contributor

It uses web3-1.0, and even the simplest cases go from 1000 ms to about 50 ms, and solves the issues I've been having testing with parity.

@Latrasis Latrasis self-assigned this Nov 8, 2018
@JakeOShannessy
Copy link
Contributor Author

With the previous version of web 3 is an issue where it didn't recognise that transactions had been completed using when using Parity with InstantSeal. This meant that the tests halted, waiting for a response. This could be avoid by sending other simultaneous requests to the Parity node at the same time to force more blocks to be mined, but it is excruciatingly slow.

@Latrasis Latrasis mentioned this issue Feb 3, 2019
@Latrasis Latrasis added the S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work. label Feb 3, 2019
@Latrasis
Copy link
Member

Latrasis commented Feb 3, 2019

Putting this on hold due to difficulty and low priority.

@Latrasis Latrasis added the P-low Low priority label Feb 3, 2019
@JakeOShannessy
Copy link
Contributor Author

Currently, when running tests with ganache they take about 6-7 minutes for me. How long do they take in other setups?

@JakeOShannessy
Copy link
Contributor Author

Just to note here for when we need to discuss Web3 1.0 (which I believe is in Truffle 5) there is another big advantage. With the current Web3 version we need to pack the data ourselves when calling a procedure via the entry procedure. This is as follows:

const manualInputData = web3.fromAscii(procName.padEnd(24,"\0")) // the name of the procedure to call (24 bytes)
    + functionSelectorHash // the function selector hash (4 bytes)
    + web3.fromAscii(testProcName.padEnd(24,"\0")).slice(2).padEnd(32*2,0) // the name argument for register (32 bytes)
    + deployedTestContract.address.slice(2).padStart(32*2,0) // the address argument for register (32 bytes)
    + web3.toHex(124).slice(2).padStart(32*2,0) // the offset for the start of caps data (32 bytes)
    + web3.toHex(0).slice(2).padStart(32*2,0) // the caps data, which is currently just a length of zero (32 bytes)

With Web3 1.0 it does all of the ABI management for us and the code would be as follows:

try {
    console.log(deployedContract.methods.B(testProcName,deployedTestContract.address,[]).data)
} catch (e) {
    console.log(e)
}

@Latrasis
Copy link
Member

Currently, when running tests with ganache they take about 6-7 minutes for me. How long do they take in other setups?

Same here. It is very slow. Refactoring the tests would be ideal of course, but I've been hitting bottlenecks in #86. I'll see if a rebase might help.

@Latrasis Latrasis added the T-evm Target system: Ethereum EVM label May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-low Low priority S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work. T-evm Target system: Ethereum EVM
Projects
None yet
Development

No branches or pull requests

2 participants