<commit_before>package states

import (
	"DNA/crypto"
	"io"
	"bytes"
)

type ValidatorState struct {
	PublicKey *crypto.PubKey
}

func(v *ValidatorState) Serialize(w io.Writer) error {
	v.PublicKey.Serialize(w)
	return nil
}


func(v *ValidatorState)Deserialize(r io.Reader) error {
	p := new(crypto.PubKey)
	p.DeSerialize(r)
	v.PublicKey = p
	return nil
}

func(v *ValidatorState) ToArray() []byte {
	b := new(bytes.Buffer)
	v.Serialize(b)
	return b.Bytes()
}<commit_msg>add version control<commit_after>package states

import (
	"DNA/crypto"
	"io"
	"bytes"
)

type ValidatorState struct {
	StateBase
	PublicKey *crypto.PubKey
}

func(v *ValidatorState) Serialize(w io.Writer) error {
	v.StateBase.Serialize(w)
	v.PublicKey.Serialize(w)
	return nil
}


func(v *ValidatorState)Deserialize(r io.Reader) error {
	
	p := new(crypto.PubKey)
	p.DeSerialize(r)
	v.PublicKey = p
	return nil
}

func(v *ValidatorState) ToArray() []byte {
	stateBase := new(StateBase)
	err := stateBase.Deserialize(r)
	if err != nil {
		return err
	}
	v.StateBase = *stateBase
	p := new(crypto.PubKey)
	err = p.DeSerialize(r)
	if err != nil {
		return err
	}
	v.PublicKey = p
	return nil
}

{'fraction_non_alphanumeric': 0.13402061855670103, 'fraction_numerical': 0.0, 'mean_word_length': 4.295454545454546, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4317707', 'n_tokens_mistral': 462, 'n_tokens_neox': 459, 'n_words': 101}