Comments (8)
I am a large proponent of VLQ, it matches the UTF-8 endianness, and is used a lot everywhere.
from runestone.
Here is my JS/TS implementation of PrefixVarint: https://gist.github.com/revofusion/ba74dc11e0b007feba84b7b492e5ee87
Similar rust implementation at: https://github.com/otake84/dlhn/blob/22ce82ab3740328ff7041b63f77ee70020605b1c/dlhn/src/prefix_varint.rs#L5
from runestone.
I'm writing a prefix varint implementation that supports u128. Prefix varints are nice, fast, and compact, but they are quite tricky, so implementation complexity is a downside.
from runestone.
@revofusion the only problem I have for this implementation is that it only supports max_uint64, when we need to support at least max_uint128 for transfer amount. I would be ok with a generic prefix varint impl that doesn’t stop at any integer size limit.
from runestone.
Please provide a high level overview of your prefix varint for u128 when you get a chance so those interested can provide any feedback or gain consensus, especially since the runestone is essentially a lot of varints.
from runestone.
I've been fooling around with u128 varints, and found them very complex, and no more compact than LEB128 and VLQ. (I thought that a 128 bit prefix varint could save 1 byte over LEB128, but it turns out that only works for a 64 bit prefix varint.)
I opened PR #24 implementing VLQ varints. It's still a draft, it only contains the varint implementation, and does not integrate it into the runestone encoder or decoder.
from runestone.
This is very dependent on the distribution of values. For example if we use deltas extensively, as in #9, then zero is likely to be a common value. We could use a varint implementation where zero is encoded as a single bit as an optimization.
from runestone.
Closing in favor of #53.
from runestone.
Related Issues (20)
- Allow specifying mint time in batchfile with datetime, instead of timestamp HOT 1
- Encode divisibility in batchfile as 10^divisibility HOT 1
- Test that etching a reserved run in a cenotaph still reserves that rune
- Test that minting a rune in a cenotaph still records the mint
- Should claim in etching produce a cenotaph? HOT 1
- Make it possible to etch a rune without an inscription appearing on /rune
- Disambiguate rune amounts in `ord wallet send`
- Use checked adds for rune arithmatic in updater
- Use u64 in mint relative and absolute block heights and timestamp
- Improve supply limits HOT 1
- Renames
- Investigate TEST•RUNE•DELTA bug
- Encode runestone fields in ascending order
- See what test coverage is like
- Create new batch subcommand HOT 1
- More informative output when etching
- Reopening mints HOT 1
- Consider not using pushbytes in runestone OP_RETURNs HOT 1
- Etch Rune with cenotaph should be store in reserved
- Using commit_tx.confirmations to determine the validity of etching runes can lead to inconsistent judgments on the validity of runes during node operations HOT 6
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 runestone.