elective-stereophonic
elective-stereophonic
Prefix in AM for better usage
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Stable Nxt Client: Nxt 1.12.2

Pages: 1 [2] 3  All

Author Topic: Prefix in AM for better usage  (Read 11701 times)

CIYAM

  • Hero Member
  • *****
  • Karma: +75/-3
  • Offline Offline
  • Posts: 575
  • Ian Knowles - CIYAM Lead Developer
    • View Profile
    • CIYAM
Re: Prefix in AM for better usage
« Reply #20 on: March 28, 2014, 03:27:48 pm »

AM with type and flag is no longer "arbitrary"

The first type (say type 0) *will be arbitrary hex data* so you don't *lose* that with the type (there was never any intention to *get rid of that*).
Logged
With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU

anon136

  • Hero Member
  • *****
  • Karma: +86/-19
  • Offline Offline
  • Posts: 1015
    • View Profile
Re: Prefix in AM for better usage
« Reply #21 on: March 28, 2014, 04:14:22 pm »

AM with type and flag is no longer "arbitrary"

well its still arbitrary before you flag it
Logged

CIYAM

  • Hero Member
  • *****
  • Karma: +75/-3
  • Offline Offline
  • Posts: 575
  • Ian Knowles - CIYAM Lead Developer
    • View Profile
    • CIYAM
Re: Prefix in AM for better usage
« Reply #22 on: March 28, 2014, 04:27:27 pm »

well its still arbitrary before you flag it

I don't really see any difference (a type 0 *being* arbitrary is *not restricting you in any way*).
Logged
With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU

forkedchain

  • Ex-Staff Member
  • Hero Member
  • *****
  • Karma: +74/-10
  • Offline Offline
  • Posts: 1190
  • bite me
    • View Profile
Re: Prefix in AM for better usage
« Reply #23 on: March 28, 2014, 04:31:38 pm »

I actually do think its a good idea, especially since then, if implemented, then tools like block explorers could do some *very* cool things for us, but the devs who implement this (and the block explorers and their users) will just have to be aware that its possible there may be some asshole polluting their TLV fields, and for devs to have their code account for this.
Logged
NXT tips: 2319251 or NXT-8SWM-2224-YKWW-22222

anon136

  • Hero Member
  • *****
  • Karma: +86/-19
  • Offline Offline
  • Posts: 1015
    • View Profile
Re: Prefix in AM for better usage
« Reply #24 on: March 28, 2014, 06:25:37 pm »

perhaps a better question is whether there is even a way to stop this. the only real question here is whether we codify it or leave it open to adhock development.
Logged

forkedchain

  • Ex-Staff Member
  • Hero Member
  • *****
  • Karma: +74/-10
  • Offline Offline
  • Posts: 1190
  • bite me
    • View Profile
Re: Prefix in AM for better usage
« Reply #25 on: March 28, 2014, 07:11:27 pm »

that was kind of my point.  I suppose the NRS core could be rewritten to force AMs to use *something* in a defined subtype/TLV field, and define a set of possible values that are allowed in that field, and if enough of these new clients were distributed, then the new change would take effect, but beyond that I dont believe anything else could be enforced, so the devs using this new field would still need to do good integrity checks of the data, assuming they wanted to build a robust application.

I would be for the forced use of some field, where all zeros meant completely unformatted.  then block explorers would not try to decode these transactions when users want to display transactions in a block.
« Last Edit: March 28, 2014, 07:12:58 pm by forkedchain »
Logged
NXT tips: 2319251 or NXT-8SWM-2224-YKWW-22222

anon136

  • Hero Member
  • *****
  • Karma: +86/-19
  • Offline Offline
  • Posts: 1015
    • View Profile
Re: Prefix in AM for better usage
« Reply #26 on: March 28, 2014, 07:20:14 pm »

that was kind of my point.  I suppose the NRS core could be rewritten to force AMs to use *something* in a defined subtype/TLV field, and define a set of possible values that are allowed in that field, and if enough of these new clients were distributed, then the new change would take effect, but beyond that I dont believe anything else could be enforced, so the devs using this new field would still need to do good integrity checks of the data, assuming they wanted to build a robust application.

I would be for the forced use of some field, where all zeros meant completely unformatted.  then block explorers would not try to decode these transactions when users want to display transactions in a block.

makes sense to me
Logged

CIYAM

  • Hero Member
  • *****
  • Karma: +75/-3
  • Offline Offline
  • Posts: 575
  • Ian Knowles - CIYAM Lead Developer
    • View Profile
    • CIYAM
Re: Prefix in AM for better usage
« Reply #27 on: March 28, 2014, 07:27:35 pm »

I would be for the forced use of some field, where all zeros meant completely unformatted.  then block explorers would not try to decode these transactions when users want to display transactions in a block.

As I said the value 0 for AM *type* would mean *hex data*.
Logged
With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU

bitcoinpaul

  • Hero Member
  • *****
  • Karma: +590/-590
  • Offline Offline
  • Posts: 3097
  • Karmageddon
    • View Profile
Re: Prefix in AM for better usage
« Reply #28 on: March 29, 2014, 08:44:08 am »

CIYAM - could you make a NIP in the NIP board out of this discussion?
Logged
Like my Avatar? Reply now! NXT-M5JR-2L5Z-CFBP-8X7P3

CIYAM

  • Hero Member
  • *****
  • Karma: +75/-3
  • Offline Offline
  • Posts: 575
  • Ian Knowles - CIYAM Lead Developer
    • View Profile
    • CIYAM
Re: Prefix in AM for better usage
« Reply #29 on: March 29, 2014, 09:16:42 am »

CIYAM - could you make a NIP in the NIP board out of this discussion?

Sorry - but I'd prefer it if someone else did that (I would be happy to help with reviewing a draft though).
Logged
With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU

Jean-Luc

  • Core Dev
  • Hero Member
  • *****
  • Karma: +816/-81
  • Offline Offline
  • Posts: 1610
    • View Profile
Re: Prefix in AM for better usage
« Reply #30 on: March 29, 2014, 11:14:39 am »

The core is not going to parse the content of an AM, so what bytes an application puts there is not a concern of the core. If a new type of AM is needed that the core has to treat differently, this will be done by adding a new transaction type, not by parsing the content of the AM.
Logged
GPG key fingerprint: 263A 9EB0 29CF C77A 3D06  FD13 811D 6940 E1E4 240C
NXT-X4LF-9A4G-WN9Z-2R322

bitcoinpaul

  • Hero Member
  • *****
  • Karma: +590/-590
  • Offline Offline
  • Posts: 3097
  • Karmageddon
    • View Profile
Re: Prefix in AM for better usage
« Reply #31 on: March 29, 2014, 11:28:40 am »

So we should just put it in the "guide how to develop on Nxt"?

edit: What's with the blockchain shrinking flag?
Logged
Like my Avatar? Reply now! NXT-M5JR-2L5Z-CFBP-8X7P3

CIYAM

  • Hero Member
  • *****
  • Karma: +75/-3
  • Offline Offline
  • Posts: 575
  • Ian Knowles - CIYAM Lead Developer
    • View Profile
    • CIYAM
Re: Prefix in AM for better usage
« Reply #32 on: March 29, 2014, 11:28:55 am »

The core is not going to parse the content of an AM, so what bytes an application puts there is not a concern of the core.

In that case there will be "no way" to have AM's that can "stick around" after a blockchain clean up (as it was being proposed to use a "flag" to indicate this in the first x bits of the AM).
Logged
With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU

Jean-Luc

  • Core Dev
  • Hero Member
  • *****
  • Karma: +816/-81
  • Offline Offline
  • Posts: 1610
    • View Profile
Re: Prefix in AM for better usage
« Reply #33 on: March 29, 2014, 12:06:31 pm »

Why should the expiration flag be indicated by the first bits in the AM? I would define a separate transaction type for non-expiring AMs, we already have bytes for type and subtype in the transaction object itself. This new type will inherit most properties of the AM. But they will have other differences too, most likely the minimum fee for them should be higher. The logic for min fee being dependent on transaction type is already there, adding a special case based on first bits in AM for only one of the transaction types will be a hack.


Logged
GPG key fingerprint: 263A 9EB0 29CF C77A 3D06  FD13 811D 6940 E1E4 240C
NXT-X4LF-9A4G-WN9Z-2R322

CIYAM

  • Hero Member
  • *****
  • Karma: +75/-3
  • Offline Offline
  • Posts: 575
  • Ian Knowles - CIYAM Lead Developer
    • View Profile
    • CIYAM
Re: Prefix in AM for better usage
« Reply #34 on: March 29, 2014, 12:24:23 pm »

The logic for min fee being dependent on transaction type is already there, adding a special case based on first bits in AM for only one of the transaction types will be a hack.

Understood - this is going to be a little tricky however as basically what we are wanting to achieve is that you have to pay *after* each "blockchain shrinking" in order for the AM to "survive" the "next shrinking" (rather than some large fee for *permanent* storage).

I don't really see how a "subtype" is going to help with this unless we allow "subtypes to be changed".

Logged
With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU

Jean-Luc

  • Core Dev
  • Hero Member
  • *****
  • Karma: +816/-81
  • Offline Offline
  • Posts: 1610
    • View Profile
Re: Prefix in AM for better usage
« Reply #35 on: March 29, 2014, 12:39:08 pm »

But then this is a general problem, which will affect other transaction types too, whether to be pruned or not, and how to collect fees to spare them from the next shrinkage. If several transaction types turn out to need that, we need a new transaction property, we don't need to make a special case that will work for AMs only.

We keep having discussions that go too far in the future. There is plenty of work to be done before even starting to design how blockchain shrinkage will work, yet now we are discussing how it will affect one particular transaction type. My answer is, we will cross this bridge when we get there.
Logged
GPG key fingerprint: 263A 9EB0 29CF C77A 3D06  FD13 811D 6940 E1E4 240C
NXT-X4LF-9A4G-WN9Z-2R322

CIYAM

  • Hero Member
  • *****
  • Karma: +75/-3
  • Offline Offline
  • Posts: 575
  • Ian Knowles - CIYAM Lead Developer
    • View Profile
    • CIYAM
Re: Prefix in AM for better usage
« Reply #36 on: March 29, 2014, 12:42:59 pm »

My answer is, we will cross this bridge when we get there.

Sure - agreed that until *we have* blockchain shrinking we don't have a problem.
Logged
With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU

bitcoinpaul

  • Hero Member
  • *****
  • Karma: +590/-590
  • Offline Offline
  • Posts: 3097
  • Karmageddon
    • View Profile
Re: Prefix in AM for better usage
« Reply #37 on: March 29, 2014, 01:32:37 pm »


We keep having discussions that go too far in the future.

The idea was to make it right from the beginning. But when two experts say this is not the right time (and not the right way), I'm comfortable with this.
Logged
Like my Avatar? Reply now! NXT-M5JR-2L5Z-CFBP-8X7P3

CIYAM

  • Hero Member
  • *****
  • Karma: +75/-3
  • Offline Offline
  • Posts: 575
  • Ian Knowles - CIYAM Lead Developer
    • View Profile
    • CIYAM
Re: Prefix in AM for better usage
« Reply #38 on: March 29, 2014, 02:00:11 pm »

The idea was to make it right from the beginning. But when two experts say this is not the right time (and not the right way), I'm comfortable with this.

I think JL and my ways of doing things are different (but I very much respect his wish "not to hack things").

My approach came from years of working at a company where I was *forced* to *hack* things by the *powers that be* but always I was thinking of ways to "fix it up" down the track (so I would put in a short term *hack* but only *after* I'd worked out a long term *solution* which would then be implemented later).

In engineering terms you could think of this like "putting a blank of wood across a chasm" rather than "building a bridge" (because the "powers that be" think it is more important to "get stuff across that chasm" than to worry about "doing it properly").

My approach would be to "put in the plank" but also start building the foundations for the "real bridge". Inevitably the problems of using the "plank" would of course come up and hopefully before "too much damage would occur" the "real bridge" would be "magically ready" to replace it "just in time".
Logged
With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU

allwelder

  • Hero Member
  • *****
  • Karma: +196/-13
  • Offline Offline
  • Posts: 1867
  • NxtChina.org
    • View Profile
    • NxtChina.org
Re: Prefix in AM for better usage
« Reply #39 on: March 31, 2014, 12:21:19 am »

this is like the Nxtty(NMAC)?
Logged
NxtChina |Weibo |Twitter Donation welcomed:NXT-APL9-66GU-K8LY-B3JJJ
Pages: 1 [2] 3  All
 

elective-stereophonic
elective-stereophonic
assembly
assembly