Skip to content
This repository has been archived by the owner on Jun 21, 2020. It is now read-only.

Deployment of a valid contract with invalid constructor succeeds #111

Open
lacabra opened this issue Apr 5, 2019 · 5 comments
Open

Deployment of a valid contract with invalid constructor succeeds #111

lacabra opened this issue Apr 5, 2019 · 5 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@lacabra
Copy link
Contributor

lacabra commented Apr 5, 2019

As the title says, when deploying a valid secret contract bytecode with an invalid constructor, such as Fn='not a valid construct()';, the deployment succeeds, seemingly ignoring the constructor function passed as an argument.

Is this the intended behavior, or should it fail?

@moriaab
Copy link
Contributor

moriaab commented Apr 10, 2019

@lacabra
To reproduce the behavior I need some clarifications:

  1. Does the valid contract have a constructor. It is better if you point me to the real contract.
  2. What is this: Fn='not a valid construct()' ? Is this a decrypted callable?
  3. Please give me the relevant inputs, at least callable and arguments

@elichai
Copy link
Contributor

elichai commented Apr 10, 2019

I think he meant the opposite, that he passed an invalid constructor and it didn't fail.

@lacabra
Copy link
Contributor Author

lacabra commented Apr 10, 2019

Correct, I passed an invalid constructor, and it didn't fail.
Take any contract, and pass the following:

Callable='whatever-you-want-here-that-is-not-a-valid-construct-function'
Args=[]

@lacabra
Copy link
Contributor Author

lacabra commented Apr 10, 2019

In the integration tests, run the following tests in this order:

  1. 01_init.spec.js
  2. 03_deploy_fail_constructor.spec.js

And the deployment does not fail as expected, but instead it succeeds.

@moriaab
Copy link
Contributor

moriaab commented Apr 28, 2019

This defect is planned to be fixed as part of general improvement of treating wrong inputs for deployment and computation of secret contracts.

@moriaab moriaab added the bug Something isn't working label Apr 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants