Skip to content

Commit

Permalink
Remove jackson module
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Dec 29, 2024
1 parent 19c82a5 commit b4fd155
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 76 deletions.
1 change: 0 additions & 1 deletion data/serializer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ dependencies {
implementation project(':ethereum:spec')
implementation project(':infrastructure:bls')
implementation project(':infrastructure:bytes')
implementation project(':infrastructure:jackson')
implementation project(':infrastructure:async')

implementation 'io.tmio:tuweni-units'
Expand Down
1 change: 0 additions & 1 deletion ethereum/execution-types/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ dependencies {
implementation project(':infrastructure:crypto')
implementation project(':infrastructure:json')

testFixturesApi project(':infrastructure:jackson')
testImplementation project(':ethereum:json-types')

testImplementation testFixtures(project(':infrastructure:json'))
Expand Down
8 changes: 0 additions & 8 deletions infrastructure/jackson/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion infrastructure/yaml/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
dependencies {
implementation project(':infrastructure:jackson')
implementation 'io.tmio:tuweni-bytes'
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@
import java.io.OutputStream;
import java.io.StringWriter;
import java.io.UncheckedIOException;
import java.util.Locale;
import java.util.stream.Stream;
import org.apache.tuweni.bytes.Bytes;
import org.apache.tuweni.bytes.Bytes32;
import tech.pegasys.teku.infrastructure.jackson.deserializers.bytes.Bytes32Deserializer;
import tech.pegasys.teku.infrastructure.jackson.deserializers.bytes.BytesSerializer;
import tech.pegasys.teku.infrastructure.unsigned.UInt64;

public class YamlProvider {
Expand Down Expand Up @@ -113,4 +112,22 @@ public void serialize(
gen.writeNumber(value.bigIntegerValue());
}
}

public static class Bytes32Deserializer extends JsonDeserializer<Bytes32> {

@Override
public Bytes32 deserialize(final JsonParser p, final DeserializationContext ctxt)
throws IOException {
return Bytes32.fromHexString(p.getValueAsString());
}
}

public static class BytesSerializer extends JsonSerializer<Bytes> {
@Override
public void serialize(
final Bytes value, final JsonGenerator gen, final SerializerProvider provider)
throws IOException {
gen.writeString(value.toHexString().toLowerCase(Locale.ROOT));
}
}
}
1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ include 'infrastructure:events'
include 'infrastructure:exceptions'
include 'infrastructure:http'
include 'infrastructure:io'
include 'infrastructure:jackson'
include 'infrastructure:json'
include 'infrastructure:kzg'
include 'infrastructure:metrics'
Expand Down
1 change: 0 additions & 1 deletion validator/client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ dependencies {
implementation project(':infrastructure:crypto')
implementation project(':infrastructure:exceptions')
implementation project(':infrastructure:io')
implementation project(':infrastructure:jackson')
implementation project(':infrastructure:metrics')
implementation project(':infrastructure:http')
implementation project(':ethereum:json-types')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* specific language governing permissions and limitations under the License.
*/

package tech.pegasys.teku.infrastructure.jackson.deserializers.bytes;
package tech.pegasys.teku.validator.client.proposerconfig.loader;

import com.fasterxml.jackson.core.JacksonException;
import com.fasterxml.jackson.databind.DeserializationContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import tech.pegasys.teku.infrastructure.exceptions.ExceptionUtil;
import tech.pegasys.teku.infrastructure.exceptions.InvalidConfigurationException;
import tech.pegasys.teku.infrastructure.http.UrlSanitizer;
import tech.pegasys.teku.infrastructure.jackson.deserializers.bytes.Bytes48KeyDeserializer;
import tech.pegasys.teku.validator.client.ProposerConfig;

public class ProposerConfigLoader {
Expand Down

0 comments on commit b4fd155

Please sign in to comment.