Comments (13)
This is weird. The decoder correctly decodes the value to "true". So maybe this is happening on some (un-)marshalling step. Do you know of an action that contains a boolean value in it's data? Would like to check if this is a common thing with all nested boolean values or if it's only impacting the decoded table data.
from firehose-antelope.
Do you know of an action that contains a boolean value in it's data?
You mean boolean action param?
Here's one
Looks like it's also encoded as 1
.
from firehose-antelope.
Hmm ok I'll need to take a deeper look into this. Do you know if it's consistent behaviour to encode nested json data into 0/1 or does this impact only certain actions?
from firehose-antelope.
Looks consistent. Here's eosio::deletegatebw
call: https://eos.eosq.eosnation.io/tx/bd1bd84da20a7028c14d3404a544fe86a91d7e423ab6db64d7a2cea18f927a3a
from firehose-antelope.
Jul 07 10:37:50 eos-sfdm41 nodeos[1519058]: 2023-07-07T10:37:50.772Z DEBG (codec) decoding action {"action": "eosio:delegatebw", "global_sequence": 358638274958}
Jul 07 10:37:50 eos-sfdm41 nodeos[1519058]: 2023-07-07T10:37:50.772Z DEBG (codec) found ABI and action definition, performing decoding {"action": "eosio:delegatebw", "global_sequence": 358638274958}
Jul 07 10:37:50 eos-sfdm41 nodeos[1519058]: 2023-07-07T10:37:50.772Z DEBG (codec) successfully decoded action data {"action": "eosio:delegatebw", "json_data": "{\"from\":\"kingparallax\",\"receiver\":\"kingparallax\",\"stake_cpu_quantity\":\"27.9807 EOS\",\"stake_net_quantity\":\"0.0000 EOS\",\"transfer\":0}"}
from firehose-antelope.
Ok so I copied out the decoding part, ran it locally with a delegatebw action and it is properly decoding the boolean value to true/false instead of 0/1. This is weird.
Looking at the battlefield-eosio repository it seems like the boolean decoding always has been to 0/1 (it's how nested json strings with booleans are encoded in the golden.json files which were used to test against with linediff).
from firehose-antelope.
OK, so we are keeping it this way?
from firehose-antelope.
I assume yes, unless you get maoueh to say otherwise.
from firehose-antelope.
Related commit where they changed the decoding to byte
Then they added fitNodeos
flag.
So they did it to align with nodeos.
Is there any downside if we just decode it as true/false?
from firehose-antelope.
I love we can find the code change for that.
from firehose-antelope.
Setting fitNodeos to false has other implications on parsings, like int128 getting parsed into a string instead of a number. Not sure what the impacts are when changing that.
Seems like Matthieu doesn't know either.
from firehose-antelope.
@YaroShkvorets is this still relevant or should we close the issue?
from firehose-antelope.
I guess we can close it.
from firehose-antelope.
Related Issues (20)
- "invalid string value: data is not UTF-8 encoded" HOT 1
- Rename acme-blockchain to antelope throughout the code HOT 3
- Starting merger without `common-forked-blocks-store-url` generates error HOT 1
- merger doesn't start without setting start block HOT 4
- a file called `app.log.json` gets created
- Improve error message when streaming blocks that are too old HOT 4
- Store decoded db ops HOT 1
- kylin merger stuck at block 0001246500
- firehose-antelope really slow when replaying kylin and telos blocks HOT 5
- Can't stream using negative start block HOT 1
- Move host to pinax-network GitHub repo
- update `sf.antelope.type.v1` => `v2` HOT 1
- init is missing HOT 2
- Testing after update to v1.1.1
- Relayer channel at max capacity
- error message says acme HOT 2
- firehose starts at block 0 instead of block 2 HOT 1
- reader crash on EOS block 144532479 HOT 3
- waxtest block replay crash
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firehose-antelope.