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

A problem with transactions in 1.0.37 version #17

Closed
hatskier opened this issue Sep 15, 2021 · 3 comments · Fixed by #18
Closed

A problem with transactions in 1.0.37 version #17

hatskier opened this issue Sep 15, 2021 · 3 comments · Fixed by #18

Comments

@hatskier
Copy link

I've noticed that transaction posting or transaction fetching was broken in the 1.0.37 version.
After some low level debuggin in this project https://github.com/ppedziwiatr/swc-test I've found out that transaction data changes in a weird way after posting. After switching to 1.0.36 version of arlocal everything works fine.

@kouraf
Copy link
Contributor

kouraf commented Sep 15, 2021

can you please give me some further details ?
And what do you mean by weird ?

In the 1.0.37 we added a wallets system, you can no longer create transaction if the owner doesn't exist. In order to create a wallet you need to POST a json with an address and a balance to /wallet.

Exemple:
curl --header "Content-Type: application/json" \ --request POST \ --data '{"address":"Th825IP80n4i9F3Rc4cBFh767CGqiV4n7S-Oy5lGLjv","balance":200}' \ http://localhost:1984/wallet

maybe it breaks because of that !

thanks for your issue.

@ppedziwiatr
Copy link
Contributor

ppedziwiatr commented Sep 15, 2021

The file encoding seems to be broken in 1.0.37
image

What we're doing here is deploying Smartweave contract with its initial state (json).
When we then try to read the contract definition - and its initial state - it gives the above error.

The exact same thing works fine on 1.0.36

In order to reproduce -

  1. clone https://github.com/ppedziwiatr/swc-test
  2. change arLocal version to 1.0.37 in package.json
  3. yarn install
  4. node tests.js

imho this issue has been introduced in 7d3ee5a

@kouraf
Copy link
Contributor

kouraf commented Sep 15, 2021

Yes, there was a bug but it was related to how we was saving the data, you can find a quick fix here.

Let me know if there's anything else.

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 a pull request may close this issue.

3 participants