Comments (2)
Thanks for the report. Let us take a closer look into it. From the first sight (it should be investigated thoroughly), the case you have reported looks quite rare event to happen to take any significant advantage of it. It would be great if you could provide any example of using it.
from 3dp.
in p3d github repository
file: src/lib.rs
at lines 110 - 122
if let Some(rot) = trans {
let axis_normalized = Vector3::new(
rot[0] as f64 * 45.0 / 256.0,
rot[1] as f64 * 45.0 / 256.0,
rot[2] as f64 * 45.0 / 256.0,
).normalize();
mesh.apply_transformation(
Mat4::from_axis_angle(
axis_normalized,
Deg(rot[3] as f64 * 360.0 / 256.0),
)
);
}
if rot[3] is 0 then Mat4::from_axis_angle will return the same value (a matrix wich doesn't affect the object in any way) for every value of rot[0],rot[1],rot[2]. The reason of this is obviously, rotating an object with angle 0 will not change anything.
The simples way to solve this is to check at the beggining of the hash function (at line 46 -> pub fn p3d_process...) if the 4th element of trans is 0. If this element it's 0 the function can just return an empty array, like there is no result hash.
Example scenario in which this bug is critical for mining:
Let's say we pregenerate a lot of random objects with rotation 0 (100m+,1b+), it will take some hours, but then we can store them to use later at anytime. Then, the node can be easily modified to generate blocks for mining continuosly and discard all which doesn't have the 4th byte in prehash 0. For example on a 7950x cpu we can run 8 nodes at the same time and each one is generating a new block in 30-50ms -> 25 blocks per second for only one instance and for all of them 25*8 = 200 blocks per second, so it means one cpu can generate almost 1 valid block (with 4th byte 0) at almost every second. Let's say we have 10 cpus for this so in total we will get 8-10 good blocks per second. After this we can build a simple proxy/server which will request every node for its blocks.
In the end our new miner will use the very big list with objects and all generated blocks to just do sha3 hashes. Think that every new block generated means another (length of the big list) hashes checked (in our example 100m * 10(blocks per second) will result in 1gh per second).
from 3dp.
Related Issues (20)
- Equivocation report handling HOT 1
- Mining pool pallet HOT 1
- docker err HOT 1
- (RS-W1128) Found use of deprecated function
- (RS-E1007) Found erasing operation
- unknow error HOT 2
- Thread main panicked on initial install HOT 1
- Node running error. HOT 1
- bug:docker build error HOT 2
- Poscan hash is not verified when importing blocks HOT 1
- Mining pools can avoid the mining reward coin lock
- Same vertex faces and huge objects
- Suspended pools can operate normally
- Wrong address checked for kyc when joining a pool
- Pools can give rewards to addresses that are no longer pool members
- Identity comparison only compares the first present value
- submit_mining_stat signature does not have a nonce
- Object creation fee lock in poscan pallet is not accumulated
- Bug in calculation of pool rewards
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 3dp.