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

No real value exists in class environment #39

Open
KennyFood opened this issue May 30, 2018 · 1 comment
Open

No real value exists in class environment #39

KennyFood opened this issue May 30, 2018 · 1 comment
Labels

Comments

@KennyFood
Copy link

KennyFood commented May 30, 2018

My question is we don't know the exact value of environment arguments. In the first place, I'm wondering what the values we append to the machine stack are when we deal with the opcode CALLDATALOAD. And i find the code:
`elif op == 'CALLDATALOAD':
# unpack 32 bytes from calldata into a word and put it on the stack

            op0 = state.stack.pop()

            try:
                offset = helper.get_concrete_int(simplify(op0))
                b = environment.calldata[offset]`

The comment which suggests we put a word on the stack make me confused. Then I turn to the environment.calldata and i find the code:
`# Initialize the execution environment

    environment = Environment(
        self.accounts[main_address],
        BitVec("caller", 256),
        [],
        BitVec("gasprice", 256),
        BitVec("callvalue", 256),
        BitVec("origin", 256),
        calldata_type=CalldataType.SYMBOLIC,
    )

I think the function BitVec belongs to Z3 so I also read some blogs about symbolic execution. Finally I don't get the answer :(. In total, what are real values of arguments such as gasprice and callvalue. Are they symbols? unpack 32 bytes from calldata into a word and put it on the stack`
What does the comment mean? What if we need compare the callvalue with a exact value?
I'm sorry I know my question is not clear.
I hope your support @b-mueller .
Thanks a lot!

@KennyFood
Copy link
Author

@b-mueller Hi, sorry to bother you, but I can't find your contact information. So May I have your Email please? I really want to contact you. BTW, It's not about the question. Thank you so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants