bitshares / bitshares/bitshares-core
sizeof() can return a platform-dependent result
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 660
- Avg merge
- 8h 17m
- Merged PRs (30d)
- 26
Description
As stated here: https://github.com/bitshares/bitshares-core/issues/995#issuecomment-450638713 , sizeof() can return a platform-dependent result. This can endanger consensus, if one node rejects a (block | transaction) due to size, but another accepts it.
In all code that limits or rejects due to size, a platform-independent size must be calculated.
**Impacts**
- [ ] API (the application programming interface)
- [ ] Build (the build process or something prior to compiled code)
- [ ] CLI (the command line wallet)
- [ ] Deployment (the deployment process after building such as Docker, Travis, etc.)
- [ ] DEX (the Decentralized EXchange, market engine, etc.)
- [x] P2P (the peer-to-peer network for transaction/block propagation)
- [ ] Performance (system or user efficiency, etc.)
- [x] Protocol (the blockchain logic, consensus, validation, etc.)
- [ ] Security (the security of system or user data, etc.)
- [ ] UX (the User Experience)
- [ ] Other (please add below)
**Steps To Reproduce**
tbd
**Expected Behavior**
Blocks or transactions should be accepted or rejected independent of the node platform.
## CORE TEAM TASK LIST
- [ ] Evaluate / Prioritize Bug Report
- [ ] Refine User Stories / Requirements
- [ ] Define Test Cases
- [ ] Design / Develop Solution
- [ ] Perform QA/Testing
- [ ] Update Documentation
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the linked issue comment and locating the code paths that limit or reject blocks and transactions based on size. Reproduce the behavior on different platforms and define tests showing that acceptance or rejection is platform-independent; done means all such checks use a consistent size.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- blockchain, networking
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100