leofcoin / monorepo Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
const message = new BlockMessage({transactions: [hash]})
message.decode() // {transactions: [hash]}
const resolver = (propertyKey, value) => propertyKey === 'transactions' && peernet.get(value)
message.decode(resolver) // {transactions: [{from, to}]}
or
const resolver = (propertyKey, value) => propertyKey === 'transactions' && fs.readfile(value)
message.decode(resolver) // {transactions: [{from, to}]}
To keep transactions in order, these are async/awaited, blocks the execution for other users, while only necessary when a user interacts with the same contract in a block
Whenever a node connects it will try to update from the state store, meaning accounts should be in the state also or empty nodes will fail getting the account nonce
Transactions are included in the block, which requires nodes to load those blocks before they can access the transaction count, hashes etc
currently they look like
block.transactions // [{
hash,
from,
to,
params,
...
}]
// load and loop trough all blocks
for (const block of loadedBlocks) {
for (const tx of block.transactions) {
transactionPoolStore.has(tx.hash)
}
}
this makes things hard/cpu expensive to keep nodes in sync because transactionPool keeps including transactions that are processed already.
meaning we would need to loop trough all blocks and it's transactions.
We could just set a time/blockamount limit on it ofc, but while this would work to reduce the amount of processing this would also result in transactions getting lost (imagine a power outage where a node is disconnected for 10 min and in that time the timeout experises ...)
Blocks should just hold the transaction hashes while transactions should get their own storage.
This way we can loop trough all transactions in the pool and just check if it
block.transactions // [transationhash]
// existing hash
await transactionPoolStore.has(transactionhash)
// getting tx data
await transactionStore.get(transactionhash)
x10
Improve development speed (removes the need to publish and upgrade dependencies)
Browser performance is fast but not fast enough, shared workers could solve that.
Let validators vote who to handle the incoming transactions
Current TPS 1000TX/1s (1 validator)
Introduce a simple faucet (for now)
Makes life easier for testers (and me) trying to get some LFC coins to checkout the test platform.
A contract should control this, whenever a request happens it checks if the user has less then the max amount they can own to get the coins (let's say 500)
current latest update introduced breaking changes, meanwhile it was just a patch
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.