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

Block Timestamp & block number mistake #6

Open
julesGoullee opened this issue Sep 17, 2019 · 1 comment
Open

Block Timestamp & block number mistake #6

julesGoullee opened this issue Sep 17, 2019 · 1 comment

Comments

@julesGoullee
Copy link

So basically it's easy to test and reproduce:

  • 1 Dev blockchain follow all guideline tron quick start & tron official documentation.
  • 2 Create a simple contract where one method store in the contract one of this global value: block timestamp or block number
  • 3 Another method, who is view function, read this variable and the current value of block.timestamp or block.number

The error:
When you call the view function to read the current block.timestamp/number, it's work as expected. But not for the previously-stored one it's always 0.
For me, the problem is when the transaction is executed to write on the chain (step 2) the value is always 0, so when we read later we got 0. Probably it's work on the real deployed chain, but it's a requirement to have similar behavior on the dev environement. Actually it's impossible to have a proper test on a time-based feature.

I already post this issue a few times ago and some angry dev kicks me out after few minutes (on java-tron repo) with the proof that is work on the mainnet.
Just take care 5 minutes about my report it's not to lost your time it's because I spent many time and many way, I always arrived at the same conclusion I'm pretty sure there is an error, as experienced user of tron it will take you 5 minutes to test it, if you prefer I can spend more time on it and setup ready to proof project to test it,
Thx to have a look into this

@sullof
Copy link
Contributor

sullof commented Dec 18, 2019

That is a well known issue. I also complained with the javatron team about that and they responded the same way. Unfortunately, it is not possible to fix in Quickstart because it depends on the underneath javatron code, which is out of scope. I am sorry.

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

No branches or pull requests

2 participants